Numerous improvements and bug fixes.

- Refactored themes to always load with just a single file. This avoids
  a round trip on each request.
- Locally load font when available on the system, then try to
  load the woff2 file, then fall back to regular woff.
- Update markup to use relative urls where it is safe. RSS feeds still
  use absolute URLs.
- Only set og:image:(height/width) when using the standard color icon.
- Fixed styles on the pagination buttons.
- Added ability to switch font to Source Code Pro (useSourceCodePro).
- Added yellow theme.
- Added grey theme.
- Bold and remove underline for active page in header.
- Removed markdownify on summary.
- Only display date if present.
This commit is contained in:
quest
2022-09-10 12:35:00 -10:00
parent 1610962731
commit 26ad260858
102 changed files with 306 additions and 142 deletions

View File

@@ -8,24 +8,32 @@
{{ template "_internal/google_analytics.html" . }}
<!-- Theme CSS -->
<link rel="stylesheet" href="{{ "assets/style.css" | absURL }}">
{{ $scp := "" }}
{{ if (isset $.Site.Params "usesourcecodepro") }}
{{ if $.Site.Params.useSourceCodePro }}
{{ $scp = "-scp" }}
{{ end }}
{{ end }}
{{ if (isset .Params "color") }}
<link rel="stylesheet" href="{{ (printf "assets/%s.css" .Params.color) | absURL }}">
<link rel="stylesheet" href="{{ (printf "assets/%s%s.css" .Params.color $scp) | relURL }}">
{{ else if and (ne $.Site.Params.ThemeColor "orange") (ne $.Site.Params.ThemeColor "color" "") }}
<link rel="stylesheet" href="{{ (printf "assets/%s.css" $.Site.Params.ThemeColor) | absURL }}">
<link rel="stylesheet" href="{{ (printf "assets/%s%s.css" $.Site.Params.ThemeColor $scp) | relURL }}">
{{ else }}
<link rel="stylesheet" href="{{ (printf "assets/orange%s.css" $scp) | relURL }}">
{{ end }}
<!-- Custom CSS to override theme properties (/static/style.css) -->
{{ if (fileExists "static/style.css") -}}
<link rel="stylesheet" href="{{ "style.css" | absURL }}">
<link rel="stylesheet" href="{{ "style.css" | relURL }}">
{{- end }}
<!-- Icons -->
<link rel="apple-touch-icon" href="{{ "img/apple-touch-icon-192x192.png" | absURL }}">
<link rel="apple-touch-icon" href="{{ "img/apple-touch-icon-192x192.png" | relURL }}">
{{ if isset $.Site.Params "favicon" }}
<link rel="shortcut icon" href="{{ $.Site.Params.favicon | absURL }}">
<link rel="shortcut icon" href="{{ $.Site.Params.favicon | relURL }}">
{{ else }}
<link rel="shortcut icon" href="{{ printf "img/favicon/%s.png" ($.Site.Params.ThemeColor | default "orange") | absURL }}">
<link rel="shortcut icon" href="{{ printf "img/favicon/%s.png" ($.Site.Params.ThemeColor | default "orange") | relURL }}">
{{ end }}
<!-- Twitter Card -->
@@ -51,10 +59,10 @@
<meta property="og:image" content="{{ $.Site.Params.favicon | absURL }}">
{{ else }}
<meta property="og:image" content="{{ printf "img/favicon/%s.png" $.Site.Params.ThemeColor | absURL }}">
<meta property="og:image:width" content="2048">
<meta property="og:image:height" content="1024">
{{ end }}
{{ end }}
<meta property="og:image:width" content="2048">
<meta property="og:image:height" content="1024">
{{ range .Params.categories }}
<meta property="article:section" content="{{ . }}" />
{{ end }}