Skip to content

Commit b0bd75b

Browse files
authored
Inserted planet dyne last issue into homepage (#189)
1 parent 8a46776 commit b0bd75b

3 files changed

Lines changed: 75 additions & 20 deletions

File tree

src/components/Newsletter.astro

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,31 @@ interface Props {
77
const { intro, href } = Astro.props;
88
---
99

10-
11-
<div class="flex flex-col gap-y-8 py-8">
12-
<div class="grid grid-cols lg:grid-cols-1 gap-6 px-8">
13-
<div
14-
class="transition duration-500 ease-in-out transform shadow-2xl border-4 border-baccent hover:border-accent hover:shadow-none hover:bg-white hover:bg-opacity-50 rounded-[40px] p-7 space-y-4"
15-
>
16-
<div class="text-4xl md:text-5xl lg:text-6xl text-saccent">
17-
<p><strong>Planet Dyne</strong></p>
18-
</div>
19-
{intro && <p class="text-3xl text-inter !text-saccent">{intro}</p>}
20-
<div class="flex flex-wrap gap-4">
21-
<a href={href} class="text-white cursor-pointer bg-accent border-2 border-accent hover:bg-saccent hover:text-white hover:border-saccent py-2 px-4 rounded-full w-fit text-2xl whitespace-nowrap ">Get the newsletter</a> <a href="/linktree" class="text-accent cursor-pointer border-2 border-accent hover:bg-saccent hover:text-white hover:border-saccent py-2 px-4 rounded-full w-fit text-2xl whitespace-nowrap ">Join our community</a>
22-
</div>
23-
<div>
24-
<slot />
25-
</div>
10+
<div class="flex flex-col gap-y-8 py-8">
11+
<div class="grid grid-cols lg:grid-cols-1 gap-6 px-8">
12+
<div
13+
class="transition duration-500 ease-in-out transform shadow-2xl border-4 border-baccent hover:border-accent hover:shadow-none hover:bg-white hover:bg-opacity-50 rounded-[40px] p-7 space-y-4"
14+
>
15+
<div class="text-4xl md:text-5xl lg:text-6xl text-saccent">
16+
<p><strong>Planet Dyne</strong></p>
17+
</div>
18+
{intro && <p class="text-3xl text-inter !text-saccent">{intro}</p>}
19+
<div class="flex flex-wrap gap-4 items-center">
20+
<a
21+
href={href}
22+
class="text-white cursor-pointer bg-accent border-2 border-accent hover:bg-saccent hover:text-white hover:border-saccent py-2 px-4 rounded-full w-fit text-2xl whitespace-nowrap"
23+
>Get the newsletter</a
24+
>
25+
<a
26+
href="/linktree"
27+
class="text-accent cursor-pointer border-2 border-accent hover:bg-saccent hover:text-white hover:border-saccent py-2 px-4 rounded-full w-fit text-2xl whitespace-nowrap"
28+
>Join our community</a
29+
>
30+
<p class="text-3xl text-inter !text-saccent">Latest issue:</p>
31+
</div>
32+
<div>
33+
<slot />
2634
</div>
2735
</div>
2836
</div>
29-
</a>
37+
</div>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
const { creator, title, link } = Astro.props;
3+
const snippet = Astro.props['content:encodedSnippet'];
4+
const media = Astro.props['media:content'];
5+
---
6+
7+
<div class="transition duration-500 ease-in-out transform">
8+
<div class="w-full pb-4 h-full flex flex-col">
9+
<a href={link}>
10+
<figure class="w-full mb-4">
11+
<img class="w-full" src={media['$'].url} />
12+
</figure>
13+
</a>
14+
<div>
15+
<div class="text-4xl md:text-5xl lg:text-6xl text-saccent">
16+
<a href={link}><p><strong>{title}</strong></p></a>
17+
</div>
18+
<div class="py-4">
19+
by <span class="font-medium">{creator}</span>
20+
</div>
21+
22+
<p class="text-gray-800 mb-2 text-clip overflow-hidden max-h-20">
23+
{snippet}
24+
</p>
25+
</div>
26+
<a
27+
href="/blog"
28+
class="mt-4 text-accent cursor-pointer border-2 border-accent hover:bg-saccent hover:text-white hover:border-saccent py-2 px-4 rounded-full w-fit text-2xl whitespace-nowrap"
29+
>More newsletter issues</a
30+
>
31+
</div>
32+
</div>

src/pages/index.astro

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,19 @@ import Supports from '~/components/homepage/Supports.astro';
1111
import Button from '~/components/Button.astro';
1212
import SoftwareAnnouncement from '~/components/SoftwareAnnouncement.astro';
1313
import Newsletter from '~/components/Newsletter.astro';
14+
import BlogArticlePreviewHome from '~/components/homepage/BlogArticlePreviewHome.astro';
1415
1516
import Banner from '~/assets/dynebolic-banner.svg?raw';
1617
import Svg from '~/components/Svg.astro';
18+
19+
import Parser from 'rss-parser';
20+
21+
const parser = new Parser({
22+
customFields: {
23+
item: ['media:content'],
24+
},
25+
});
26+
const feed = await parser.parseURL('https://news.dyne.org/tag/planet-dyne/rss/');
1727
---
1828

1929
<Layout title="Dyne.org">
@@ -22,16 +32,21 @@ import Svg from '~/components/Svg.astro';
2232

2333
<Section id="who-we-are" title="Who we are" cls="-mt-40 p-4 pt-40 lg:pt-14 -z-1">
2434
<span slot="description">
25-
Dyne.org is a vibrant think-and-do tank composed of passionate individuals, innovative projects, and dedicated organisations. Together, we are committed to safeguarding and promoting civil liberties, decentralisation, free and open-source software, and the natural environment. Think of us as a connected ecosystem that unites people, communities, and technology, dismantling barriers and fostering collaboration across borders and tech platforms. Our shared aim is to create a bright future where digital rights flourish and are well protected.
35+
Dyne.org is a vibrant think-and-do tank composed of passionate individuals, innovative projects, and dedicated
36+
organisations. Together, we are committed to safeguarding and promoting civil liberties, decentralisation, free
37+
and open-source software, and the natural environment. Think of us as a connected ecosystem that unites people,
38+
communities, and technology, dismantling barriers and fostering collaboration across borders and tech platforms.
39+
Our shared aim is to create a bright future where digital rights flourish and are well protected.
2640
</span>
2741
<WhoWeAre />
2842
</Section>
2943

3044
<Stats />
3145
<Newsletter
32-
intro="Stay ahead of the curve: subscribe now to receive our latest updates. Don’t miss out on expert insights and trending innovations!"
33-
href="https://news.dyne.org/#/portal/signup"
46+
intro="Stay ahead of the curve: subscribe now to receive our latest updates. Don’t miss out on expert insights and trending innovations!"
47+
href="https://news.dyne.org/#/portal/signup"
3448
>
49+
<BlogArticlePreviewHome {...feed.items[0]} />
3550
</Newsletter>
3651

3752
<SoftwareAnnouncement

0 commit comments

Comments
 (0)