feat: add SCSS styles and HTML templates for blog layout

This commit is contained in:
Evrard Van Espen
2025-10-30 10:04:44 +00:00
committed by Evrard Van Espen (aider)
parent 2d9eabc53f
commit fdccf7d0ac
6 changed files with 286 additions and 0 deletions

0
templates/#post.html# Normal file
View File

34
templates/layout.html Normal file
View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Evrard Van Espen</title>
<style>
{{ .Css }}
</style>
</head>
<body>
{{ template "header.html" . }}
{{ .Hero }}
<main id="page">
<div id="content">
{{ .Content }}
</div>
{{ if .ShowSidebar }}
<div id="sidebar">
<h2>Tags</h2>
<div id="tags">
{{ range .Tags }}
<a href="/tags/{{ . }}.html">{{ . }}</a>
{{ end }}
</div>
</div>
{{ end }}
</main>
</body>
</html>

View File

@@ -0,0 +1,13 @@
<header>
<div id="logo">
<a href="/">
<h1>Evrard Van Espen</h1>
</a>
</div>
<div id="nav">
<a href="/">Articles</a>
<!-- <a href="/">CV</a>
<a href="/">Contact</a> -->
</div>
</header>

View File

@@ -0,0 +1,22 @@
<section id="posts">
<h2 class="section-title">~ Posts</h2>
{{ range .Posts }}
<div class="article">
<a href="{{ .PathHtml }}">
<article>
<p class="date">{{ .DateStr }}</p>
<div class="right">
<h3>{{ .Title }}</h3>
<p class="description">{{ .Description }}</p>
<p class="reading-time">{{ .ReadTime }} minutes read</p>
<div class="article-tags">
{{ range .Tags }}
<div class="tag">{{ . }}</div>
{{ end }}
</div>
</div>
</article>
</a>
</div>
{{end}}
</section>

View File

@@ -0,0 +1,22 @@
<section id="posts-by-tag">
<h2>~ Articles taggés "{{ .Tag }}"</h2>
{{ range .Posts }}
<div class="article">
<a href="{{ .PathHtml }}">
<article>
<p class="date">{{ .DateStr }}</p>
<div class="right">
<h3>{{ .Title }}</h3>
<p class="description">{{ .Description }}</p>
<p class="reading-time">{{ .ReadTime }} minutes de lecture</p>
<div class="article-tags">
{{ range .Tags }}
<div class="tag">{{ . }}</div>
{{ end }}
</div>
</div>
</article>
</a>
</div>
{{end}}
</section>