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 == [0.1.3] - 2020-11-06
=== Changed === Changed

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,7 +6,8 @@
{{- range .Data.Terms }} {{- range .Data.Terms }}
{{- $pages := .Pages }} {{- $pages := .Pages }}
{{- if ge (len $pages) 1 }} {{- if ge (len $pages) 1 }}
<header id="{{ .Page.Title | urlize }}" class="taxonomy__header"> <section id="{{ .Page.Title | urlize }}">
<header class="taxonomy__header">
<h2>{{ .Page.Title }}</h2> <h2>{{ .Page.Title }}</h2>
<small>(<a href="{{ .Page.RelPermalink }}">{{ i18n "permalink" | default "Permalink" }}</a>)</small> <small>(<a href="{{ .Page.RelPermalink }}">{{ i18n "permalink" | default "Permalink" }}</a>)</small>
</header> </header>
@ -18,6 +19,7 @@
</li> </li>
{{- end }} {{- end }}
</ul> </ul>
</section>
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

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