Update the site layout

Made the resulting HTML cleaner and added a color to the border for more
personality.
This commit is contained in:
Gabriel Arazas 2020-12-23 18:20:16 +08:00
parent 1e0cf9bbd7
commit 023c34c22a
8 changed files with 32 additions and 14 deletions

View File

@ -17,6 +17,16 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version
== Unreleased
=== Changed
* Clean the layouts.
* Change the style of the horizontal rule with colors.
== [0.1.3] - 2020-11-06
=== Changed

View File

@ -122,6 +122,10 @@ mark {
}
}
hr {
border-color: var(--base0C);
}
/* Multimedia blocks */
img, video, audio, iframe {

View File

@ -17,7 +17,7 @@
font-family: var(--body-family);
font-size: var(--font-size);
background: var(--base00);
color: var(--base06);
color: var(--base05);
line-height: var(--vertical-rhythm);
margin: 0;
padding: 0;

View File

@ -4,7 +4,9 @@
<body>
{{- partial "components/theme-button.html" . }}
{{- partial "header.html" . -}}
<hr>
{{- block "main" . }}{{- end }}
<hr>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -1,6 +1,7 @@
{{ define "main" }}
<hr>
<section>
{{ .Content }}
</section>
{{- /* The homepage should show only pages from the given sections (with `$.Site.Params.mainSections`).
Otherwise, we take the pages of a section. */ -}}

View File

@ -10,7 +10,7 @@
{{ if (and $is_toc (gt (countrunes .TableOfContents) 0)) }}
<style>
#TableOfContents:not(:empty)::before {
content: "{{ i18n "table_of_contents" }}";
content: "{{ i18n "table_of_contents" | default "Table of contents" }}";
font-weight: bold;
}
</style>

View File

@ -6,18 +6,20 @@
{{- range .Data.Terms }}
{{- $pages := .Pages }}
{{- if ge (len $pages) 1 }}
<header id="{{ .Page.Title | urlize }}" class="taxonomy__header">
<h2>{{ .Page.Title }}</h2>
<small>(<a href="{{ .Page.RelPermalink }}">{{ i18n "permalink" | default "Permalink" }}</a>)</small>
</header>
<ul class="taxonomy__pages">
{{- range $pages }}
<li class="taxonomy__page">
<section id="{{ .Page.Title | urlize }}">
<header class="taxonomy__header">
<h2>{{ .Page.Title }}</h2>
<small>(<a href="{{ .Page.RelPermalink }}">{{ i18n "permalink" | default "Permalink" }}</a>)</small>
</header>
<ul class="taxonomy__pages">
{{- range $pages }}
<li class="taxonomy__page">
<date datetime="{{ .PublishDate }}">{{ .PublishDate.Format "2006-01-02" }}</date>
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
</li>
{{- end }}
</ul>
</li>
{{- end }}
</ul>
</section>
{{- end }}
{{- end }}

View File

@ -1,4 +1,3 @@
<hr>
<footer>
<!-- A convenient back to top link. -->
<p><a href="#top">{{ i18n "back_to_top" | default "Back to top" }}</a></p>