format code

This commit is contained in:
myh 2023-12-26 20:32:01 +08:00
parent 0f43786e79
commit 0fda619b43
8 changed files with 40 additions and 37 deletions

View File

@ -2,7 +2,7 @@ import {ApplicationConfig} from '@angular/core';
import {provideRouter} from '@angular/router';
import {routes} from './app.routes';
import { provideAnimations } from '@angular/platform-browser/animations';
import {provideAnimations} from '@angular/platform-browser/animations';
export const appConfig: ApplicationConfig = {
providers: [provideRouter(routes), provideAnimations()]

View File

@ -1,5 +1,3 @@
import {Routes} from '@angular/router';
export const routes: Routes = [
];
export const routes: Routes = [];

View File

@ -3,28 +3,28 @@
@tailwind components;
.li-img li {
list-style: none;
float: left;
width: 25%; /*四列图片排列*/
height: 175px;
overflow: hidden;
list-style: none;
float: left;
width: 25%; /*四列图片排列*/
height: 175px;
overflow: hidden;
}
.li-img li img {
position: relative;
width: 100%;
height: auto;
top: 50%; /*li高度的一半*/
transform: translateY(-50%); /*再向上移动自身的50%*/
position: relative;
width: 100%;
height: auto;
top: 50%; /*li高度的一半*/
transform: translateY(-50%); /*再向上移动自身的50%*/
}
/*清除浮动*/
.clearfix:after {
position: relative;
content: '';
display: block;
width: 0;
height: 0;
visibility: hidden;
clear: both;
position: relative;
content: '';
display: block;
width: 0;
height: 0;
visibility: hidden;
clear: both;
}

View File

@ -5,7 +5,7 @@
[pauseOnFocus]="pauseOnFocus"
(slide)="onSlide($event)"
>
@for (img of images;track img;let i = $index) {
@for (img of images; track img; let i = $index) {
<ng-template ngbSlide>
<div class="carousel-caption">
<h3>My slide {{ i + 1 }} title</h3>

View File

@ -10,6 +10,6 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body class="mat-typography">
<app-root></app-root>
<app-root></app-root>
</body>
</html>

View File

@ -1,4 +1,3 @@
// Custom Theming for Angular Material
// For more information: https://material.angular.io/guide/theming
@use '@angular/material' as mat;
@ -21,11 +20,11 @@ $AngularDemo-warn: mat.define-palette(mat.$red-palette);
// Create the theme object. A theme consists of configurations for individual
// theming systems such as "color" or "typography".
$AngularDemo-theme: mat.define-light-theme((
color: (
primary: $AngularDemo-primary,
accent: $AngularDemo-accent,
warn: $AngularDemo-warn,
)
color: (
primary: $AngularDemo-primary,
accent: $AngularDemo-accent,
warn: $AngularDemo-warn,
)
));
// Include theme styles for core and each component used in your app.
@ -38,8 +37,14 @@ $AngularDemo-theme: mat.define-light-theme((
@tailwind components;
@tailwind utilities;
html, body { height: 100%; }
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }
html, body {
height: 100%;
}
body {
margin: 0;
font-family: Roboto, "Helvetica Neue", sans-serif;
}
/* Importing Bootstrap SCSS file. */
@import 'bootstrap/scss/bootstrap';