Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cde design system #773

Open
wants to merge 8 commits into
base: cde-mvp2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apps/cde-ui/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component, inject } from '@angular/core';
import { Router, RouterOutlet } from '@angular/router';

import { HeaderComponent } from './components/header/header.component';
import { ScreenSizeNoticeComponent } from './components/screen-size-notice/screen-size-notice.component';

/** Max width to show screen size notice */
Expand All @@ -14,7 +13,7 @@ export const SCREEN_SIZE_NOTICE_MAX_HEIGHT = 832;
*/
@Component({
standalone: true,
imports: [RouterOutlet, HeaderComponent],
imports: [RouterOutlet],
selector: 'cde-root',
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
Expand Down
16 changes: 0 additions & 16 deletions apps/cde-ui/src/app/components/header/header.component.html

This file was deleted.

123 changes: 0 additions & 123 deletions apps/cde-ui/src/app/components/header/header.component.scss

This file was deleted.

21 changes: 0 additions & 21 deletions apps/cde-ui/src/app/components/header/header.component.spec.ts

This file was deleted.

47 changes: 0 additions & 47 deletions apps/cde-ui/src/app/components/header/header.component.theme.scss

This file was deleted.

18 changes: 0 additions & 18 deletions apps/cde-ui/src/app/components/header/header.component.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@for (card of cardData(); track card.label) {
<a [routerLink]="card.route" class="visual-card cta-flat" rel="noopener noreferrer">
<img [attr.src]="card.image" [alt]="card.alt" />
<div class="label">
<button class="label" mat-flat-button hraCallToActionButton hraSecondaryButton>
{{ card.label }}
<mat-icon iconPositionEnd> east </mat-icon>
</div>
<mat-icon class="material-symbols-rounded" iconPositionEnd>arrow_right_alt</mat-icon>
</button>
</a>
}
Original file line number Diff line number Diff line change
@@ -1,87 +1,57 @@
// @use '../../../styles/cta' as cta;

:host {
display: flex;
flex-wrap: wrap;
gap: 2.5rem;
column-gap: 1.75rem;
justify-content: center;
margin: 0 auto;
width: min-content;

@media (min-width: 768px) {
margin: 0;
width: auto;
}

@media (min-width: 1280px) {
justify-content: space-between;
}

.visual-card {
@media (min-width: 1012px) {
width: 24.5rem;
height: 24.5rem;
}

@media (min-width: 1920px) {
width: 30.5rem;
height: 30.5rem;
}

border-radius: 1rem;
overflow: hidden;
box-shadow: 0px 5px 1rem 0px rgba(32, 30, 61, 0.24);
box-shadow: 0px 5px 1rem 0px rgb(from var(--sys-shadow) r g b / 0.24);
outline-offset: 0;
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: center;
font-family: Metropolis;
width: 17.5rem;
height: 17.5rem;

&:hover {
box-shadow: 0px 5px 1rem 5px rgba(32, 30, 61, 0.24);
box-shadow: 0px 5px 1rem 5px rgb(from var(--sys-shadow) r g b / 0.24);
}

// &:focus-visible .label {
// @include cta.flatFocus();
// }

img {
width: 100%;
object-fit: contain;
}

.label {
display: flex;
align-items: center;
justify-content: center;
margin: auto auto;
font-size: 0.75rem;
line-height: 1.125rem;
}

mat-icon {
vertical-align: middle;
height: 1rem;
width: 1rem;
font-size: 1rem;
margin-left: 0.5rem;
}
}

@media (min-width: 768px) {
justify-content: space-between;
}

@media (min-width: 1012px) {
.visual-card {
width: 24.5rem;
height: 24.5rem;

.label {
font-size: 1rem;
line-height: 1.5rem;
}

mat-icon {
height: 1.5rem;
width: 1.5rem;
font-size: 1.5rem;
margin-left: 0.75rem;
}
}
}

@media (min-width: 1280px) {
column-gap: 2rem;
}

@media (min-width: 1920px) {
.visual-card {
width: 30.5rem;
height: 30.5rem;
margin-left: 0.25rem;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
import { MatIconModule } from '@angular/material/icon';
import { RouterModule } from '@angular/router';
import { ButtonModule } from '@hra-ui/design-system/button';

/**
* Interface for the visual card
Expand All @@ -24,7 +24,7 @@ export interface VisualCard {
@Component({
selector: 'cde-visual-card',
standalone: true,
imports: [CommonModule, MatButtonModule, MatIconModule, RouterModule],
imports: [CommonModule, ButtonModule, MatIconModule, RouterModule],
templateUrl: './visual-card.component.html',
styleUrl: './visual-card.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Loading
Loading