Skip to content

Commit 28e78a9

Browse files
landpage card (#202)
* landpage card ui enhancement
1 parent 78155d4 commit 28e78a9

File tree

5 files changed

+111
-43
lines changed

5 files changed

+111
-43
lines changed

ui/pi-web-agent-app/src/app/app.module.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import { MainViewComponent } from './main-view/main-view.component';
1818
import { UpdateManagementComponent } from './update-management/update-management.component';
1919
import { ConsoleComponent } from './console/console.component';
2020
import { NgTerminalModule } from 'ng-terminal';
21+
import { MatCardModule } from '@angular/material/card';
22+
2123

2224
@NgModule({
2325
declarations: [
@@ -26,7 +28,7 @@ import { NgTerminalModule } from 'ng-terminal';
2628
PoweroffComponent,
2729
MainViewComponent,
2830
UpdateManagementComponent,
29-
ConsoleComponent
31+
ConsoleComponent,
3032
],
3133
imports: [
3234
BrowserModule,
@@ -40,7 +42,8 @@ import { NgTerminalModule } from 'ng-terminal';
4042
MatSidenavModule,
4143
MatToolbarModule,
4244
MatButtonModule,
43-
NgTerminalModule
45+
NgTerminalModule,
46+
MatCardModule
4447
],
4548
providers: [],
4649
bootstrap: [AppComponent]
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
2-
3-
<mat-list *ngIf='systemInfo$ | async as systemInfo'>
4-
<mat-list-item>OS: {{systemInfo.OS_Info.Id}} {{systemInfo.OS_Info.Version_Codename}}</mat-list-item>
1+
<div class='bg'>
2+
<mat-card class='example-card' class='section'>
3+
<mat-card-header>
4+
<mat-card-title class='fade-in-image' ><b>System Info</b></mat-card-title>
5+
<mat-card-subtitle></mat-card-subtitle>
6+
</mat-card-header>
7+
<img mat-card-image src='/assets/images/info.png' alt="SYstem Infomrmation">
8+
<mat-card-content>
9+
<mat-list *ngIf='systemInfo$ | async as systemInfo' >
10+
<mat-list-item ><b>OS:</b>&nbsp; {{systemInfo.OS_Info.Id}} {{systemInfo.OS_Info.Version_Codename}}</mat-list-item>
511
<mat-divider></mat-divider>
6-
<mat-list-item>Kernel: {{systemInfo.Kernel}}</mat-list-item>
12+
<mat-list-item><b>Kernel:</b>&nbsp; {{systemInfo.Kernel}}</mat-list-item>
713
<mat-divider></mat-divider>
8-
<mat-list-item>Temperature: {{systemInfo.Temperature}}</mat-list-item>
14+
<mat-list-item><b>Temperature:</b>&nbsp; {{systemInfo.Temperature}}</mat-list-item>
915
</mat-list>
16+
</mat-card-content>
17+
</mat-card></div>
18+
19+
20+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
body {
2+
height: 90vh;
3+
background-color: black;
4+
display: flex;
5+
justify-content: center;
6+
align-items: center;
7+
}
8+
9+
.example-card {
10+
max-width: 400px;
11+
}
12+
13+
.section {
14+
position: absolute;
15+
left: 50%;
16+
top: 50%;
17+
width: 20rem;
18+
height: 30rem;
19+
transform: translate(-50%, -50%);
20+
display: flex;
21+
flex-wrap: wrap;
22+
box-shadow: 7px 7px 15px rgba(55, 84, 170, 0.15),
23+
-2px -2px 10px rgba(255, 255, 255, 1),
24+
inset 0px 0px 4px rgba(255, 255, 255, 0.2),
25+
inset 7px 7px 15px rgba(55, 84, 170, 0),
26+
inset -7px -7px 20px rgba(255, 255, 255, 0),
27+
0px 0px 4px rgba(255, 255, 255, 0);
28+
29+
}
30+
31+
32+
.bg {
33+
height: 100%;
34+
background: url();
35+
/* Center and scale the image nicely */
36+
background-position: center;
37+
background-repeat: no-repeat;
38+
background-size: cover;
39+
}
40+
41+
.fade-in-image {
42+
animation: fadeIn 5s;
43+
}
44+
45+
@keyframes fadeIn {
46+
0% {opacity:0;}
47+
100% {opacity:1;}
48+
}
49+
50+
@media screen and (min-width : 991px ){
51+
.bg{
52+
display: flex;
53+
align-items: center;
54+
}
55+
}
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
11
.main-container {
2-
display: flex;
3-
flex-direction: column;
4-
position: absolute;
5-
top: 0;
6-
bottom: 0;
7-
left: 0;
8-
right: 0;
9-
}
10-
11-
.main-is-mobile .main-toolbar {
12-
position: fixed;
13-
/* Make sure the toolbar will stay on top of the content as it scrolls past. */
14-
z-index: 2;
15-
}
16-
17-
.example-spacer {
18-
flex: 1 1 auto;
19-
}
20-
2+
display: flex;
3+
flex-direction: column;
4+
position: absolute;
5+
top: 0;
6+
bottom: 0;
7+
left: 0;
8+
right: 0;
9+
}
2110

22-
h1.main-app-name {
23-
margin-left: 8px;
24-
}
25-
26-
.main-sidenav-container {
27-
/* When the sidenav is not fixed, stretch the sidenav container to fill the available space. This
28-
causes `<mat-sidenav-content>` to act as our scrolling element for desktop layouts. */
29-
flex: 1;
30-
}
31-
32-
.main-is-mobile .main-sidenav-container {
33-
/* When the sidenav is fixed, don't constrain the height of the sidenav container. This allows the
34-
`<body>` to be our scrolling element for mobile layouts. */
35-
flex: 1 0 auto;
36-
}
37-
11+
.main-is-mobile .main-toolbar {
12+
position: fixed;
13+
/* Make sure the toolbar will stay on top of the content as it scrolls past. */
14+
z-index: 2;
15+
}
16+
17+
.example-spacer {
18+
flex: 1 1 auto;
19+
}
20+
21+
22+
h1.main-app-name {
23+
margin-left: 8px;
24+
}
25+
26+
.main-sidenav-container {
27+
/* When the sidenav is not fixed, stretch the sidenav container to fill the available space. This
28+
causes `<mat-sidenav-content>` to act as our scrolling element for desktop layouts. */
29+
flex: 1;
30+
}
31+
32+
.main-is-mobile .main-sidenav-container {
33+
/* When the sidenav is fixed, don't constrain the height of the sidenav container. This allows the
34+
`<body>` to be our scrolling element for mobile layouts. */
35+
flex: 1 0 auto;
36+
}
30.6 KB
Loading

0 commit comments

Comments
 (0)