This commit is contained in:
2022-08-28 23:54:19 +03:00
parent d769c9f0f0
commit b3cf5cb1b7
15 changed files with 299 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="ru">
{{- partial "head.html" . -}}
<body class="bg-light">
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@@ -0,0 +1,14 @@
{{ define "main" }}
<div class="container">
<main>
<section class="bg-white border rounded shadow-sm p-3 mb-3">
{{ range .Pages.ByPublishDate.Reverse }}
<p class="my-2 p-0">
{{ .PublishDate.Format "2006-01-02" }}
<a class="text-clean" href="{{ .RelPermalink }}">{{ .Title }}</a>
</p>
{{ end }}
</section>
</main>
</div>
{{ end }}

View File

@@ -0,0 +1,34 @@
{{ define "main" }}
<div class="container">
<main>
<section class="bg-white border rounded shadow-sm p-3 mb-3 text-center">
<nav aria-label="breadcrumb">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="/">Главная</a></li>
<li class="breadcrumb-item"><a href="/posts/">Посты</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ .Title }}</li>
</ol>
</nav>
</section>
<section class="bg-white border rounded shadow-sm p-3 mb-3 text-center">
<h3 class="m-0 p-0">{{ .Title }}</h3>
<i class="d-block mt-2 text-secondary">Опубликовано: {{ time.Format "2 January 2006 г." .PublishDate }}</i>
<div class="border-top mt-3 p-3 pb-0">
{{ with .Params.tags }}
{{ range . }}
{{ $href := print (absURL "tags/") (urlize .) }}
<a class="btn btn-sm btn-outline" href="{{ $href }}">🏷️ {{ . }}</a>
{{ end }}
{{ end }}
</div>
</section>
<section class="bg-white border rounded shadow-sm p-3 mb-3">
{{ .Content }}
</section>
</main>
</div>
{{ end }}