Skip to content
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
48 changes: 24 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"linkedom": "^0.18.13",
"parse-github-url": "^1.0.4",
"prettier": "^3.9.6",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-astro": "^1.0.0",
"reading-time": "^1.5.0",
"starlight-blog": "^0.29.0",
"starlight-links-validator": "^0.26.0",
Expand Down
204 changes: 102 additions & 102 deletions src/components/Footer.astro

Large diffs are not rendered by default.

13 changes: 5 additions & 8 deletions src/components/GuideReadingTime.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@ guideReadingTime = Math.ceil(guideReadingTime);
---

<p class="sl-flex">
<Icon name="seti:clock" /> This {slug === 'guide' || slug === 'guide/' ? 'guide' : 'module'} will take you approximately

{
guideReadingTime >= 60
? `${Math.floor(guideReadingTime / 60)} h ${Math.ceil(guideReadingTime % 60)} min`
: `${guideReadingTime} min`
}

<Icon name="seti:clock" /> This {slug === 'guide' || slug === 'guide/' ? 'guide' : 'module'} will take you
approximately
{guideReadingTime >= 60
? `${Math.floor(guideReadingTime / 60)} h ${Math.ceil(guideReadingTime % 60)} min`
: `${guideReadingTime} min`}
to read.
</p>

Expand Down
6 changes: 4 additions & 2 deletions src/components/Head.astro
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ if (isArticle) {
// Please note that "og:type" is forced to "article" by Starlight and can't be changed.
---

<Default {...Astro.props}><slot /></Default>
<Default {...Astro.props}>
<slot />
</Default>

<meta name="author" content="Open {re}Source" />
<meta name="fediverse:creator" content="@openresource@fosstodon.org" />
Expand All @@ -79,4 +81,4 @@ if (isArticle) {

<link href="https://fosstodon.org/@openresource" rel="me" />

{articleSchema && <script is:inline type="application/ld+json" set:html={articleSchema} />}
{articleSchema && <script is:inline type="application/ld+json" set:html={articleSchema}></script>}
34 changes: 17 additions & 17 deletions src/components/PageTitleThenReadingTime.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ const displayReadingTime = isGuide && date;
const displayDate = date && isGuide;
---

<Default {...Astro.props}><slot /></Default>
<Default {...Astro.props}>
<slot />
</Default>

{
(displayDate || displayReadingTime) && (
<div class="sl-text-sm sl-flex">
{displayDate && (
<p>
<time datetime={date.toISOString()}>
{date.toLocaleDateString(lang, { dateStyle: 'medium', timeZone: 'UTC' })}
</time>
</p>
)}
{displayReadingTime && (
<span class="reading-time">&nbsp;-&nbsp;{Math.ceil(readingTime(entry.body || '').minutes)} min read</span>
)}
</div>
)
}
{(displayDate || displayReadingTime) && (
<div class="sl-text-sm sl-flex">
{displayDate && (
<p>
<time datetime={date.toISOString()}>
{date.toLocaleDateString(lang, { dateStyle: 'medium', timeZone: 'UTC' })}
</time>
</p>
)}
{displayReadingTime && (
<span class="reading-time">&nbsp;-&nbsp;{Math.ceil(readingTime(entry.body || '').minutes)} min read</span>
)}
</div>
)}

<style>
.reading-time {
Expand Down
1 change: 0 additions & 1 deletion src/components/ProgressScroll.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

---

<div class="progress-scroll-container" aria-hidden="true">
Expand Down
22 changes: 10 additions & 12 deletions src/components/Showcase.astro
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,16 @@ function shuffleLinks(links: ShowcaseLink[]): ShowcaseLink[] {
---

<CardGrid>
{
allShowcaseLinks.map((link: ShowcaseLink) => {
if (link.type === 'github_repo') {
return (
<ShowcaseGitHubRepo env={link.owner} repo={link.name} description={link.description} img={link.avatarUrl} />
);
} else if (link.type === 'github') {
return <LinkCard href={link.url} title={link.url} description="Visit this GitHub link" />;
}
return <LinkCard href={link.url} title={link.url} description="Visit this GitLab link" />;
})
}
{allShowcaseLinks.map((link: ShowcaseLink) => {
if (link.type === 'github_repo') {
return (
<ShowcaseGitHubRepo env={link.owner} repo={link.name} description={link.description} img={link.avatarUrl} />
);
} else if (link.type === 'github') {
return <LinkCard href={link.url} title={link.url} description="Visit this GitHub link" />;
}
return <LinkCard href={link.url} title={link.url} description="Visit this GitLab link" />;
})}
</CardGrid>

<ShowcaseBanner />
18 changes: 9 additions & 9 deletions src/components/ShowcaseBanner.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import Button from './Button.astro';

<section class="showcase-banner">
<Card title="Showcase your projects">
<p><strong>Explore what the Open &#123;re&#125;Source community builds for the open source world.</strong></p>
<p>
<strong>Explore what the Open &#123;re&#125;Source community builds for the open source world.</strong>
</p>
<p style="margin-top: 0px">
Submit your open-source project(s), profiles or websites to the showcase and let the community discover your work.
</p>
Expand All @@ -16,14 +18,12 @@ import Button from './Button.astro';
Submit your project(s)
<Icon name="external" />
</Button>
{
showProjectsButton && (
<Button class="action action-secondary action-minimal" href="/showcase">
Show projects
<Icon name="right-arrow" />
</Button>
)
}
{showProjectsButton && (
<Button class="action action-secondary action-minimal" href="/showcase">
Show projects
<Icon name="right-arrow" />
</Button>
)}
</div>
</Card>
</section>
Expand Down
47 changes: 23 additions & 24 deletions src/components/SupportThenPagination.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,30 @@ import Default from '@astrojs/starlight/components/Pagination.astro';
const { editUrl } = Astro.locals.starlightRoute.entry.data;
---

{
editUrl && (
<div>
<p>
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 2023-present © Open
&lcub;re&rcub;Source
</p>
<p>
<strong>Found something valuable on this page?</strong>
<br />
Show your support by{' '}
<a href="https://github.com/Open-reSource/openresource.dev">dropping us a star on GitHub</a>. Your support helps
us grow and reach more people!
</p>
<p>
<strong>Found a typo, a grammar error or a broken link?</strong>
<br />
Or this article is missing something important? Please{' '}
<a href="https://github.com/Open-reSource/openresource.dev/issues/new/choose">create an issue on GitHub</a>.
</p>
</div>
)
}
{editUrl && (
<div>
<p>
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 2023-present © Open
&lcub;re&rcub;Source
</p>
<p>
<strong>Found something valuable on this page?</strong>
<br />
Show your support by <a href="https://github.com/Open-reSource/openresource.dev">dropping us a star on GitHub</a>.
Your support helps us grow and reach more people!
</p>
<p>
<strong>Found a typo, a grammar error or a broken link?</strong>
<br />
Or this article is missing something important? Please{' '}
<a href="https://github.com/Open-reSource/openresource.dev/issues/new/choose">create an issue on GitHub</a>.
</p>
</div>
)}

<Default {...Astro.props}><slot /></Default>
<Default {...Astro.props}>
<slot />
</Default>

<style>
div {
Expand Down
Loading