diff options
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/_default/baseof.html | 15 | ||||
| -rw-r--r-- | layouts/partials/head.html | 12 | ||||
| -rw-r--r-- | layouts/partials/scripts.html | 1 | ||||
| -rw-r--r-- | layouts/partials/sidebar.html | 2 | ||||
| -rw-r--r-- | layouts/partials/styles.html | 3 |
5 files changed, 12 insertions, 21 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b33c566..190acab 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -2,18 +2,7 @@ <html lang="{{ site.LanguageCode | default site.Language.Lang }}" {{- with partialCached "func/GetLanguageDirection" "GetLanguageDirection" }} dir="{{ . }}" {{- end }}> {{- partial "head.html" . -}} <body class="theme-base-{{ .Site.Params.color_scheme }}"> - <!-- This if statement decides which sidebar to use --> - {{- if .Params.toc -}} - {{- partial "sidebar-toc.html" . -}} - {{- else -}} - {{- partial "sidebar.html" . -}} - {{- end -}} - - <!-- - Wrap is the content to shift when toggling the sidebar. - We wrap the content to avoid any CSS collisions with our - real content. - --> + {{ if .Params.toc }}{{ partial "sidebar-toc.html" . }}{{ else }}{{ partial "sidebar.html" . }}{{ end }} <div class="wrap"> <header class="masthead"> <div class="container"> @@ -30,7 +19,5 @@ </div> <label for="sidebar-checkbox" class="sidebar-toggle"></label> - - {{- partial "scripts.html" . -}} </body> </html> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 51ec8e3..be1f666 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,3 +1,4 @@ +{{/* */}} <head prefix="og: http://ogp.me/ns#; dc: http://purl.org/dc/terms/#"> {{- $description := print .Params.Description -}} {{- if or .IsHome (eq .Params.Description "") (not .Params.Description) -}} @@ -5,11 +6,13 @@ {{- end -}} {{- $author := print .Site.Author.name -}} - {{- if .Params.author -}}{{ $author = .Params.author }}{{- end -}} + {{- if .Params.author -}}{{ $author = .Params.author }}{{- end }} <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width,initial-scale=1.0,shrink-to-fit=no"> + <link rel="canonical" href="{{ .Permalink }}"> + <title>{{ block "title" . }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ .Site.Title }}{{ end }}</title> <meta name="description" content="{{ $description }}"> {{ hugo.Generator }} @@ -37,12 +40,9 @@ <meta property="og:description" content="{{ .Site.Params.Description }}"> <meta property="og:type" content="website"> - <!-- CSS link --> - {{- $sass := resources.Get "sass/style.scss" }} - {{- $style := $sass | resources.ToCSS | resources.Minify | resources.Fingerprint }} - <link rel="stylesheet" href="{{ $style.RelPermalink }}"> + {{ partial "styles.html" . -}} + {{ partial "scripts.html" . -}} - <!-- Icons --> <link rel="apple-touch-icon-precomposed" sizes="180x180" href="{{ "apple-touch-icon-precomposed.png" | relURL }}"> <link rel="shortcut icon" href="{{ "favicon.ico" | relURL }}"> diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index e69de29..e6462a9 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -0,0 +1 @@ +{{/* For Users's overwrite */}} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 5b5c016..8178537 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,4 +1,4 @@ -{{- /* Target for toggling the sidebar `.sidebar-checkbox` is for regular styles, `#sidebar-checkbox` for behavior. */ -}} +{{/* Target for toggling the sidebar `.sidebar-checkbox` is for regular styles, `#sidebar-checkbox` for behavior. */}} <input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox"> <!-- Toggleable sidebar --> diff --git a/layouts/partials/styles.html b/layouts/partials/styles.html new file mode 100644 index 0000000..5cc2dbd --- /dev/null +++ b/layouts/partials/styles.html @@ -0,0 +1,3 @@ +{{- $sass := resources.Get "sass/style.scss" -}} +{{- $style := $sass | resources.ToCSS | resources.Minify | resources.Fingerprint -}} +<link rel="stylesheet" href="{{ $style.RelPermalink }}"> |
