Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrmaguiar <rmaguiar@tuta.io>2020-07-23 22:42:54 +0300
committerrmaguiar <rmaguiar@tuta.io>2020-07-23 22:42:54 +0300
commit08f4e1c933bf1a136f104111cbc2f3fffdc204b2 (patch)
tree9393da2fc0038d2121897a8c02668eff94151b17 /layouts
parent3522c6d848cd0ece42912eb4256ab85df1167886 (diff)
Add a live demo site and minor changes
* Add a live demo site (hosted on Netlify) * Move fonts from static folder to assets * Fix mhchem mispelled as mchem * Other minor changes
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html1
-rw-r--r--layouts/_default/list.html14
-rw-r--r--layouts/_default/single.html30
-rw-r--r--layouts/partials/categories.html2
-rw-r--r--layouts/partials/font-preload.html8
-rw-r--r--layouts/partials/footer.html2
-rw-r--r--layouts/partials/head.html6
-rw-r--r--layouts/partials/katex.html4
-rw-r--r--layouts/partials/search-form.html2
-rw-r--r--layouts/partials/tags.html2
-rw-r--r--layouts/shortcodes/contact-form.html3
11 files changed, 37 insertions, 37 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 7c73289..3bad352 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -29,7 +29,6 @@
</footer>
<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0" aria-hidden="true">
-
<symbol viewBox="0 0 512 512" id="adjust">
<path d="M8 256c0 136.966 111.033 248 248 248s248-111.034 248-248S392.966 8 256 8 8 119.033 8 256zm248 184V72c101.705 0 184 82.311 184 184 0 101.705-82.311 184-184 184z"/>
</symbol>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index fcbfef4..b1281cf 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -4,7 +4,7 @@
<!-- Collect pages using the "search" layout -->
{{ $searchPages := where .Site.RegularPages "Layout" "eq" "search" }}
-
+
<main class="list">
<!-- Display search form before listing posts -->
@@ -50,11 +50,11 @@
{{ end }}
{{ define "svg-extra" }}
- <symbol viewBox="0 0 256 512" id="angle-right">
- <path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/>
- </symbol>
+ <symbol viewBox="0 0 256 512" id="angle-right">
+ <path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"/>
+ </symbol>
- <symbol viewBox="0 0 448 512" id="angle-double-right">
- <path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34zm192-34l-136-136c-9.4-9.4-24.6-9.4-33.9 0l-22.6 22.6c-9.4 9.4-9.4 24.6 0 33.9l96.4 96.4-96.4 96.4c-9.4 9.4-9.4 24.6 0 33.9l22.6 22.6c9.4 9.4 24.6 9.4 33.9 0l136-136c9.4-9.2 9.4-24.4 0-33.8z"/>
- </symbol>
+ <symbol viewBox="0 0 448 512" id="angle-double-right">
+ <path d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34zm192-34l-136-136c-9.4-9.4-24.6-9.4-33.9 0l-22.6 22.6c-9.4 9.4-9.4 24.6 0 33.9l96.4 96.4-96.4 96.4c-9.4 9.4-9.4 24.6 0 33.9l22.6 22.6c9.4 9.4 24.6 9.4 33.9 0l136-136c9.4-9.2 9.4-24.4 0-33.8z"/>
+ </symbol>
{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 9f7593b..b0fddf4 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,7 +1,5 @@
{{ define "main" }}
- {{ $icons := (.Scratch.Get "svgBundle").RelPermalink }}
-
<main>
<article>
<header>
@@ -9,18 +7,19 @@
<h1>{{ .Title }}</h1>
{{ if or .Params.categories .Params.tags }}
- <section class="tags">
+ <section class="terms">
<ul>
- {{- with .Params.categories -}}
- {{- range sort . -}}
- <li class="cats"><a class="btn" href="/categories/{{ . | urlize }}">{{ . }}</a></li>
- {{- end -}}
- {{- end -}}
- {{- with .Params.tags -}}
- {{- range sort . -}}
- <li><a class="btn" href="/tags/{{ . | urlize }}">{{ . }}</a></li>
- {{- end -}}
- {{ end }}
+ {{- with .Params.categories -}}
+ {{- range sort . -}}
+ <li class="category"><a class="btn" href="/categories/{{ . | urlize }}">{{ . }}</a></li>
+ {{- end -}}
+ {{- end -}}
+ {{- with .Params.tags -}}
+ {{- range sort . -}}
+ <li><a class="btn" href="/tags/{{ . | urlize }}">{{ . }}</a></li>
+ {{- end -}}
+ {{- end -}}
+ </ul>
</section>
{{- end -}}
@@ -42,7 +41,7 @@
{{ if .Params.toc }}
<details class="toc" open>
- <summary>{{ T "table_of_contents" }}</summary>
+ <summary class="outline-dashed">{{ T "table_of_contents" }}</summary>
{{ .Page.TableOfContents }}
</details>
{{ end }}
@@ -64,5 +63,4 @@
<path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/>
</symbol>
{{ end }}
-
-{{ end }} \ No newline at end of file
+{{ end }}
diff --git a/layouts/partials/categories.html b/layouts/partials/categories.html
index 965b291..b64f843 100644
--- a/layouts/partials/categories.html
+++ b/layouts/partials/categories.html
@@ -1,4 +1,4 @@
-<ul class="labels">
+<ul class="terms">
{{ range .Site.Taxonomies.categories }}
<li><a class="btn" href="{{ .Page.RelPermalink }}" aria-label="{{ .Page.Title }} ({{ .Count }})">{{ .Page.Title }}</a></li>
{{ end }}
diff --git a/layouts/partials/font-preload.html b/layouts/partials/font-preload.html
new file mode 100644
index 0000000..e6f00f4
--- /dev/null
+++ b/layouts/partials/font-preload.html
@@ -0,0 +1,8 @@
+<!--
+ TODO
+ Add a better way to detect custom fonts (ignoring the default ones)
+-->
+
+{{ range (resources.Match "fonts/*") }}
+ <link rel="preload" href="{{ .RelPermalink }}" as="font" crossorigin="anonymous">
+{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index a754014..f5c934a 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -30,7 +30,7 @@
<!-- Footer button and color picker -->
<section class="req-js">
- <button title="{{ T "change_mode" }}"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><use xlink:href="#adjust"/></svg></button><input type="color" list="presets" value="{{ if .Site.Params.Style.isDark }}{{ $darkAccent }}{{ else }}{{ $lightAccent }}{{ end }}" title="{{ T "change_accent" }}" aria-label="{{ T "change_accent" }}"><datalist id="presets"><option value="{{ $lightAccent }}"><option value="{{ $darkAccent }}"><!-- Extra colors -->{{- range .Site.Params.style.presets -}}<option value="{{ . }}">{{ end }}</datalist>
+ <button class="outline-dashed" title="{{ T "change_mode" }}"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><use xlink:href="#adjust"/></svg></button><input class="outline-dashed" type="color" list="presets" value="{{ if .Site.Params.Style.isDark }}{{ $darkAccent }}{{ else }}{{ $lightAccent }}{{ end }}" title="{{ T "change_accent" }}" aria-label="{{ T "change_accent" }}"><datalist id="presets"><option value="{{ $lightAccent }}"><option value="{{ $darkAccent }}"><!-- Extra colors -->{{- range .Site.Params.style.presets -}}<option value="{{ . }}">{{ end }}</datalist>
</section>
<!-- noscript notice -->
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 3f37c90..fe7f30c 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -357,11 +357,7 @@
<!-- Preload fonts -->
-{{ with (readDir "/static/fonts") }}
- {{ range . }}
- <link rel="preload" href="{{ printf "/fonts/%s" .Name | relURL }}" as="font" crossorigin="anonymous">
- {{ end }}
-{{ end }}
+{{ partialCached "font-preload" . }}
<!-- Should be loaded even if browser has native lazy load support -->
{{ $lazysizes := resources.Get "libs/lazysizes@5.2.2/lazysizes.min.js" | resources.ExecuteAsTemplate "js/lazysizes.min.js" . | minify | resources.Fingerprint "sha512" }}
diff --git a/layouts/partials/katex.html b/layouts/partials/katex.html
index 4810701..05a1ff0 100644
--- a/layouts/partials/katex.html
+++ b/layouts/partials/katex.html
@@ -2,8 +2,8 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha512-h7nl+xz8wgDlNM4NqKEM4F1NkIRS17M9+uJwIGwuo8vGqIl4BhuCKdxjWEINm+xyrUjNCnK5dCrhM0sj+wTIXw==" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js" integrity="sha512-/CMIhXiDA3m2c9kzRyd97MTb3MC6OVnx4TElQ7fkkoRghwDf6gi41gaT1PwF270W6+J60uTmwgeRpNpJdRV6sg==" crossorigin="anonymous"></script>
-<!-- mchem extension -->
-{{ if or (in .Params.katexExtensions "mchem") (in .Site.Params.katexExtensions "mchem") }}
+<!-- mhchem extension -->
+{{ if or (in .Params.katexExtensions "mhchem") (in .Site.Params.katexExtensions "mhchem") }}
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/mhchem.min.js" integrity="sha512-ndr34OWlb/uvrgXcrqKXv4YUB42kRFQi9cJ+s+alNEvNBKYyIlO970xmSWYV3vNKsrT1rwW/leiBEaZxcCwjwA==" crossorigin="anonymous"></script>
{{ end }}
diff --git a/layouts/partials/search-form.html b/layouts/partials/search-form.html
index 84d67e6..e109286 100644
--- a/layouts/partials/search-form.html
+++ b/layouts/partials/search-form.html
@@ -13,7 +13,7 @@
{{ else }}
<form role="search" action="{{ $searchPage.RelPermalink }}">
{{ end }}
- <label class="label-form" for="search-input">{{ T "search_label" }}</label><input class="input-text" type="search" id="search-input" title='{{ T "search_input_title" (dict "minLength" $minLength "maxLength" $maxLength) }}' name="q" {{ with .Site.Params.Search.placeholder }}placeholder="{{ . }}"{{ end }} minlength="{{ $minLength }}" maxlength="{{ $maxLength }}" pattern="^[\S].*" required><button aria-label="{{ T "search_button_aria_label" }}" class="btn" type="submit"><svg aria-hidden="true"><use xlink:href="#search"/></svg></button>
+ <label class="label-form" for="search-input">{{ T "search_label" }}</label><input class="input-text" type="search" id="search-input" title='{{ T "search_input_title" (dict "minLength" $minLength "maxLength" $maxLength) }}' name="q" {{ with .Site.Params.Search.placeholder }}placeholder="{{ . }}"{{ end }} minlength="{{ $minLength }}" maxlength="{{ $maxLength }}" pattern="^[\S].*" required><button aria-label="{{ T "search_button_aria_label" }}" class="btn outline-dashed" type="submit"><svg aria-hidden="true"><use xlink:href="#search"/></svg></button>
</form>
<hr>
</section>
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
index c750c3a..600b1fb 100644
--- a/layouts/partials/tags.html
+++ b/layouts/partials/tags.html
@@ -1,4 +1,4 @@
-<ul class="tags">
+<ul class="terms">
{{ range .Site.Taxonomies.tags }}
<li><a class="btn" href="{{ .Page.RelPermalink }}" aria-label="{{ .Page.Title }} ({{ .Count }})">{{ .Page.Title }} <span>{{ .Count }}</span></a></li>
{{ end }}
diff --git a/layouts/shortcodes/contact-form.html b/layouts/shortcodes/contact-form.html
index 43f165e..5fcb922 100644
--- a/layouts/shortcodes/contact-form.html
+++ b/layouts/shortcodes/contact-form.html
@@ -41,7 +41,6 @@
<input type="text" name="_gotcha" style="display:none">
- <input type="submit" value="{{ T "submit" }}">
+ <input class="outline-dashed" type="submit" value="{{ T "submit" }}">
</form>
- \ No newline at end of file