Skip to content

Commit b8ca9c6

Browse files
committed
chore: install material, fix serving of static files
1 parent 5b5d325 commit b8ca9c6

40 files changed

+683
-710
lines changed

angular.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@
5050
"polyfills": "apps/web/src/polyfills.ts",
5151
"tsConfig": "apps/web/tsconfig.app.json",
5252
"assets": ["apps/web/src/favicon.ico", "apps/web/src/assets"],
53-
"styles": ["apps/web/src/styles.css"],
53+
"styles": [
54+
"apps/web/src/custom-theme.scss",
55+
"apps/web/src/styles.css"
56+
],
5457
"scripts": []
5558
},
5659
"configurations": {
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { NgModule } from '@angular/core';
2+
import { Route, RouterModule } from '@angular/router';
3+
import { OverviewComponent } from './components/overview/overview.component';
4+
import { StackComponent } from './components/stack/stack.component';
5+
import { StacksComponent } from './components/stacks/stacks.component';
6+
import { TutorialComponent } from './components/tutorial/tutorial.component';
7+
8+
const routes: Route[] = [
9+
{
10+
path: 'plots',
11+
component: StacksComponent,
12+
children: [
13+
{ path: '', component: OverviewComponent },
14+
{ path: ':id', component: StackComponent },
15+
],
16+
},
17+
{ path: 'tutorial', component: TutorialComponent },
18+
{ path: '**', redirectTo: 'plots' },
19+
];
20+
21+
@NgModule({
22+
imports: [RouterModule.forRoot(routes)],
23+
exports: [RouterModule],
24+
})
25+
export class AppRoutingModule {}

apps/web/src/app/app.module.ts

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
1-
import { Route, RouterModule } from '@angular/router';
21
import { NgModule } from '@angular/core';
2+
import { MatToolbarModule } from '@angular/material/toolbar';
33
import { BrowserModule } from '@angular/platform-browser';
4-
4+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
5+
import { AppRoutingModule } from './app-routing.module';
56
import { AppComponent } from './components/app/app.component';
6-
import { PlotComponent } from './components/plot/plot.component';
7-
8-
const routes: Route[] = [
9-
{ path: 'plots/:id', component: PlotComponent }
10-
];
7+
import { StackComponent } from './components/stack/stack.component';
8+
import { StacksComponent } from './components/stacks/stacks.component';
9+
import { TutorialComponent } from './components/tutorial/tutorial.component';
10+
import { MatButtonModule } from '@angular/material/button';
11+
import { OverviewComponent } from './components/overview/overview.component';
1112

1213
@NgModule({
13-
declarations: [AppComponent, PlotComponent],
14+
declarations: [
15+
AppComponent,
16+
TutorialComponent,
17+
StacksComponent,
18+
StackComponent,
19+
OverviewComponent,
20+
],
1421
imports: [
22+
AppRoutingModule,
23+
BrowserAnimationsModule,
1524
BrowserModule,
16-
RouterModule.forRoot(routes)
25+
MatButtonModule,
26+
MatToolbarModule,
1727
],
1828
providers: [],
1929
bootstrap: [AppComponent],
Lines changed: 3 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,133 +1,4 @@
1-
/*
2-
* Remove template code below
3-
*/
4-
:host {
5-
display: block;
6-
font-family: sans-serif;
7-
min-width: 300px;
8-
max-width: 600px;
9-
margin: 50px auto;
10-
}
11-
12-
.gutter-left {
13-
margin-left: 9px;
14-
}
15-
16-
.col-span-2 {
17-
grid-column: span 2;
18-
}
19-
20-
.flex {
21-
display: flex;
22-
align-items: center;
23-
justify-content: center;
24-
}
25-
26-
header {
27-
background-color: #143055;
28-
color: white;
29-
padding: 5px;
30-
border-radius: 3px;
31-
}
32-
33-
main {
34-
padding: 0 36px;
35-
}
36-
37-
p {
38-
text-align: center;
39-
}
40-
41-
h1 {
42-
text-align: center;
43-
margin-left: 18px;
44-
font-size: 24px;
45-
}
46-
47-
h2 {
48-
text-align: center;
49-
font-size: 20px;
50-
margin: 40px 0 10px 0;
51-
}
52-
53-
.resources {
54-
text-align: center;
55-
list-style: none;
56-
padding: 0;
57-
display: grid;
58-
grid-gap: 9px;
59-
grid-template-columns: 1fr 1fr;
60-
}
61-
62-
.resource {
63-
color: #0094ba;
64-
height: 36px;
65-
background-color: rgba(0, 0, 0, 0);
66-
border: 1px solid rgba(0, 0, 0, 0.12);
67-
border-radius: 4px;
68-
padding: 3px 9px;
69-
text-decoration: none;
70-
}
71-
72-
.resource:hover {
73-
background-color: rgba(68, 138, 255, 0.04);
74-
}
75-
76-
pre {
77-
padding: 9px;
78-
border-radius: 4px;
79-
background-color: black;
80-
color: #eee;
81-
}
82-
83-
details {
84-
border-radius: 4px;
85-
color: #333;
86-
background-color: rgba(0, 0, 0, 0);
87-
border: 1px solid rgba(0, 0, 0, 0.12);
88-
padding: 3px 9px;
89-
margin-bottom: 9px;
90-
}
91-
92-
summary {
93-
cursor: pointer;
94-
outline: none;
95-
height: 36px;
96-
line-height: 36px;
97-
}
98-
99-
.github-star-container {
100-
margin-top: 12px;
101-
line-height: 20px;
102-
}
103-
104-
.github-star-container a {
105-
display: flex;
106-
align-items: center;
107-
text-decoration: none;
108-
color: #333;
109-
}
110-
111-
.github-star-badge {
112-
color: #24292e;
113-
display: flex;
114-
align-items: center;
115-
font-size: 12px;
116-
padding: 3px 10px;
117-
border: 1px solid rgba(27, 31, 35, 0.2);
118-
border-radius: 3px;
119-
background-image: linear-gradient(-180deg, #fafbfc, #eff3f6 90%);
120-
margin-left: 4px;
121-
font-weight: 600;
122-
}
123-
124-
.github-star-badge:hover {
125-
background-image: linear-gradient(-180deg, #f0f3f6, #e6ebf1 90%);
126-
border-color: rgba(27, 31, 35, 0.35);
127-
background-position: -0.5em;
128-
}
129-
.github-star-badge .material-icons {
130-
height: 16px;
131-
width: 16px;
132-
margin-right: 4px;
1+
.toolbar {
2+
width: 100%;
3+
height: 60px;
1334
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<mat-toolbar color="primary">
2+
<button mat-flat-button>NodePlotLib</button>
3+
</mat-toolbar>
4+
<router-outlet></router-outlet>

apps/web/src/app/components/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
44
selector: 'npl-root',
55
templateUrl: './app.component.html',
66
styleUrls: ['./app.component.css'],
7-
changeDetection: ChangeDetectionStrategy.OnPush
7+
changeDetection: ChangeDetectionStrategy.OnPush,
88
})
99
export class AppComponent {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>overview works!</p>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { ChangeDetectionStrategy, Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'npl-overview',
5+
templateUrl: './overview.component.html',
6+
styleUrls: ['./overview.component.css'],
7+
changeDetection: ChangeDetectionStrategy.OnPush,
8+
})
9+
export class OverviewComponent {}

apps/web/src/app/components/plot/plot.component.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)