feat: add SCSS styles and HTML templates for blog layout
This commit is contained in:
committed by
Evrard Van Espen (aider)
parent
2d9eabc53f
commit
fdccf7d0ac
0
templates/#post.html#
Normal file
0
templates/#post.html#
Normal file
34
templates/layout.html
Normal file
34
templates/layout.html
Normal 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>
|
||||
13
templates/parts/header.html
Normal file
13
templates/parts/header.html
Normal 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>
|
||||
22
templates/parts/index.html
Normal file
22
templates/parts/index.html
Normal 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>
|
||||
22
templates/parts/tagPage.html
Normal file
22
templates/parts/tagPage.html
Normal 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>
|
||||
Reference in New Issue
Block a user