created rssfeed component to get the last 5 commits.
Some checks failed
Vercel Preview Deployment / Deploy-Preview (push) Failing after 1m9s

Todo:
- break into components and style
- get time of commit
- convert time of commit to __time since__
This commit is contained in:
christian 2024-05-18 22:52:43 +02:00
parent 33ec24e6b1
commit 1d1892c931
3 changed files with 20 additions and 9 deletions

View File

@ -1,7 +1,7 @@
<script> <script>
import { onMount } from 'svelte'; import { onMount } from 'svelte';
const url = 'https://gitea.rannes.dev/rannes.dev/local-weather.rss'; const url = 'https://gitea.rannes.dev/rannes.dev/my-portfolio.rss';
let feed = null; let feed = null;
let error = null; let error = null;
@ -37,10 +37,10 @@
<p>Loading...</p> <p>Loading...</p>
{:else} {:else}
<div> <div>
{#each feed as item} {#each feed.slice(0, 5) as item}
<div> <div>
<h3>{item.title}</h3> <h3>{@html item.title}</h3>
<p>{item.description}</p> <p>{@html item.description}</p>
<a href={item.link} target="_blank">Read more</a> <a href={item.link} target="_blank">Read more</a>
</div> </div>
{/each} {/each}

View File

@ -1,6 +1,15 @@
<script>
import RssFeed from '../lib/RssFeed.svelte';
</script>
<div class="main-container text-center"> <div class="main-container text-center">
<h1 class="text-xl mb-2">Welcome to my corner of the internet</h1> <h1 class="text-xl mb-2">Welcome to my corner of the internet</h1>
<p>You most likely ended up here after listening to me rambling about the wonders of self hosted services, and how life would be much easier if we could just containerize everything. <p>
</p> You most likely ended up here after listening to me rambling about the wonders of self hosted
<p class="italic text-sm mt-8">This page is my initial svelte project to try out the framework, and at the time of writing (24th April 2024) many pages are still lacking content.</p> services, and how life would be much easier if we could just containerize everything.
</div> </p>
<p class="italic text-sm mt-8">
This page is my initial svelte project to try out the framework, and at the time of writing
(24th April 2024) many pages are still lacking content.
</p>
</div>

View File

@ -1,5 +1,6 @@
<script> <script>
import { fade } from 'svelte/transition'; import { fade } from 'svelte/transition';
import RssFeed from '../../lib/RssFeed.svelte';
</script> </script>
<div in:fade> <div in:fade>
@ -18,4 +19,5 @@
>Read more about that here.</a >Read more about that here.</a
> >
</p> </p>
<RssFeed />
</div> </div>