first commit, mate!
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{.category}} - Blog</title>
|
||||
<link rel="stylesheet" href="/static/css/material.css">
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
<div class="header__content">
|
||||
<a href="/" class="header__logo">📝 Blog</a>
|
||||
<nav class="header__nav">
|
||||
<a href="/">Home</a>
|
||||
<a href="#about">About</a>
|
||||
<a href="/feed">RSS Feed</a>
|
||||
<a href="/dashboard">Dashboard</a>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="container" style="padding: 40px 16px;">
|
||||
<div style="margin-bottom: 40px;">
|
||||
<h1>{{.category}}</h1>
|
||||
<p style="font-size: 18px; color: var(--md-sys-color-on-surface-variant);">
|
||||
Posts in the {{.category}} category
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="max-width: 800px;">
|
||||
{{if .posts}}
|
||||
<ul class="post-list">
|
||||
{{range .posts}}
|
||||
<li class="post-item">
|
||||
<div style="display: flex; align-items: center; gap: 12px; margin-bottom: 8px;">
|
||||
<h3 class="post-title">
|
||||
<a href="/post/{{.Slug}}">{{.Title}}</a>
|
||||
</h3>
|
||||
<span class="post-type {{if eq .Type "micro"}}post-type--micro{{end}}">
|
||||
{{if eq .Type "micro"}}💬{{else}}📝{{end}} {{.Type}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="post-meta">
|
||||
<span>{{.CreatedAt.Format "2006-01-02"}}</span>
|
||||
</div>
|
||||
<p class="post-excerpt">{{.Excerpt}}</p>
|
||||
<a href="/post/{{.Slug}}" style="font-weight: 500;">Read more →</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<div style="padding: 40px; text-align: center; color: var(--md-sys-color-on-surface-variant);">
|
||||
<p>No posts in this category yet.</p>
|
||||
<a href="/" class="button button--primary" style="margin-top: 16px;">← Back to Home</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="footer__content">
|
||||
<div class="footer__section">
|
||||
<h4>Category</h4>
|
||||
<p>Browsing posts in {{.category}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer__bottom">
|
||||
<p>© 2024. Self-hosted with care.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/static/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user