From de99689fb0414d7095e2e00693fa622751bf54ef Mon Sep 17 00:00:00 2001 From: Gabriel De Los Rios Date: Sun, 14 Dec 2025 21:00:52 -0300 Subject: [PATCH] feat: add site header --- .../components/main-header/main-header.html | 8 ++++++ .../components/main-header/main-header.scss | 28 +++++++++++++++++++ .../main-header/main-header.spec.ts | 23 +++++++++++++++ src/app/components/main-header/main-header.ts | 12 ++++++++ 4 files changed, 71 insertions(+) create mode 100644 src/app/components/main-header/main-header.html create mode 100644 src/app/components/main-header/main-header.scss create mode 100644 src/app/components/main-header/main-header.spec.ts create mode 100644 src/app/components/main-header/main-header.ts diff --git a/src/app/components/main-header/main-header.html b/src/app/components/main-header/main-header.html new file mode 100644 index 0000000..5c50e32 --- /dev/null +++ b/src/app/components/main-header/main-header.html @@ -0,0 +1,8 @@ +
+
+
+ +
+

{{title()|titlecase}}

+
+
diff --git a/src/app/components/main-header/main-header.scss b/src/app/components/main-header/main-header.scss new file mode 100644 index 0000000..fad88cb --- /dev/null +++ b/src/app/components/main-header/main-header.scss @@ -0,0 +1,28 @@ +.bar-container { + background-color: var(--primaryDark); + width: 100%; + + &__elements { + position: relative; + display: flex; + flex-direction: column; + margin: auto; + max-width: 1100px; + } + + &__title { + display: flex; + justify-content: center; + } + + &__action-button { + display: flex; + flex-direction: column; + height: 100%; + justify-content: center; + &--left { + position: absolute; + } + } + +} diff --git a/src/app/components/main-header/main-header.spec.ts b/src/app/components/main-header/main-header.spec.ts new file mode 100644 index 0000000..69a1dfd --- /dev/null +++ b/src/app/components/main-header/main-header.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MainHeader } from './main-header'; + +describe('MainHeader', () => { + let component: MainHeader; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [MainHeader] + }) + .compileComponents(); + + fixture = TestBed.createComponent(MainHeader); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/main-header/main-header.ts b/src/app/components/main-header/main-header.ts new file mode 100644 index 0000000..a78d2a8 --- /dev/null +++ b/src/app/components/main-header/main-header.ts @@ -0,0 +1,12 @@ +import { Component, input } from '@angular/core'; +import { TitleCasePipe } from '@angular/common'; + +@Component({ + selector: 'app-main-header', + imports: [TitleCasePipe], + templateUrl: './main-header.html', + styleUrl: './main-header.scss', +}) +export class MainHeader { + title = input(''); +}