-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74aee27
commit e1dd6ee
Showing
26 changed files
with
1,440 additions
and
1,102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<ng-container [ngSwitch]="type"> | ||
<p class="mb-5 font-light" *ngSwitchCase="'text'">{{ text }}</p> | ||
<p class="mb-5 font-light" [innerHTML]="html" *ngSwitchCase="'html'"></p> | ||
<p class="mb-5 font-light" *ngSwitchCase="'text'">{{ text() }}</p> | ||
<p class="mb-5 font-light" [innerHTML]="html()" *ngSwitchCase="'html'"></p> | ||
<p class="mb-5 font-light" *ngSwitchCase="'content'"><ng-content></ng-content></p> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
<ng-container [ngSwitch]="level"> | ||
<ng-container [ngSwitch]="level()"> | ||
<ng-template #content> | ||
<span>{{ text }}</span> | ||
<span class="text-bitterSweet motion-safe:animate-blink" *ngIf="level == 'h1'">_</span> | ||
<span>{{ text() }}</span> | ||
<span class="text-bitterSweet motion-safe:animate-blink" *ngIf="level() == 'h1'">_</span> | ||
</ng-template> | ||
|
||
<h1 class="mb-5 lg:mb-10" *ngSwitchCase="'h1'"> | ||
<ng-container [ngTemplateOutlet]="content"></ng-container> | ||
</h1> | ||
<h2 class="mb-5 lg:mb-8" [id]="id" *ngSwitchCase="'h2'"> | ||
<h2 class="mb-5 lg:mb-8" [id]="id()" *ngSwitchCase="'h2'"> | ||
<ng-container [ngTemplateOutlet]="content"></ng-container> | ||
</h2> | ||
<h3 class="mb-5 lg:mb-7" [id]="id" *ngSwitchCase="'h3'"> | ||
<h3 class="mb-5 lg:mb-7" [id]="id()" *ngSwitchCase="'h3'"> | ||
<ng-container [ngTemplateOutlet]="content"></ng-container> | ||
</h3> | ||
<h4 class="mb-4 lg:mb-6" [id]="id" *ngSwitchCase="'h4'"> | ||
<h4 class="mb-4 lg:mb-6" [id]="id()" *ngSwitchCase="'h4'"> | ||
<ng-container [ngTemplateOutlet]="content"></ng-container> | ||
</h4> | ||
<h5 class="mb-3 lg:mb-5" [id]="id" *ngSwitchCase="'h5'"> | ||
<h5 class="mb-3 lg:mb-5" [id]="id()" *ngSwitchCase="'h5'"> | ||
<ng-container [ngTemplateOutlet]="content"></ng-container> | ||
</h5> | ||
<h6 class="mt-2 lg:mt-4" [id]="id" *ngSwitchCase="'h6'"> | ||
<h6 class="mt-2 lg:mt-4" [id]="id()" *ngSwitchCase="'h6'"> | ||
<ng-container [ngTemplateOutlet]="content"></ng-container> | ||
</h6> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
import { Component, Input } from '@angular/core' | ||
import { Component, input } from '@angular/core' | ||
import { NgSwitch, NgSwitchCase, NgIf, NgTemplateOutlet } from '@angular/common' | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'cmp-headline', | ||
templateUrl: './headline.component.html', | ||
imports: [NgSwitch, NgSwitchCase, NgIf, NgTemplateOutlet], | ||
}) | ||
export class HeadlineComponent { | ||
@Input() | ||
public level: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' = 'h1' | ||
public readonly level = input<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>('h1') | ||
|
||
@Input() | ||
public text!: string | ||
public readonly text = input.required<string>() | ||
|
||
@Input() | ||
public id!: string | ||
public readonly id = input<string>() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
<ng-container [ngSwitch]="type"> | ||
<label class="group relative my-5 flex" for="{{ id }}"> | ||
<ng-container [ngSwitch]="type()"> | ||
<label class="group relative my-5 flex" for="{{ id() }}"> | ||
<span | ||
class="absolute top-1/2 -translate-y-1/2 group-focus-within:-top-4 group-focus-within:translate-y-0 group-focus-within:text-xs motion-safe:transition-all motion-safe:duration-200" | ||
[class.!-top-4]="filled" | ||
[class.!translate-y-0]="filled" | ||
[class.!text-xs]="filled" | ||
*ngIf="label" | ||
*ngIf="label()" | ||
> | ||
{{ label }} | ||
{{ label() }} | ||
</span> | ||
|
||
<textarea | ||
class="h-10 min-h-[2.5rem] w-full resize-none bg-[transparent] text-gunmetal caret-bitterSweet group-focus-within:min-h-[150px] motion-safe:transition-[min-height] motion-safe:duration-150 dark:text-ghostWhite" | ||
[class.!min-h-[150px]]="filled" | ||
[formControl]="fc" | ||
[id]="id" | ||
[formControl]="fc()" | ||
[id]="id()" | ||
*ngSwitchCase="'textarea'" | ||
></textarea> | ||
|
||
<input | ||
class="h-10 w-full bg-[transparent] text-gunmetal caret-bitterSweet dark:text-ghostWhite" | ||
[type]="type" | ||
[formControl]="fc" | ||
[id]="id" | ||
[autocomplete]="autocomplete" | ||
[type]="type()" | ||
[formControl]="fc()" | ||
[id]="id()" | ||
[autocomplete]="autocomplete()" | ||
*ngSwitchDefault | ||
/> | ||
|
||
<span | ||
class="absolute bottom-0 left-0 h-[5px] w-full before:absolute before:-bottom-[5px] before:left-0 before:h-[5px] before:w-full before:bg-paynesGray before:bg-opacity-50 after:absolute after:-bottom-[5px] after:left-0 after:h-[5px] after:w-0 after:bg-bitterSweet group-focus-within:after:w-full motion-safe:after:transition-[width] motion-safe:after:duration-150 sm:before:bottom-0 sm:before:h-[3px] sm:after:bottom-0 sm:after:h-[3px]" | ||
*ngIf="label" | ||
*ngIf="label()" | ||
></span> | ||
</label> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
import { Component, Input } from '@angular/core' | ||
import { Component, input } from '@angular/core' | ||
import { CommonModule } from '@angular/common' | ||
import { ReactiveFormsModule, FormControl } from '@angular/forms' | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'cmp-input', | ||
templateUrl: './input.component.html', | ||
imports: [CommonModule, ReactiveFormsModule], | ||
}) | ||
export class InputComponent { | ||
@Input() | ||
public type: 'text' | 'email' | 'textarea' = 'text' | ||
public readonly type = input<'text' | 'email' | 'textarea'>('text') | ||
|
||
@Input() | ||
public fc: FormControl = new FormControl() | ||
public readonly fc = input<FormControl>(new FormControl()) | ||
|
||
@Input() | ||
public id!: string | ||
public readonly id = input.required<string>() | ||
|
||
@Input() | ||
public label?: string | ||
public readonly label = input<string>() | ||
|
||
@Input() | ||
public autocomplete?: string | ||
public readonly autocomplete = input<string>() | ||
|
||
public get filled(): boolean { | ||
return (this.fc?.dirty ?? false) && this.fc?.value?.length > 0 | ||
return (this.fc()?.dirty ?? false) && this.fc()?.value?.length > 0 | ||
} | ||
} |
10 changes: 5 additions & 5 deletions
10
src/app/components/navigation-button/navigation-button.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<div | ||
class="nav-button" | ||
[class.!bg-[transparent]]="open" | ||
[class.before:!top-0]="open" | ||
[class.after:!top-0]="open" | ||
[class.before:!-rotate-45]="open" | ||
[class.after:!rotate-45]="open" | ||
[class.!bg-[transparent]]="open()" | ||
[class.before:!top-0]="open()" | ||
[class.after:!top-0]="open()" | ||
[class.before:!-rotate-45]="open()" | ||
[class.after:!rotate-45]="open()" | ||
></div> |
5 changes: 2 additions & 3 deletions
5
src/app/components/navigation-button/navigation-button.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
import { Component, Input } from '@angular/core' | ||
import { Component, input } from '@angular/core' | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'cmp-navigation-button', | ||
templateUrl: './navigation-button.component.html', | ||
}) | ||
export class NavigationButtonComponent { | ||
@Input() | ||
public open: boolean = false | ||
public readonly open = input<boolean>(false) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import { Component, Input } from '@angular/core' | ||
import { Component, input } from '@angular/core' | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'cmp-section', | ||
templateUrl: './section.component.html', | ||
}) | ||
export class SectionComponent { | ||
@Input() | ||
public first: boolean = false | ||
public readonly first = input<boolean>(false) | ||
|
||
@Input() | ||
public full: boolean = false | ||
public readonly full = input<boolean>(false) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import { Component, Input } from '@angular/core' | ||
import { Component, input } from '@angular/core' | ||
import { NgSwitch, NgSwitchCase } from '@angular/common' | ||
import { ThemeIcon } from 'shared/theme/theme.service' | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'cmp-theme-button', | ||
templateUrl: './theme-button.component.html', | ||
imports: [NgSwitch, NgSwitchCase], | ||
}) | ||
export class ThemeButtonComponent { | ||
@Input() | ||
public state: ThemeIcon | null = ThemeIcon.SYSTEM | ||
public readonly state = input<ThemeIcon | null>(ThemeIcon.SYSTEM) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.