Compare commits

...

10 Commits

Author SHA1 Message Date
Mark Dumay
b7ef39a61c Merge pull request #146 from gethinode/color
Refinement
2023-02-14 06:26:53 +01:00
mark
d4bf047b09 Bump package version 2023-02-14 06:21:06 +01:00
mark
9df3426f41 Fix centering of logo on smaller screens 2023-02-14 06:20:06 +01:00
mark
d7f887c6f6 Revise cache settings in server header 2023-02-14 04:38:13 +01:00
mark
25dfbb3ed3 Revert back to hugo-installer (see #124) 2023-02-14 04:37:33 +01:00
mark
4e48065605 Add spacing below prev/next links 2023-02-13 06:54:26 +01:00
mark
929a86e6b7 Add docs example 2023-02-13 06:52:28 +01:00
mark
e0895d9751 Enable color mode for docs 2023-02-13 06:52:21 +01:00
mark
7a1925594b Replace text-muted with text-body-secondary 2023-02-13 06:47:35 +01:00
mark
913813c602 Switch to hugo-bin 2023-02-13 05:20:17 +01:00
13 changed files with 43 additions and 19 deletions

View File

@@ -80,4 +80,8 @@
}
}
.nav-spacing {
width: 26px;
}
// stylelint-enable annotation-no-unknown

View File

@@ -32,6 +32,11 @@ for = '/**'
fullscreen=(), \
payment=() \
"""
Cache-Control = "public, max-age=31536000"
cache-control = """\
max-age=0, \
no-cache, \
no-store, \
must-revalidate \
"""
Access-Control-Allow-Origin = "*"
# toml-docs-end server-config

View File

@@ -164,6 +164,12 @@ echo "goodbye"
{{< /example >}}
<!-- markdownlint-enable MD037 -->
## Docs
Use the `docs` shortcode to display the content of a `toml` or `scss` file:
{{< docs name="theme-colors" file="config/_default/params.toml" >}}
## Icon
As an example, the following shortcodes show a square check, a brand logo, and a circle check.

View File

@@ -6,7 +6,7 @@
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}}
<h1>{{ .Title }}</h1>
<small class="text-muted text-uppercase">
<small class="text-body-secondary text-uppercase">
{{ $datestr | i18n "postedOnDate" -}}
{{ if ne $datestr $lastmodstr -}}&nbsp;({{ $lastmodstr | i18n "lastModified" }}){{ end }} &bull;
{{ .ReadingTime | lang.FormatNumber 0 }}&nbsp;{{ i18n "minutesShort" }} {{ i18n "read" }} &bull;
@@ -42,7 +42,7 @@
{{ partial "utilities/git.html" . }}
</div>
{{ else }}
<div class="row row-cols-2 mt-5">
<div class="row row-cols-2 mt-5 mb-3">
<div class="col">
{{ with .NextInSection -}}
{{ $next := . -}}

View File

@@ -44,7 +44,7 @@
{{- if eq $keywords "full" }}{{ $maxTags = 1 -}}
{{- else if eq $keywords "tags" }}{{ $maxTags = 3 }}{{ end -}}
<p class="card-text"><small class="{{ if $color }}text-bg-{{ $color }}{{ else }}text-muted{{ end }} text-uppercase">
<p class="card-text"><small class="{{ if $color }}text-bg-{{ $color }}{{ else }}text-body-secondary{{ end }} text-uppercase">
{{- if in (slice "full" "publication") $keywords -}}
{{- partial "utilities/date.html" (dict "date" $page.Date "format" "long") -}}&nbsp;&bull;
{{- $page.ReadingTime | lang.FormatNumber 0 }} {{ i18n "minutesShort" }} {{ i18n "read" -}}

View File

@@ -97,6 +97,9 @@
<button class="navbar-toggler collapsed ms-n3" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvass-sidebar" aria-controls="offcanvass-sidebar" aria-label="{{ T "toggleSidebar" }}">
{{- partial "assets/icon.html" (dict "icon" "fas ellipsis") -}}
</button>
{{- else -}}
<!-- Insert spacing to center logo correctly on smaller screens -->
<div class="nav-spacing d-{{ $size }}-none"></div>
{{- end -}}
<!-- Insert the brand logo or name -->
@@ -111,6 +114,7 @@
<!-- Insert main navigation toggler -->
<button class="navbar-toggler collapsed me-n3" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent-{{ $id }}"
aria-controls="navbarSupportedContent-{{ $id }}" aria-expanded="false" aria-label="Toggle main navigation">
<!-- TODO: add i18n translation -->
<span class="toggler-icon top-bar emphasis"></span>
<span class="toggler-icon middle-bar emphasis"></span>
<span class="toggler-icon bottom-bar emphasis"></span>

View File

@@ -1,6 +1,6 @@
{{ $items := len (findRE "<li.*?>(.|\n)*?</li>" .TableOfContents) -}}
{{ if (gt $items 1) -}}
<div class="toc mb-5 my-md-0 ps-xl-3 mb-lg-5 p-3 text-muted sticky-top">
<div class="toc mb-5 my-md-0 ps-xl-3 mb-lg-5 p-3 text-body-secondary sticky-top">
<strong class="d-block h6 my-2 pb-2 border-bottom">{{ T "toc" }}</strong>
{{ .TableOfContents }}
</div>

View File

@@ -70,7 +70,7 @@
</li>
</ul>
<div class="border-start border-end border-bottom mb-3">
<div class="collapse multi-{{ $id }}{{ if $show }} show{{ end }} bg-light" id="body-{{ $id }}">
<div class="collapse multi-{{ $id }}{{ if $show }} show{{ end }} syntax-highlight" id="body-{{ $id }}">
{{- highlight (trim $match "\r\n") "toml" "" -}}
</div>
<div class="collapse multi-{{ $id }}{{ if not $show }} show{{ end }} p-3" id="footer-{{ $id }}"><i>...</i></div>

View File

@@ -32,7 +32,7 @@
</div>
{{- end -}}
<div class="d-flex align-items-center ps-3 pe-3 py-1 border-top border-bottom syntax-highlight">
<small class="font-monospace text-muted text-uppercase">{{- $lang -}}</small>
<small class="font-monospace text-body-secondary text-uppercase">{{- $lang -}}</small>
<!-- <div class="d-flex ms-auto">
<button type="button" class="mt-0 me-0 border-0" title="Copy to clipboard">
<i class="fa-regular fa-clipboard"></i>

View File

@@ -29,7 +29,7 @@
</div>
<div class="col">
{{ if ne $year $lastYear }}
<p class="text-muted mt-5">{{ $year }}</p>
<p class="text-body-secondary mt-5">{{ $year }}</p>
{{ $.Scratch.Set "lastYear" $year }}
{{ end }}
<a href="{{ .Permalink | relURL }}">{{ if .Draft }}{{ T "draft" | upper }}: {{end}}{{ .Title | markdownify }}</a>

View File

@@ -49,7 +49,12 @@
fullscreen=(), \
payment=() \
"""
Cache-Control = "public, max-age=31536000"
cache-control = """\
max-age=0, \
no-cache, \
no-store, \
must-revalidate \
"""
Access-Control-Allow-Origin = "*"
[context.deploy-preview]

16
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@gethinode/hinode",
"version": "0.9.0-alpha2",
"version": "0.9.0-alpha3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@gethinode/hinode",
"version": "0.9.0-alpha2",
"version": "0.9.0-alpha3",
"hasInstallScript": true,
"license": "MIT",
"devDependencies": {
@@ -388,9 +388,9 @@
"dev": true
},
"node_modules/@types/node": {
"version": "18.11.11",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.11.tgz",
"integrity": "sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==",
"version": "18.13.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz",
"integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==",
"dev": true
},
"node_modules/@types/normalize-package-data": {
@@ -5912,9 +5912,9 @@
"dev": true
},
"@types/node": {
"version": "18.11.11",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.11.tgz",
"integrity": "sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g==",
"version": "18.13.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz",
"integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==",
"dev": true
},
"@types/normalize-package-data": {

View File

@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.9.0-alpha2",
"version": "0.9.0-alpha3",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
@@ -75,4 +75,4 @@
"otherDependencies": {
"hugo": "0.110.0"
}
}
}