Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

Commit 8621897

Browse files
authored
Merge pull request #13 from eksrvb/bugfix/polishing-workspace-design
polishing workspace design
2 parents c61cd72 + 4f999e0 commit 8621897

File tree

4 files changed

+41
-60
lines changed

4 files changed

+41
-60
lines changed
Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,36 @@
1-
<div class="mat-app-background">
2-
3-
<mat-toolbar color="primary">
4-
Material Calendar
5-
<div style="display: flex; justify-content: space-around;">
6-
<mat-slide-toggle [formControl]="toggleControl">
7-
Toggle Themes
8-
</mat-slide-toggle>
9-
<mat-slide-toggle [(ngModel)]="placeholder">
10-
Days placeholder
11-
</mat-slide-toggle>
12-
</div>
13-
</mat-toolbar>
14-
15-
<div class="selection">
16-
<mat-form-field>
17-
<mat-label>Months before</mat-label>
18-
<mat-select [(ngModel)]="monthsBefore">
19-
<mat-option *ngFor="let num of monthsAfterBefore" [value]="num">{{num}}</mat-option>
20-
</mat-select>
21-
</mat-form-field>
22-
<mat-form-field>
23-
<mat-label>Months after</mat-label>
24-
<mat-select [(ngModel)]="monthsAfter">
25-
<mat-option *ngFor="let num of monthsAfterBefore" [value]="num">{{num}}</mat-option>
26-
</mat-select>
27-
</mat-form-field>
28-
<div>
29-
Events: {{ latestEvent | json }}
30-
</div>
1+
<mat-toolbar color="primary">
2+
Material Calendar
3+
<div style="display: flex; justify-content: space-around;">
4+
<mat-slide-toggle [formControl]="toggleControl">
5+
Toggle Themes
6+
</mat-slide-toggle>
7+
<mat-slide-toggle [(ngModel)]="placeholder">
8+
Days placeholder
9+
</mat-slide-toggle>
3110
</div>
11+
</mat-toolbar>
3212

13+
<div class="selection mat-app-background">
14+
<mat-form-field>
15+
<mat-label>Months before</mat-label>
16+
<mat-select [(ngModel)]="monthsBefore">
17+
<mat-option *ngFor="let num of monthsAfterBefore" [value]="num">{{num}}</mat-option>
18+
</mat-select>
19+
</mat-form-field>
20+
<mat-form-field>
21+
<mat-label>Months after</mat-label>
22+
<mat-select [(ngModel)]="monthsAfter">
23+
<mat-option *ngFor="let num of monthsAfterBefore" [value]="num">{{num}}</mat-option>
24+
</mat-select>
25+
</mat-form-field>
3326
<div>
34-
<calendar-panel [placeholderDay]="placeholder" [dataSource]="dataSource" year="2021" month="5"
35-
[monthsBefore]="monthsBefore" [monthsAfter]="monthsAfter" [config]="calendarConfig"
36-
(clickDate)="testMethod($event)">
37-
</calendar-panel>
27+
Events: {{ latestEvent | json }}
3828
</div>
3929
</div>
30+
31+
<div class="mat-app-background" style="height: 80%;">
32+
<calendar-panel [placeholderDay]="placeholder" [dataSource]="dataSource" [year]="2021" [month]="7"
33+
[monthsBefore]="monthsBefore" [monthsAfter]="monthsAfter" [config]="calendarConfig"
34+
(clickDate)="testMethod($event)">
35+
</calendar-panel>
36+
</div>

projects/lib-workspace/src/app/app.component.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,32 +37,23 @@ export class AppComponent implements OnInit {
3737

3838
dataSource: DayC[] = [
3939
{
40-
date: 1624312800000,
40+
date: 1634594400000,
4141
backgroundColor: '#0167c7',
4242
toolTip: 'Test ToolTip First',
43-
badgeMode: 'Icon',
44-
badgeInt: 5,
45-
badgeIcon: 'edit'
4643
},
4744
{
48-
date: 1624312800000,
45+
date: 1634594400000,
4946
backgroundColor: 'rgb(6, 182, 0)',
5047
toolTip: 'Test ToolTip Second',
51-
badgeMode: 'Icon',
52-
badgeInt: 5,
53-
badgeIcon: 'edit'
5448
},
5549
{
56-
date: 1624658400000,
50+
date: 1634853600000,
5751
backgroundColor: 'rgb(6, 182, 0)',
5852
toolTip: 'Test ToolTip 2',
59-
/* badgeMode: 'Icon',
60-
badgeInt: 5,
61-
badgeIcon: 'edit' */
6253
},
6354
{
64-
date: 1604199900000,
65-
backgroundColor: 'blue'
55+
date: 1635544800000,
56+
backgroundColor: 'lightblue'
6657
}
6758
]
6859

projects/lib-workspace/src/app/app.module.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { NgModule, LOCALE_ID } from '@angular/core';
44
import { AppComponent } from './app.component';
55
import { MaterialCalendarModule } from 'projects/material-calendar/src/public-api';
66
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7-
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
7+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
88

99
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
1010
import { MatFormFieldModule } from '@angular/material/form-field';
11-
import {MatToolbarModule} from '@angular/material/toolbar';
11+
import { MatToolbarModule } from '@angular/material/toolbar';
1212
import { MatSelectModule } from '@angular/material/select';
13-
import {MatIconModule} from '@angular/material/icon';
13+
import { MatIconModule } from '@angular/material/icon';
1414
import { MatButtonModule } from '@angular/material/button';
1515

1616
@NgModule({
@@ -32,7 +32,7 @@ import { MatButtonModule } from '@angular/material/button';
3232
MaterialCalendarModule
3333
],
3434
providers: [
35-
{provide: LOCALE_ID, useValue: 'de-DE' }
35+
{ provide: LOCALE_ID, useValue: 'de-DE' }
3636
],
3737
bootstrap: [AppComponent]
3838
})

projects/lib-workspace/src/index.html

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,10 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99
<link rel="icon" type="image/x-icon" href="favicon.ico">
1010
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
11-
12-
<style>
13-
app-root>div {
14-
height: 100%
15-
}
16-
</style>
17-
1811
</head>
1912

2013
<body>
21-
<app-root class="mat-app-background"></app-root>
14+
<app-root></app-root>
2215
</body>
2316

2417
</html>

0 commit comments

Comments
 (0)