mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-09 19:13:20 +00:00
Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c200af1ad2 | ||
![]() |
5232afa812 | ||
![]() |
ad8e2f51d7 | ||
![]() |
ff708cf580 | ||
![]() |
f93ee9f01b | ||
![]() |
611320e661 | ||
![]() |
8a56d82cb9 | ||
![]() |
c052086388 | ||
![]() |
d4bfbf925a | ||
![]() |
b6b7e7be4f | ||
![]() |
61ef48798b | ||
![]() |
d65382e80d | ||
![]() |
e97d3e6fe9 | ||
![]() |
5cb189d545 | ||
![]() |
7897fe5f00 | ||
![]() |
6c4e0e8992 | ||
![]() |
3c6a533236 | ||
![]() |
69a9108655 | ||
![]() |
4fdc7bb7d3 | ||
![]() |
170bd7034a | ||
![]() |
2bc99753d6 |
@@ -38,7 +38,7 @@
|
|||||||
@import "components/table.scss";
|
@import "components/table.scss";
|
||||||
@import "components/timeline.scss";
|
@import "components/timeline.scss";
|
||||||
@import "components/toc.scss";
|
@import "components/toc.scss";
|
||||||
@import "components/vimeo.scss";
|
@import "components/video.scss";
|
||||||
@import "common/animation.scss";
|
@import "common/animation.scss";
|
||||||
@import "common/styles.scss";
|
@import "common/styles.scss";
|
||||||
@import "layouts/reboot.scss";
|
@import "layouts/reboot.scss";
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
@import "components/table.scss";
|
@import "components/table.scss";
|
||||||
@import "components/timeline.scss";
|
@import "components/timeline.scss";
|
||||||
@import "components/toc.scss";
|
@import "components/toc.scss";
|
||||||
@import "components/vimeo.scss";
|
@import "components/video.scss";
|
||||||
@import "common/animation.scss";
|
@import "common/animation.scss";
|
||||||
@import "common/styles.scss";
|
@import "common/styles.scss";
|
||||||
@import "layouts/reboot.scss";
|
@import "layouts/reboot.scss";
|
||||||
|
@@ -1,3 +1,19 @@
|
|||||||
|
.youtube-embedded {
|
||||||
|
position: relative;
|
||||||
|
padding-bottom: 56.25%;
|
||||||
|
height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.youtube-embedded > iframe {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border:0;
|
||||||
|
}
|
||||||
|
|
||||||
// Adapted from https://github.com/gohugoio/hugo/tpl/tplimpl/embedded/templates/shortcodes/vimeo_simple.html
|
// Adapted from https://github.com/gohugoio/hugo/tpl/tplimpl/embedded/templates/shortcodes/vimeo_simple.html
|
||||||
.__h_video {
|
.__h_video {
|
||||||
position: relative;
|
position: relative;
|
@@ -15,6 +15,7 @@
|
|||||||
"link",
|
"link",
|
||||||
"meta",
|
"meta",
|
||||||
"nav",
|
"nav",
|
||||||
|
"ol",
|
||||||
"p",
|
"p",
|
||||||
"path",
|
"path",
|
||||||
"script",
|
"script",
|
||||||
@@ -29,11 +30,14 @@
|
|||||||
"active",
|
"active",
|
||||||
"align-items-center",
|
"align-items-center",
|
||||||
"align-self-center",
|
"align-self-center",
|
||||||
|
"align-self-end",
|
||||||
"bg-body",
|
"bg-body",
|
||||||
"bg-opacity-10",
|
"bg-opacity-10",
|
||||||
"bg-primary",
|
"bg-primary",
|
||||||
"bottom-0",
|
"bottom-0",
|
||||||
"bottom-bar",
|
"bottom-bar",
|
||||||
|
"breadcrumb",
|
||||||
|
"breadcrumb-item",
|
||||||
"btn",
|
"btn",
|
||||||
"btn-close",
|
"btn-close",
|
||||||
"btn-primary",
|
"btn-primary",
|
||||||
@@ -85,7 +89,6 @@
|
|||||||
"form-control",
|
"form-control",
|
||||||
"fs-3",
|
"fs-3",
|
||||||
"fs-5",
|
"fs-5",
|
||||||
"fw-30",
|
|
||||||
"fw-bold",
|
"fw-bold",
|
||||||
"hstack",
|
"hstack",
|
||||||
"img-fluid",
|
"img-fluid",
|
||||||
|
10
i18n/en.yaml
10
i18n/en.yaml
@@ -30,6 +30,16 @@
|
|||||||
- id: emptyTags
|
- id: emptyTags
|
||||||
translation: "No tags found"
|
translation: "No tags found"
|
||||||
|
|
||||||
|
# Languages
|
||||||
|
- id: lang_de
|
||||||
|
translation: "German"
|
||||||
|
- id: lang_en
|
||||||
|
translation: "English"
|
||||||
|
- id: lang_nl
|
||||||
|
translation: "Dutch"
|
||||||
|
- id: lang_fr
|
||||||
|
translation: "French"
|
||||||
|
|
||||||
# Sharing
|
# Sharing
|
||||||
- id: shareLink
|
- id: shareLink
|
||||||
translation: "Share via {{ . }}"
|
translation: "Share via {{ . }}"
|
||||||
|
10
i18n/nl.yaml
10
i18n/nl.yaml
@@ -28,6 +28,16 @@
|
|||||||
- id: emptyTags
|
- id: emptyTags
|
||||||
translation: "Geen tags gevonden"
|
translation: "Geen tags gevonden"
|
||||||
|
|
||||||
|
# Languages
|
||||||
|
- id: lang_de
|
||||||
|
translation: "Duits"
|
||||||
|
- id: lang_en
|
||||||
|
translation: "Engels"
|
||||||
|
- id: lang_nl
|
||||||
|
translation: "Nederlands"
|
||||||
|
- id: lang_fr
|
||||||
|
translation: "Frans"
|
||||||
|
|
||||||
# Sharing
|
# Sharing
|
||||||
- id: shareLink
|
- id: shareLink
|
||||||
translation: "Delen via {{ . }}"
|
translation: "Delen via {{ . }}"
|
||||||
|
@@ -21,9 +21,18 @@
|
|||||||
|
|
||||||
<div class="toc toc-sidebar mb-5 my-md-0 ps-xl-3 mb-lg-5 p-3 text-body-secondary sticky-top">
|
<div class="toc toc-sidebar mb-5 my-md-0 ps-xl-3 mb-lg-5 p-3 text-body-secondary sticky-top">
|
||||||
{{ with $download }}
|
{{ with $download }}
|
||||||
|
{{ $title := (T "download" ) }}
|
||||||
|
{{ $lang := strings.TrimPrefix "." (path.Ext (path.BaseName .)) }}
|
||||||
|
{{ if and $lang (ne (string site.LanguageCode) $lang) }}
|
||||||
|
{{ range site.Languages }}
|
||||||
|
{{ if eq .LanguageCode $lang }}
|
||||||
|
{{ $title = printf "%s (%s)" (T "download") (T (printf "lang_%s" .LanguageCode)) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
<div class="mb-5 text-center">
|
<div class="mb-5 text-center">
|
||||||
{{ $attr := dict "download" (path.Base .) }}
|
{{ $attr := dict "download" (path.Base .) }}
|
||||||
{{ partial "assets/button.html" (dict "href" . "title" (T "download" ) "color" "primary" "outline" "true" "icon" "fas download" "size" "sm" "attributes" $attr) }}
|
{{ partial "assets/button.html" (dict "href" . "title" $title "color" "primary" "outline" "true" "icon" "fas download" "size" "sm" "attributes" $attr) }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<div class="carousel-item{{ if $active }} active{{ end }}">
|
<div class="carousel-item{{ if $active }} active{{ end }}" {{ if not $active }} fetchpriority="low"{{ end }}>
|
||||||
{{ partial "assets/image.html" (dict "url" $src "ratio" $ratio "page" $page "innerClass" "d-block w-100" "portrait" $portrait "loading" $loading) }}
|
{{ partial "assets/image.html" (dict "url" $src "ratio" $ratio "page" $page "innerClass" "d-block w-100" "portrait" $portrait "loading" $loading) }}
|
||||||
<div class="carousel-caption gradient"></div>
|
<div class="carousel-caption gradient"></div>
|
||||||
{{ with $caption }}
|
{{ with $caption }}
|
||||||
|
@@ -25,6 +25,10 @@
|
|||||||
loaded images is deferred until the image is within scrolling range of the viewport. This should
|
loaded images is deferred until the image is within scrolling range of the viewport. This should
|
||||||
reduce the initial loading time of the website. It is recommended to lazily load only those images
|
reduce the initial loading time of the website. It is recommended to lazily load only those images
|
||||||
that are below the page fold.
|
that are below the page fold.
|
||||||
|
"priority": Optional fetch priority of the image, either "high", "low", or "auto" (default). The priority
|
||||||
|
provides a hint to the browser on how it should prioritize the fetch of the image relative to other
|
||||||
|
images. The implementation is experimental and currently only supported by Chrome, Edge, and Opera.
|
||||||
|
(https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/fetchpriority#browser_compatibility).
|
||||||
"outerClass": Optional class attribute of the outer div element, e.g. "img-wrap".
|
"outerClass": Optional class attribute of the outer div element, e.g. "img-wrap".
|
||||||
"innerClass": Optional class attribute of the inner img element, e.g. "rounded".
|
"innerClass": Optional class attribute of the inner img element, e.g. "rounded".
|
||||||
"title": Optional alternate text of the image.
|
"title": Optional alternate text of the image.
|
||||||
@@ -64,6 +68,15 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $lazy := eq $loading "lazy" -}}
|
{{- $lazy := eq $loading "lazy" -}}
|
||||||
|
|
||||||
|
{{- $priority := .priority -}}
|
||||||
|
{{- $validPriorities := slice "high" "low" "auto" -}}
|
||||||
|
{{- if $priority -}}
|
||||||
|
{{ if not (in $validPriorities $priority) -}}
|
||||||
|
{{- errorf "partial [assets/image.html] - Invalid value for param 'priority'" -}}
|
||||||
|
{{ end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if eq $priority "auto" }}{{ $priority = "" }}{{ end -}}
|
||||||
|
|
||||||
{{- define "partials/image-portrait.html" -}}
|
{{- define "partials/image-portrait.html" -}}
|
||||||
{{- $dimensions := slice }}
|
{{- $dimensions := slice }}
|
||||||
{{- $dim := .dim -}}
|
{{- $dim := .dim -}}
|
||||||
@@ -196,6 +209,7 @@
|
|||||||
{{- $modes := .modes -}}
|
{{- $modes := .modes -}}
|
||||||
{{- $lazy := .lazy -}}
|
{{- $lazy := .lazy -}}
|
||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
|
{{- $priority := .priority -}}
|
||||||
{{- $isVector := false -}}
|
{{- $isVector := false -}}
|
||||||
|
|
||||||
{{- $segments := split $url "#" -}}
|
{{- $segments := split $url "#" -}}
|
||||||
@@ -255,6 +269,7 @@
|
|||||||
<img class="img-fluid {{ $innerClass }}"
|
<img class="img-fluid {{ $innerClass }}"
|
||||||
src="{{ $fallbackURL }}"
|
src="{{ $fallbackURL }}"
|
||||||
{{ if $lazy }}loading="lazy"{{ end }}
|
{{ if $lazy }}loading="lazy"{{ end }}
|
||||||
|
{{ with $priority }}fetchpriority="{{ . }}"{{ end }}
|
||||||
{{ with $imgset -}}srcset="{{ . }}" sizes="100vw"{{- end }}
|
{{ with $imgset -}}srcset="{{ . }}" sizes="100vw"{{- end }}
|
||||||
{{ with $height }}height="{{ . }}"{{ end }}
|
{{ with $height }}height="{{ . }}"{{ end }}
|
||||||
{{ with $width }}width="{{ . }}"{{ end }}
|
{{ with $width }}width="{{ . }}"{{ end }}
|
||||||
@@ -282,6 +297,7 @@
|
|||||||
"title" $title
|
"title" $title
|
||||||
"caption" $caption
|
"caption" $caption
|
||||||
"lazy" $lazy
|
"lazy" $lazy
|
||||||
|
"priority" $priority
|
||||||
"page" $page)
|
"page" $page)
|
||||||
-}}
|
-}}
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
{{- $thumbnail := (or (and (reflect.IsMap $page.Params.Thumbnail) $page.Params.Thumbnail.url) $page.Params.Thumbnail) -}}
|
{{- $thumbnail := (or (and (reflect.IsMap $page.Params.Thumbnail) $page.Params.Thumbnail.url) $page.Params.Thumbnail) -}}
|
||||||
{{- if $thumbnail }}
|
{{- if $thumbnail }}
|
||||||
{{ partial "assets/image.html" (dict "url" $thumbnail "ratio" "16x9" "outerClass" $style "innerClass" "rounded" "title" $page.Site.Title) }}
|
{{ partial "assets/image.html" (dict "url" $thumbnail "ratio" "16x9" "outerClass" $style "innerClass" "rounded" "title" $page.Site.Title "priority" "high") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
{{- $class := printf "img-wrap %s" .class -}}
|
{{- $class := printf "img-wrap" -}}
|
||||||
|
{{- with .class }}{{ $class = printf "img-wrap %s" . }}{{ end -}}
|
||||||
{{- $ratio := .ratio | default "21x9" -}}
|
{{- $ratio := .ratio | default "21x9" -}}
|
||||||
{{- $thumbnail := "" -}}
|
{{- $thumbnail := "" -}}
|
||||||
{{- $credits := "" -}}
|
{{- $credits := "" -}}
|
||||||
@@ -34,5 +35,5 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{ if $thumbnail -}}
|
{{ if $thumbnail -}}
|
||||||
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" $ratio "outerClass" $class "innerClass" "rounded" "title" $page.Params.title "caption" $credits) -}}
|
{{- partial "assets/image.html" (dict "url" $thumbnail "ratio" $ratio "outerClass" $class "innerClass" "rounded" "title" $page.Params.title "caption" $credits "priority" "high") -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
@@ -4,7 +4,7 @@
|
|||||||
{{- $id := .Get "id" | default (.Get 0) -}}
|
{{- $id := .Get "id" | default (.Get 0) -}}
|
||||||
{{- $class := .Get "class" | default (.Get 1) -}}
|
{{- $class := .Get "class" | default (.Get 1) -}}
|
||||||
{{- $title := .Get "title" | default "YouTube Video" }}
|
{{- $title := .Get "title" | default "YouTube Video" }}
|
||||||
<div {{ with $class }}class="{{ . }}"{{ else }}style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"{{ end }}>
|
<div class="youtube-embedded {{ $class }}">
|
||||||
<iframe src="https://{{ $ytHost }}/embed/{{ $id }}?origin={{ .Site.BaseURL }}{{ with .Get "autoplay" }}{{ if eq . "true" }}&autoplay=1{{ end }}{{ end }}" {{ if not $class }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" {{ end }}allowfullscreen title="{{ $title }}"></iframe>
|
<iframe src="https://{{ $ytHost }}/embed/{{ $id }}?origin={{ .Site.BaseURL }}{{ with .Get "autoplay" }}{{ if eq . "true" }}&autoplay=1{{ end }}{{ end }}" allowfullscreen title="{{ $title }}"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{{ end -}}
|
{{ end -}}
|
17
package-lock.json
generated
17
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.21.2",
|
"version": "0.21.5",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.21.2",
|
"version": "0.21.5",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fullhuman/postcss-purgecss": "^5.0.0",
|
"@fullhuman/postcss-purgecss": "^5.0.0",
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"eslint-plugin-import": "^2.29.0",
|
"eslint-plugin-import": "^2.29.0",
|
||||||
"eslint-plugin-n": "^16.3.0",
|
"eslint-plugin-n": "^16.3.0",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"hugo-bin": "^0.116.3",
|
"hugo-bin": "^0.116.4",
|
||||||
"markdownlint-cli2": "^0.10.0",
|
"markdownlint-cli2": "^0.10.0",
|
||||||
"netlify-plugin-hugo-cache-resources": "^0.2.1",
|
"netlify-plugin-hugo-cache-resources": "^0.2.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
@@ -33,7 +33,10 @@
|
|||||||
"stylelint-config-standard-scss": "^11.1.0"
|
"stylelint-config-standard-scss": "^11.1.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"fsevents": "*"
|
"@gethinode/netlify-plugin-dartsass": "^0.2.0",
|
||||||
|
"@netlify/plugin-lighthouse": "*",
|
||||||
|
"fsevents": "*",
|
||||||
|
"netlify-plugin-hugo-cache-resources": "^0.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@aashutoshrathi/word-wrap": {
|
"node_modules/@aashutoshrathi/word-wrap": {
|
||||||
@@ -4301,9 +4304,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/hugo-bin": {
|
"node_modules/hugo-bin": {
|
||||||
"version": "0.116.3",
|
"version": "0.116.4",
|
||||||
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.116.3.tgz",
|
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.116.4.tgz",
|
||||||
"integrity": "sha512-FgibDoYLJ0W7z81FA3sqC1XLds/fOzH8nreEo+1gxXGguewuYFk6k7X3FlbiADVWMCkZiY4J4rZfrHovlZbr7g==",
|
"integrity": "sha512-MzTu7T2D88gadlADyCknACJFJXwr2KpzeJrez9RSu5rr0TMiWNJ5esaqnzoBqnptB/SU+qZNnPQ4Qe26sJf+mw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.21.2",
|
"version": "0.21.5",
|
||||||
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"hugo",
|
"hugo",
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"eslint-plugin-import": "^2.29.0",
|
"eslint-plugin-import": "^2.29.0",
|
||||||
"eslint-plugin-n": "^16.3.0",
|
"eslint-plugin-n": "^16.3.0",
|
||||||
"eslint-plugin-promise": "^6.1.1",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"hugo-bin": "^0.116.3",
|
"hugo-bin": "^0.116.4",
|
||||||
"markdownlint-cli2": "^0.10.0",
|
"markdownlint-cli2": "^0.10.0",
|
||||||
"netlify-plugin-hugo-cache-resources": "^0.2.1",
|
"netlify-plugin-hugo-cache-resources": "^0.2.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
@@ -91,7 +91,10 @@
|
|||||||
"stylelint-config-standard-scss": "^11.1.0"
|
"stylelint-config-standard-scss": "^11.1.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"fsevents": "*"
|
"@gethinode/netlify-plugin-dartsass": "^0.2.0",
|
||||||
|
"@netlify/plugin-lighthouse": "*",
|
||||||
|
"fsevents": "*",
|
||||||
|
"netlify-plugin-hugo-cache-resources": "^0.2.1"
|
||||||
},
|
},
|
||||||
"hugo-bin": {
|
"hugo-bin": {
|
||||||
"buildTags": "extended"
|
"buildTags": "extended"
|
||||||
|
Reference in New Issue
Block a user