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>
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 error = null;
@ -37,10 +37,10 @@
<p>Loading...</p>
{:else}
<div>
{#each feed as item}
{#each feed.slice(0, 5) as item}
<div>
<h3>{item.title}</h3>
<p>{item.description}</p>
<h3>{@html item.title}</h3>
<p>{@html item.description}</p>
<a href={item.link} target="_blank">Read more</a>
</div>
{/each}

View File

@ -1,6 +1,15 @@
<script>
import RssFeed from '../lib/RssFeed.svelte';
</script>
<div class="main-container text-center">
<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>
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 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>
<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>
import { fade } from 'svelte/transition';
import RssFeed from '../../lib/RssFeed.svelte';
</script>
<div in:fade>
@ -18,4 +19,5 @@
>Read more about that here.</a
>
</p>
<RssFeed />
</div>