docs: day 3, lw001 - self-host using railway

This commit is contained in:
Rotimi Best
2024-10-09 22:03:20 +01:00
parent 92572ed2c2
commit 7cdb2281e1
5 changed files with 58 additions and 26 deletions
@@ -27,7 +27,7 @@
<ul class="flex flex-col items-start justify-start gap-2 w-[90%] md:w-[50%]">
{#each data.posts as post}
<li class="py-10 w-full border-b border-gray-200">
<div class="flex md:flex-row flex-col md:items-center gap-2">
<div class="mb-5 flex md:flex-row flex-col md:items-center gap-2">
<!-- Date -->
<p class="text-sm text-slate-500">{formatDate(post.date)}</p>
@@ -40,7 +40,14 @@
</div>
</div>
</div>
<a href={`/blog/${post.slug}`} class="group">
<img
loading="lazy"
src={post.imageUrl}
alt={post.title}
class="w-70 h-48 object-cover rounded-md"
/>
<p class="font-bold text-lg py-2 group-hover:text-slate-500">
{@html post.title}
</p>
@@ -61,7 +68,7 @@
</div>
<PageSignupCTA
header="Ready To Launch Your First Training?"
header="Ready To Scale Your Training Efforts?"
subText="It's free to sign up and start getting value out of the product."
btnLabel="Sign me up"
link="/signup"
@@ -1,7 +1,7 @@
import type { Post } from '$lib/types';
import type { BlogPost } from '$lib/types';
export async function load({ fetch }) {
const response = await fetch('api/blog');
const posts: Post[] = await response.json();
const posts: BlogPost[] = await response.json();
return { posts };
}