Update the theme

This commit is contained in:
Gabriel Arazas 2020-10-21 11:28:02 +08:00
parent d9ece82910
commit 2b5b98df3e
9 changed files with 44 additions and 9 deletions

View File

@ -1,5 +1,5 @@
---
title: "{{ replace .Name "-" " " | title }}"
title: "{{ humanize .Name }}"
date: {{ .Date }}
draft: true
@ -10,7 +10,7 @@ tags:
- "tag2"
---
= {{ replace .Name "-" " " | title }}
= {{ humanize .Name }}
{{ .Site.Author.name }} {{ with .Site.Author.email }}<{{ . }}>{{ end }}
{{ dateFormat "2006-01-02 15:04 -0700" .Date }}
{{ dateFormat "2006-01-02 15:04:05 -0700" .Date }}
:stem: latexmath

View File

@ -1,5 +1,5 @@
---
title: "{{ replace .Name "-" " " | title }}"
title: "{{ humanize .Name }}"
date: {{ .Date }}
draft: true

View File

@ -9,11 +9,12 @@
/* The fonts. */
--body-family: serif;
--header-family: sans-serif;
--mono-family: monospace;
/* Spacing options. */
--font-size: 20px;
--vertical-rhythm: 24px;
--content-width: 900px;
--content-width: 750px;
--border-style: var(--foreground) solid 1px;
}
@ -73,6 +74,7 @@ a:visited {
}
code {
font-family: var(--mono-family);
font-size: 0.9em;
}
@ -104,6 +106,7 @@ tr:nth-child(even) {
pre {
background: var(--background-light);
border: var(--background) solid 1px;
font-family: var(--mono-family);
font-size: 1rem;
line-height: 1.5;
margin-top: 1rem;
@ -259,3 +262,11 @@ footer {
margin-bottom: 1rem;
}
}
/* Automatic color scheme detection */
@media (prefers-color-scheme: dark) {
:root {
}
}
/* Table of contents autogenerated from Hugo */

View File

@ -25,8 +25,11 @@ other = "Updated"
[available_translations]
other = "Translations"
[table_of_contents]
other = "Table of contents"
# General
# General
[and]
other = "and"
@ -35,3 +38,6 @@ other = "Back to home"
[multilingual]
other = "Available in other languages"
[page_not_found]
other = "Page not found"

View File

@ -25,6 +25,9 @@ other = "Binago noong"
[available_translations]
other = "Mga pagsasalin"
[table_of_contents]
other = "Talaan ng nilalaman"
# General
[and]
@ -35,3 +38,6 @@ other = "Balik sa homepage"
[multilingual]
other = "Ibang lengwahe"
[page_not_found]
other = "Hindi makita ang webpage na hinahanap mo"

View File

@ -1,3 +1,4 @@
{{ define "main" }}
<h1>404</h1>
{{ end }}
<h2>404</h2>
<p>{{ i18n "page_not_found" }}</p>
{{ end }}

View File

@ -2,10 +2,13 @@
<hr>
{{ .Content }}
{{- /* The homepage should show only pages from the given sections (with `$.Site.Params.mainSections`).
Otherwise, we take the pages of a section. */ -}}
{{ $pages := .Pages }}
{{ if .IsHome }}
{{ $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
{{ end }}
{{ range (where (.Paginate $pages).Pages "Params.hidden" "!=" true) }}
<article class="post">
<a href="{{ .Permalink }}" aria-label="{{ .Title }}"><h1>{{ .Title }}</h1></a>

View File

@ -35,6 +35,12 @@
{{ $is_toc := cond (ne .Params.toc nil) .Params.toc $.Site.Params.toc }}
{{ if $is_toc }}
<style>
#TableOfContents:not(:empty)::before {
content: "{{ i18n "table_of_contents" }}";
font-weight: bold;
}
</style>
{{ .TableOfContents }}
{{ end }}

View File

@ -1,5 +1,7 @@
<title>{{ if .IsHome }}{{ $.Site.Title | safeHTML }}{{ else }}{{ .Title | safeHTML }}{{ end }}</title>
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}" />
{{- $style := resources.Get "css/main.css" | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{- /* Some sane <meta> tags default */ -}}
{{ hugo.Generator }}