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

WFNEWS-2493 #2152

Merged
merged 5 commits into from
Dec 17, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
<div class="highlight-thumbnail">
<img [src]="post.thumbnail.url" [alt]="post.thumbnail.alt" *ngIf="post.thumbnail.url">
</div>
<div class="highlight-tags">
<div class="highlight-tag">
Prevention
</div>
<div class="highlight-tag" *ngFor="let fireCentre of post.fireCentres">
{{fireCentre}}
</div>
</div>
<div class="highlight-info-title">
{{post.title}}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

.highlight-card {
@media screen and (max-width: 500px) {
width: 50vw;
width: 65vw;
min-width: 100px;
min-height: 370px;
}
Expand All @@ -30,6 +30,9 @@
padding: 16px;

&-title {
@media screen and (max-width: 500px) {
font-size: 18px;
}
color: var(--Secondary-800, #181A2A);
font-size: 20px;
font-style: normal;
Expand Down Expand Up @@ -57,41 +60,13 @@
img,
.thumbnail-image {
width: 100%;
height: 135px;
height: 125px;
border-radius: var(--8, 8px);
object-fit: scale-down;
background-color: #DFE5EE;
}
}

.highlight-tags {
@media screen and (max-width: 500px) {
display: none;
}
display: flex;
flex-direction: row;
align-items: center;
color: #000;
text-align: center;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 21px;
border-radius: var(--4, 4px);
flex-wrap: wrap;
margin-bottom: 8px;
}

.highlight-tag {
display: inline-block;
padding: 4px 12px;
border-radius: 4px;
font-size: 14px;
color: #333;
white-space: nowrap; // Prevents text from wrapping inside tags
background: #DFE5EE;
margin: 0 8px 8px 0;
}


.highlight-date {
left: 16px;
color: var(--Black-2, #484848);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { moduleMetadata, type Meta, type StoryObj } from '@storybook/angular';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import { Observable, of } from 'rxjs';
import { CommonModule } from '@angular/common';
import { AppConfigService } from '@wf1/core-ui';

// Mock HTTP Client
class MockHttpClient {
Expand Down Expand Up @@ -43,6 +44,13 @@ class MockHttpClient {
}
}

class MockAppConfigService {
// Provide mock methods or data as needed
getConfig() {
return of({}); // Mock response
}
}


const meta: Meta<HighlightsCardComponent> = {
title: 'Cards/HighlightsCardComponent',
Expand All @@ -56,7 +64,8 @@ const meta: Meta<HighlightsCardComponent> = {
],
declarations: [HighlightsCardComponent],
providers: [
{ provide: HttpClient, useClass: MockHttpClient }
{ provide: HttpClient, useClass: MockHttpClient },
{ provide: AppConfigService, useClass: MockAppConfigService }
]
})
]
Expand Down
Loading