diff options
author | goodroot <root@goodroot.ca> | 2019-08-20 03:45:16 +0300 |
---|---|---|
committer | goodroot <root@goodroot.ca> | 2019-08-20 03:45:16 +0300 |
commit | bafd650da916da6cb63ac3fe01331b90d0c0a818 (patch) | |
tree | 60d13d9c8597e889f024a1c63e9e18a47adb744d | |
parent | ea4084c0e50efdc5bc9e5cd1c1dd9f7836cde414 (diff) |
Updates theme.
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/_default/list.html | 8 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/_default/terms.html | 7 | ||||
-rw-r--r-- | static/css/fonts.css | 30 |
6 files changed, 39 insertions, 15 deletions
@@ -1,6 +1,8 @@ # Hugo.io - Classic Theme -Classic is forked from the **XMin** theme, written by [Yihui Xie](https://yihui.name). I made a fresh remix of it for my [personal blog](https://goodroot.ca). It provides some simplifications, `highlight.js` for syntax highlighting, emoji support, and slick fonts. +Classic is forked from the **XMin** theme, written by [Yihui Xie](https://yihui.name). + +It provides some simplifications, `highlight.js` for syntax highlighting, emoji support, and slick fonts. ### Instructions @@ -28,7 +30,7 @@ cd classic/themes git clone git@github.com:goodroot/hugo-classic.git ``` -5: Copy the `content/`, `static/css`, and `config.toml` from the `exampleSite` directory into the classic directory. The existing `content/`, `static/css`, and `config.toml` files will be over-written. +5: Copy the `content/`, `static/css`, and `config.toml` from the `exampleSite` directory into the classic directory. The existing `content/`, `static/css`, and `config.toml` files will be over-written. 6: Run `hugo server` within `classic/` and enjoy and customize to your hearts content! diff --git a/exampleSite/config.toml b/exampleSite/config.toml index f5ff3dd..914466c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,7 +4,6 @@ title = "Classic" theme = "hugo-classic" googleAnalytics = "" ignoreFiles = ["\\.Rmd$", "_files$", "_cache$"] -preserveTaxonomyNames = true enableEmoji = true footnotereturnlinkcontents = "↩" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 41d9d89..06b290a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,16 +1,18 @@ {{ partial "header.html" . }} {{if not .IsHome }} -<h1>{{ .Title }}</h1> +<h1>{{ .Title | markdownify }}</h1> {{ end }} {{ .Content }} <ul> - {{ range (where .Data.Pages "Section" "!=" "") }} + {{ $pages := .Pages }} + {{ if .IsHome }}{{ $pages = .Site.RegularPages }}{{ end }} + {{ range (where $pages "Section" "!=" "") }} <li> <span class="date">{{ .Date.Format "2006/01/02" }}</span> - <a href="{{ .URL }}">{{ .Title }}</a> + <a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a> </li> {{ end }} </ul> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b3b5570..d943c1c 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ partial "header.html" . }} <div class="article-meta"> -<h1><span class="title">{{ .Title }}</span></h1> +<h1><span class="title">{{ .Title | markdownify }}</span></h1> {{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }} {{ if .Params.date }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }} <p class="terms"> diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 4f6f544..1b515a5 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -3,12 +3,9 @@ <h1>{{ .Title }}</h1> <ul class="terms"> - {{ range $key, $value := .Data.Terms }} + {{ range .Data.Terms }} <li> - <a href="{{ (print "/" $.Data.Plural "/" (lower $key)) | relURL }}"> - {{ $key }} - </a> - ({{ len $value }}) + <a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> ({{ .Count }}) </li> {{ end }} </ul> diff --git a/static/css/fonts.css b/static/css/fonts.css index c851143..7ebdc1e 100644 --- a/static/css/fonts.css +++ b/static/css/fonts.css @@ -1,7 +1,31 @@ -body { - font-family: -apple-system, BlinkMacSystemFont, 'Avenir Next', Avenir, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; +@import url('https://rsms.me/inter/inter.css'); +html { font-family: + 'Inter', + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji', + 'Segoe UI Symbol'; + } +@supports (font-variation-settings: normal) { + html { font-family: + 'Inter var', + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji', + 'Segoe UI Symbol'; + } } + code { - font-family: "Lucida Console", Monaco, monospace; + font-family: + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + Helvetica, + Arial, + sans-serif, + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol" font-size: 85%; } |