diff --git a/webapp/.editorconfig b/webapp/.editorconfig index f166060..dc7c281 100644 --- a/webapp/.editorconfig +++ b/webapp/.editorconfig @@ -1,10 +1,7 @@ -# Editor configuration, see https://editorconfig.org -root = true - [*] charset = utf-8 indent_style = space -indent_size = 2 +indent_size = 4 insert_final_newline = true trim_trailing_whitespace = true diff --git a/webapp/.prettierrc b/webapp/.prettierrc new file mode 100644 index 0000000..936c76e --- /dev/null +++ b/webapp/.prettierrc @@ -0,0 +1,10 @@ +{ + "printWidth": 120, + "tabWidth": 4, + "useTabs": true, + "semi": true, + "singleQuote": true, + "trailingComma": "es5", + "bracketSpacing": true, + "arrowParens": "avoid" +} diff --git a/webapp/README.md b/webapp/README.md deleted file mode 100644 index 0c4e460..0000000 --- a/webapp/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# Webapp - -This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.0.1. - -## Development server - -To start a local development server, run: - -```bash -ng serve -``` - -Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files. - -## Code scaffolding - -Angular CLI includes powerful code scaffolding tools. To generate a new component, run: - -```bash -ng generate component component-name -``` - -For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: - -```bash -ng generate --help -``` - -## Building - -To build the project run: - -```bash -ng build -``` - -This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed. - -## Running unit tests - -To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command: - -```bash -ng test -``` - -## Running end-to-end tests - -For end-to-end (e2e) testing, run: - -```bash -ng e2e -``` - -Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. - -## Additional Resources - -For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. diff --git a/webapp/public/favicon.ico b/webapp/public/favicon.ico deleted file mode 100644 index 57614f9..0000000 Binary files a/webapp/public/favicon.ico and /dev/null differ diff --git a/webapp/public/icons/calendar-dates.svg b/webapp/public/icons/calendar-dates.svg new file mode 100644 index 0000000..92abcfd --- /dev/null +++ b/webapp/public/icons/calendar-dates.svg @@ -0,0 +1,42 @@ + + + + + + + + + + \ No newline at end of file diff --git a/webapp/public/icons/search.svg b/webapp/public/icons/search.svg new file mode 100644 index 0000000..2b99e41 --- /dev/null +++ b/webapp/public/icons/search.svg @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/webapp/public/icons/shopping-cart.svg b/webapp/public/icons/shopping-cart.svg new file mode 100644 index 0000000..bb2c90c --- /dev/null +++ b/webapp/public/icons/shopping-cart.svg @@ -0,0 +1,22 @@ + + + + + \ No newline at end of file diff --git a/webapp/src/app/app.html b/webapp/src/app/app.html index 36093e1..edcc264 100644 --- a/webapp/src/app/app.html +++ b/webapp/src/app/app.html @@ -1,336 +1,4 @@ - - - - - - - - - - - -
-
-
- -

Hello, {{ title }}

-

Congratulations! Your app is running. 🎉

-
- -
-
- @for (item of [ - { title: 'Explore the Docs', link: 'https://angular.dev' }, - { title: 'Learn with Tutorials', link: 'https://angular.dev/tutorials' }, - { title: 'CLI Docs', link: 'https://angular.dev/tools/cli' }, - { title: 'Angular Language Service', link: 'https://angular.dev/tools/language-service' }, - { title: 'Angular DevTools', link: 'https://angular.dev/tools/devtools' }, - ]; track item.title) { - - {{ item.title }} - - - - - } -
- -
-
+ +
+
- - - - - - - - - - - diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index dc39edb..a964b12 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -1,3 +1,8 @@ import { Routes } from '@angular/router'; -export const routes: Routes = []; +export const routes: Routes = [ + { + path: '', + loadComponent: () => import('./routes/home/home').then(c => c.Home) + } +]; diff --git a/webapp/src/app/app.scss b/webapp/src/app/app.scss index e69de29..500b2b6 100644 --- a/webapp/src/app/app.scss +++ b/webapp/src/app/app.scss @@ -0,0 +1,4 @@ +:host { + display: grid; + grid-template-columns: min-content auto; +} diff --git a/webapp/src/app/app.spec.ts b/webapp/src/app/app.spec.ts deleted file mode 100644 index e9672d3..0000000 --- a/webapp/src/app/app.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { provideZonelessChangeDetection } from '@angular/core'; -import { TestBed } from '@angular/core/testing'; -import { App } from './app'; - -describe('App', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [App], - providers: [provideZonelessChangeDetection()] - }).compileComponents(); - }); - - it('should create the app', () => { - const fixture = TestBed.createComponent(App); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - }); - - it('should render title', () => { - const fixture = TestBed.createComponent(App); - fixture.detectChanges(); - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('h1')?.textContent).toContain('Hello, webapp'); - }); -}); diff --git a/webapp/src/app/app.ts b/webapp/src/app/app.ts index 5fce5f4..6e892e2 100644 --- a/webapp/src/app/app.ts +++ b/webapp/src/app/app.ts @@ -1,12 +1,13 @@ import { Component } from '@angular/core'; import { RouterOutlet } from '@angular/router'; +import { NavRail } from './components/nav-rail/nav-rail'; @Component({ - selector: 'app-root', - imports: [RouterOutlet], - templateUrl: './app.html', - styleUrl: './app.scss' + selector: 'app-root', + imports: [RouterOutlet, NavRail], + styleUrl: './app.scss', + templateUrl: './app.html', }) export class App { - protected title = 'webapp'; + protected title = 'webapp'; } diff --git a/webapp/src/app/components/nav-rail/nav-rail.html b/webapp/src/app/components/nav-rail/nav-rail.html new file mode 100644 index 0000000..7f6af87 --- /dev/null +++ b/webapp/src/app/components/nav-rail/nav-rail.html @@ -0,0 +1,16 @@ + diff --git a/webapp/src/app/components/nav-rail/nav-rail.scss b/webapp/src/app/components/nav-rail/nav-rail.scss new file mode 100644 index 0000000..fac37d0 --- /dev/null +++ b/webapp/src/app/components/nav-rail/nav-rail.scss @@ -0,0 +1,15 @@ +nav { + ul { + align-items: center; + display: flex; + flex-direction: column; + list-style: none; + padding-left: 0; + + li { + align-items: center; + display: flex; + flex-direction: column; + } + } +} diff --git a/webapp/src/app/components/nav-rail/nav-rail.spec.ts b/webapp/src/app/components/nav-rail/nav-rail.spec.ts new file mode 100644 index 0000000..c68c1b0 --- /dev/null +++ b/webapp/src/app/components/nav-rail/nav-rail.spec.ts @@ -0,0 +1,22 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NavRail } from './nav-rail'; + +describe('NavRail', () => { + let component: NavRail; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [NavRail], + }).compileComponents(); + + fixture = TestBed.createComponent(NavRail); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/webapp/src/app/components/nav-rail/nav-rail.ts b/webapp/src/app/components/nav-rail/nav-rail.ts new file mode 100644 index 0000000..b23849d --- /dev/null +++ b/webapp/src/app/components/nav-rail/nav-rail.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-nav-rail', + imports: [], + templateUrl: './nav-rail.html', + styleUrl: './nav-rail.scss', +}) +export class NavRail {} diff --git a/webapp/src/app/routes/home/home.html b/webapp/src/app/routes/home/home.html new file mode 100644 index 0000000..5f2c53f --- /dev/null +++ b/webapp/src/app/routes/home/home.html @@ -0,0 +1 @@ +

home works!

diff --git a/webapp/src/app/routes/home/home.scss b/webapp/src/app/routes/home/home.scss new file mode 100644 index 0000000..e69de29 diff --git a/webapp/src/app/routes/home/home.spec.ts b/webapp/src/app/routes/home/home.spec.ts new file mode 100644 index 0000000..e2d9468 --- /dev/null +++ b/webapp/src/app/routes/home/home.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { Home } from './home'; + +describe('Home', () => { + let component: Home; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [Home] + }) + .compileComponents(); + + fixture = TestBed.createComponent(Home); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/webapp/src/app/routes/home/home.ts b/webapp/src/app/routes/home/home.ts new file mode 100644 index 0000000..681446c --- /dev/null +++ b/webapp/src/app/routes/home/home.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-home', + imports: [], + templateUrl: './home.html', + styleUrl: './home.scss', +}) +export class Home implements OnInit { + constructor() {} + + ngOnInit(): void { + } +} diff --git a/webapp/src/index.html b/webapp/src/index.html index 5b75346..0d5097b 100644 --- a/webapp/src/index.html +++ b/webapp/src/index.html @@ -5,7 +5,7 @@ Webapp - + diff --git a/webapp/src/styles.scss b/webapp/src/styles.scss index 90d4ee0..b9ce5f7 100644 --- a/webapp/src/styles.scss +++ b/webapp/src/styles.scss @@ -1 +1,36 @@ -/* You can add global styles to this file, and also import other style files */ +@import url('./styles/reset.scss'); + +:root { + --astronaut-blue: oklch(0.3303 0.078667 242.1936); + --kashmir-blue: oklch(0.5311 0.0868 244.85); + --bossanova: oklch(0.3442 0.0916 323.14); + --trendy-pink: oklch(0.5466 0.0925 325.35); + --zuccini: oklch(0.3235 0.077159 156.9102); + --amazon: oklch(0.5235 0.0882 155.85); + --buccaneer: oklch(0.3435 0.0869 23.74); + --copper-rust: oklch(0.5452 0.0967 23.21); + --zircon: oklch(0.9823 0.008252 271.3302); + --athens-gray: oklch(0.9312 0.0084 271.32); + + --color-primary: var(--astronaut-blue); + --color-on-primary: white; + --color-primary-container: var(--kashmir-blue); + + --color-secondary: var(--bossanova); + --color-on-secondary: white; + --color-secondary-container: var(--trendy-pink); + + --color-tertiary: var(--zuccini); + --color-on-tertiary: white; + --color-tertiary-container: var(--amazon); + + --color-error: var(--buccaneer); + --color-error-container: var(--copper-rust); + + --color-surface: var(--zircon); + --color-surface-container: var(--athens-gray); +} + +body { + margin: 0; +} diff --git a/webapp/src/styles/reset.scss b/webapp/src/styles/reset.scss new file mode 100644 index 0000000..0761796 --- /dev/null +++ b/webapp/src/styles/reset.scss @@ -0,0 +1,54 @@ +/* 1. Use a more-intuitive box-sizing model */ +*, *::before, *::after { + box-sizing: border-box; +} + +/* 2. Remove default margin */ +* { + margin: 0; +} + +/* 3. Enable keyword animations */ +@media (prefers-reduced-motion: no-preference) { + html { + interpolate-size: allow-keywords; + } +} + +body { + /* 4. Add accessible line-height */ + line-height: 1.5; + /* 5. Improve text rendering */ + -webkit-font-smoothing: antialiased; +} + +/* 6. Improve media defaults */ +img, picture, video, canvas, svg { + display: block; + max-width: 100%; +} + +/* 7. Inherit fonts for form controls */ +input, button, textarea, select { + font: inherit; +} + +/* 8. Avoid text overflows */ +p, h1, h2, h3, h4, h5, h6 { + overflow-wrap: break-word; +} + +/* 9. Improve line wrapping */ +p { + text-wrap: pretty; +} +h1, h2, h3, h4, h5, h6 { + text-wrap: balance; +} + +/* + 10. Create a root stacking context +*/ +#root, #__next { + isolation: isolate; +}