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

Dashboard index page cosmetic tweaks #915

Merged
merged 2 commits into from
Jan 22, 2025
Merged
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
2 changes: 1 addition & 1 deletion apps/dashboard-ui/src/styles/themes/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $typography: mat.m2-define-typography-config(
$subtitle-1: mat.m2-define-typography-level(16px, 24px, 500),
$subtitle-2: mat.m2-define-typography-level(24px, 36px, 500),
$body-1: mat.m2-define-typography-level(20px, 30px, 400, 'Nunito Sans', $letter-spacing: 0.07em),
$body-2: mat.m2-define-typography-level(16px, 24px, 500, 'Nunito Sans', $letter-spacing: 0.07em),
$body-2: mat.m2-define-typography-level(18px, 27px, 500, 'Nunito Sans', $letter-spacing: 0.05em),
$button: mat.m2-define-typography-level(16px, 24px, 500),
$caption: mat.m2-define-typography-level(16px, 24px, 500, $letter-spacing: 0.005em),
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<main>
<main class="content">
<h2 class="title">{{ spec().title }}</h2>
<h4 class="description mat-body-2">{{ spec().description }}</h4>
<div class="cards">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
:host {
max-width: 102rem;
margin: 0 auto;
display: block;

main {
max-width: calc(100% - 2rem);
margin: 0 auto;
.content {
display: flex;
flex-direction: column;
align-items: center;
max-width: 91rem;
margin: auto;
padding: 0 1rem 7rem;

.title {
margin-bottom: 0.5rem;
text-align: center;
}

.description {
Expand All @@ -20,53 +23,8 @@
display: flex;
flex-wrap: wrap;
max-width: 100%;
gap: 0;
justify-content: space-between;
margin-bottom: 7rem;
}
}

@media (max-width: 1440px) {
main {
.description {
margin-bottom: 4rem;
}
}
}

@media (max-width: 1280px) {
main {
.description {
margin-bottom: 3rem;
}
}
}

@media (max-width: 1012px) {
main {
.cards {
gap: 3rem;
justify-content: unset;
}
}
}

@media (max-width: 768px) {
main {
.title {
font-size: 2.375rem;
line-height: 3.5625rem;
letter-spacing: -1.75px;
}
}
}

@media (max-width: 544px) {
main {
.cards {
flex-direction: column;
align-items: center;
}
justify-content: center;
gap: 3.5rem;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<a [routerLink]="['/', spec().route]" class="long-card cta-flat" rel="noopener noreferrer">
<img [attr.src]="spec().background" alt="Image of {{ spec().title }}" />
<img [attr.src]="spec().background" alt="" />
<div class="label">
{{ spec().title }}
<mat-icon iconPositionEnd class="material-symbols-rounded"> arrow_right_alt </mat-icon>
</div>
</a>
Original file line number Diff line number Diff line change
@@ -1,58 +1,40 @@
:host {
.long-card {
--mdc-text-button-label-text-color: #b20a2f;
--mat-text-button-hover-state-layer-opacity: 0;
display: flex;
flex-direction: column;
width: 14.5rem;
align-items: center;
width: 14rem;
height: 42rem;
border-radius: 1rem;
overflow: hidden;
background-color: white;
box-shadow: 0px 5px 20px 0px rgba(32, 30, 61, 0.24);
outline-offset: 0;
background-color: white;
overflow: hidden;
cursor: pointer;

&:hover {
box-shadow: 0px 5px 20px 0px rgba(32, 30, 61, 0.32);
}

&:active {
box-shadow: 0px 5px 20px 0px rgba(32, 30, 61, 0.32);
}

&:hover,
&:active,
&:focus-visible {
box-shadow: 0px 5px 20px 0px rgba(32, 30, 61, 0.32);
}

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

.label {
width: fit-content;
--mdc-text-button-label-text-color: #b20a2f;
--mat-text-button-hover-state-layer-opacity: 0;

display: flex;
align-items: center;
margin: auto 1.5rem;
margin: auto auto;
font-family: 'Metropolis';
font-size: 1.25rem;
line-height: 1.875rem;
letter-spacing: normal;
}

mat-icon {
vertical-align: middle;
margin-left: 0.25rem;
}
}

@media (max-width: 544px) {
justify-content: center;
}

@media (min-width: 1441px) {
.long-card {
width: 17rem;
height: 51rem;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ describe('LongCardComponent', () => {
});

const cardTitle = screen.getByText('Card Title');
const cardImage = screen.getByAltText('Image of Card Title');

expect(cardTitle).toBeInTheDocument();
expect(cardImage).toHaveAttribute('src', 'https://example.com/image.jpg');
});
});
Loading