Skip to content

Commit 32c5a62

Browse files
committed
Merge torrust/torrust-website#147: fix svelte check warnings
7caf368 fix svelte check warnings (MacBook air) Pull request description: * Added a date property to a `BlogPostCard`. The modification is made to include an optional `date` property with an empty string as its default value. This change is reflected in two different places in the codebase. * Updated the `ProjectCard` component by renaming the `repo` prop to `repoURL` for clarity. The modification is made to improve the readability and understanding of the prop, aligning it with a more descriptive name. * Introduced the `id` prop in the `ContentSection` component, initialising it with an empty string. This modification aims to provide more flexibility and control over the identification of content sections while retaining the existing properties such as title, description, and align. * Updated usage of the `Hero` component within the story file. The change replaces the initial usage without explicit features and posts properties with an updated usage specifying the `hasFeatures` and `hasPosts` properties: This modification ensures that the `Hero` component is utilised with specific feature and post properties for more accurate representation and testing in the story. * Modified the instantiation of the `BlogPostCard` component within a loop, adding the date property. ``` <BlogPostCard title={post.title} coverImage={post.coverImage} excerpt={post.excerpt} readingTime={post.readingTime} slug={post.slug} tags={post.tags} date={post.date} /> ``` ACKs for top commit: josecelano: ACK 7caf368 Tree-SHA512: 36cc925c98f7b75cc9b969ebd475e7d07763108ca9eaaf134cc0cf3197026c59da563e2bc59b91b4c27b8dd528aa6dccca9a2406bdc0f13a6452c6f2c69cd96f
2 parents bc43469 + 7caf368 commit 32c5a62

File tree

7 files changed

+11
-4
lines changed

7 files changed

+11
-4
lines changed

src/lib/components/molecules/BlogPostCard.story.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
excerpt="This is a blog post"
1717
tags={['Tag 1', 'Tag 2']}
1818
readingTime="5 min read"
19+
date=""
1920
/>
2021
</Hst.Variant>
2122

@@ -26,6 +27,7 @@
2627
excerpt="This is a blog post"
2728
tags={['Tag 1', 'Tag 2']}
2829
readingTime="5 min read"
30+
date=""
2931
/>
3032
</Hst.Variant>
3133
</div>

src/lib/components/molecules/CodeBlock.story.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
1010
let props: NoUndefinedField<ComponentProps<CodeBlock>> = {
1111
filename: '+page.svelte',
12-
lang: 'svelte'
12+
lang: 'svelte',
13+
fullBleed: false
1314
};
1415
</script>
1516

src/lib/components/molecules/ProjectCard.story.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<Hst.Story title="Molecules/Project Card">
1212
<div style="padding: 12px;">
1313
<Hst.Variant title="Default">
14-
<ProjectCard title="Torrust Tracker" repo="https://github.com/torrust/torrust-tracker">
14+
<ProjectCard title="Torrust Tracker" repoURL="https://github.com/torrust/torrust-tracker">
1515
<div class="project-content" slot="content">
1616
<p>
1717
Torrust Tracker is a lightweight but incredibly high-performance and feature-rich

src/lib/components/molecules/ThemeToggle.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@
109109
stroke: var(--color--text);
110110
stroke-width: 2px;
111111
transform-origin: center center;
112-
transition: all 0.5s var(--ease-elastic-4), opacity var(--_opacity-dur) var(--ease-3);
112+
transition:
113+
all 0.5s var(--ease-elastic-4),
114+
opacity var(--_opacity-dur) var(--ease-3);
113115
}
114116
115117
#moon > circle {

src/lib/components/organisms/ContentSection.story.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
export let Hst: HstType;
1010
1111
let props: NoUndefinedField<ComponentProps<ContentSection>> = {
12+
id: '',
1213
title: 'Content Section',
1314
description: 'This is a section of content that can be used in a bunch of places',
1415
align: 'top'

src/lib/components/organisms/Hero.story.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
</script>
88

99
<Hst.Story title="Organisms/Hero" layout={{ type: 'single', iframe: true }}>
10-
<Hero />
10+
<Hero hasFeatures={true} hasPosts={true} />
1111
</Hst.Story>

src/routes/(waves)/blog/+page.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
readingTime={post.readingTime}
2424
slug={post.slug}
2525
tags={post.tags}
26+
date={post.date}
2627
/>
2728
{/each}
2829
</div>

0 commit comments

Comments
 (0)