48 lines
1.6 KiB
HTML
48 lines
1.6 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Home{% endblock title %}
|
|
|
|
{% block content %}
|
|
<div class="space-y-2">
|
|
<div class="flex flex-wrap items-center justify-between gap-3">
|
|
<div>
|
|
<h1 class="text-2xl font-bold">Universal Web</h1>
|
|
<p class="text-sm opacity-70">Latest updates from the site.</p>
|
|
</div>
|
|
<a href="/blog" class="btn btn-ghost btn-sm">All posts</a>
|
|
</div>
|
|
|
|
<section class="pt-4">
|
|
{% if articles | length > 0 %}
|
|
<div class="grid gap-4">
|
|
{% for article in articles %}
|
|
<article class="card border border-base-300 bg-base-100 shadow-sm">
|
|
<div class="card-body">
|
|
<div class="flex flex-wrap items-center justify-between gap-2">
|
|
<h2 class="card-title text-base">
|
|
<a href="/blog/{{ article.slug }}">{{ article.title }}</a>
|
|
</h2>
|
|
<span class="badge">Post</span>
|
|
</div>
|
|
{% if article.excerpt %}
|
|
<p class="text-sm leading-relaxed opacity-80">{{ article.excerpt }}</p>
|
|
{% endif %}
|
|
<div class="pt-2">
|
|
<a href="/blog/{{ article.slug }}" class="btn btn-neutral btn-sm">Read</a>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="card border border-base-300 bg-base-100 shadow-sm">
|
|
<div class="card-body text-center">
|
|
<p class="font-medium">No published posts yet.</p>
|
|
<p class="text-sm opacity-70">Check back later.</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</section>
|
|
</div>
|
|
{% endblock content %}
|