mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-11 12:03:10 +00:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a4057ad498 | ||
![]() |
09d3294867 | ||
![]() |
7b167e32c4 | ||
![]() |
941698cc15 | ||
![]() |
1ec7d7477b | ||
![]() |
9ef702ef06 | ||
![]() |
5e41fddef3 | ||
![]() |
a620900c18 | ||
![]() |
cc25fe311d |
@@ -42,6 +42,12 @@
|
|||||||
host = "youtube"
|
host = "youtube"
|
||||||
# toml-docs-end videos
|
# toml-docs-end videos
|
||||||
|
|
||||||
|
[dam]
|
||||||
|
videoCodecs = [
|
||||||
|
"webm/vp9",
|
||||||
|
"mp4/h265",
|
||||||
|
"mp4"
|
||||||
|
]
|
||||||
|
|
||||||
# toml-docs-start debugging
|
# toml-docs-start debugging
|
||||||
[debugging]
|
[debugging]
|
||||||
|
@@ -64,6 +64,11 @@
|
|||||||
|
|
||||||
[dam]
|
[dam]
|
||||||
dimensions = "dimensions.yml"
|
dimensions = "dimensions.yml"
|
||||||
|
videoCodecs = [
|
||||||
|
"webm/vp9",
|
||||||
|
"mp4/h265",
|
||||||
|
"mp4"
|
||||||
|
]
|
||||||
|
|
||||||
[[dam.providers]]
|
[[dam.providers]]
|
||||||
name = "Cloudinary"
|
name = "Cloudinary"
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
{{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
|
{{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if $.Attributes.class }}
|
{{ if $.Attributes.class }}
|
||||||
<div class="{{ $.Attributes.class }}">{{ . }}</div>
|
<div class="{{ $.Attributes.class | safeHTMLAttr }}">{{ .Value }}</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ .Value }}
|
{{ .Value }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
{{- $title := .title -}}
|
{{- $title := .title -}}
|
||||||
{{- $description := .description -}}
|
{{- $description := .description -}}
|
||||||
{{- $content := .content -}}
|
{{- $content := .content -}}
|
||||||
|
{{ if site.Params.main.titleCase }}{{ $title = title $title }}{{ end }}
|
||||||
|
|
||||||
<!-- Main code -->
|
<!-- Main code -->
|
||||||
{{ with $title }}<p id="{{ anchorize . }}" class="display-4 py-5{{ if and page.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }}
|
{{ with $title }}<p id="{{ anchorize . }}" class="display-4 py-5{{ if and page.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }}
|
||||||
|
@@ -37,6 +37,9 @@
|
|||||||
<li class="mb-1">
|
<li class="mb-1">
|
||||||
<div class="d-flex w-100 p-0 sidebar-item-group">
|
<div class="d-flex w-100 p-0 sidebar-item-group">
|
||||||
<div class="text-start flex-grow-1 {{ if $current }}fw-bold{{ end }}">
|
<div class="text-start flex-grow-1 {{ if $current }}fw-bold{{ end }}">
|
||||||
|
{{- $groupTitle := $group.title -}}
|
||||||
|
{{ if site.Params.main.titleCase }}{{ $groupTitle = title $groupTitle }}{{ end }}
|
||||||
|
|
||||||
{{ $dest := $href }}
|
{{ $dest := $href }}
|
||||||
{{ $target := "" }}
|
{{ $target := "" }}
|
||||||
{{ if or $current (not $ref) }}
|
{{ if or $current (not $ref) }}
|
||||||
@@ -45,7 +48,7 @@
|
|||||||
<a {{ with $dest }} href="{{ . }}"{{ else }}
|
<a {{ with $dest }} href="{{ . }}"{{ else }}
|
||||||
data-bs-toggle="collapse"
|
data-bs-toggle="collapse"
|
||||||
data-bs-target="#sidebar-collapse-{{ $index }}-{{ $level }}"
|
data-bs-target="#sidebar-collapse-{{ $index }}-{{ $level }}"
|
||||||
{{ end }}>{{ $group.title }}</a>
|
{{ end }}>{{ $groupTitle }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
@@ -117,9 +117,19 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $url := printf "https://player.cloudinary.com/embed/?cloud_name=%s&public_id=%s" $account $id }}
|
{{ $url := printf "https://player.cloudinary.com/embed/?cloud_name=%s&public_id=%s" $account $id }}
|
||||||
{{ $params := "&controls=true" }}
|
{{ $params := "" }}
|
||||||
{{ if $autoplay }}{{ $params = print $params "&autoplay=true&muted=true" }}{{ end }}
|
{{ if $autoplay }}{{ $params = print $params "&player[autoplay]=true&player[muted]=true" }}{{ end }}
|
||||||
{{ with .options }}{{ $params = print "&" . }}{{ end }}
|
|
||||||
|
{{ $codecs := slice }}
|
||||||
|
{{ with index site.Params "dam" }}{{ with index . "videoCodecs" }}{{ $codecs = . }}{{ end }}{{ end }}
|
||||||
|
{{ range $k, $v := $codecs }}
|
||||||
|
{{ $params = printf "%s&source[source_types][%d]=%s" $params $k (urlquery $v) }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if gt (len $codecs) 0 }}
|
||||||
|
{{ $params = print $params "&source[transformation][1][quality]=auto" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with .options }}{{ $params = print $params "&" . }}{{ end }}
|
||||||
{{ $params = strings.TrimLeft "?&" $params }}
|
{{ $params = strings.TrimLeft "?&" $params }}
|
||||||
{{ with $params }}{{ $url = print $url "&" . }}{{ end }}
|
{{ with $params }}{{ $url = print $url "&" . }}{{ end }}
|
||||||
{{ $padding := "56.25%" }}
|
{{ $padding := "56.25%" }}
|
||||||
@@ -138,7 +148,7 @@
|
|||||||
{{ if not $title }}{{ $title = printf "Cloudinary video '%s'" (path.BaseName $id) }}{{ end }}
|
{{ if not $title }}{{ $title = printf "Cloudinary video '%s'" (path.BaseName $id) }}{{ end }}
|
||||||
|
|
||||||
<div class="video-embedded {{ $class }}" data-video-padding="{{ $padding }}">
|
<div class="video-embedded {{ $class }}" data-video-padding="{{ $padding }}">
|
||||||
<iframe src="{{ $url | safeHTMLAttr }}" title="{{ $title }}" webkitallowfullscreen mozallowfullscreen allowfullscreen>
|
<iframe src="{{ $url | safeURL }}" title="{{ $title }}" allow="autoplay; fullscreen; encrypted-media" frameborder="0">
|
||||||
</iframe>
|
</iframe>
|
||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
@@ -33,7 +33,10 @@
|
|||||||
{{- $align := .align | default "center" -}}
|
{{- $align := .align | default "center" -}}
|
||||||
|
|
||||||
<div class="text-{{ $align }}">
|
<div class="text-{{ $align }}">
|
||||||
{{ with $page.Title }}<p class="display-4">{{ . }}</p>{{ end }}
|
{{ $title := $page.Title }}
|
||||||
|
{{ if site.Params.main.titleCase }}{{ $title = title $title }}{{ end }}
|
||||||
|
|
||||||
|
{{ with $title }}<p class="display-4">{{ . }}</p>{{ end }}
|
||||||
<span class="fs-5 text-muted">{{ $page.Description }}</span>
|
<span class="fs-5 text-muted">{{ $page.Description }}</span>
|
||||||
|
|
||||||
{{ if $actions }}
|
{{ if $actions }}
|
||||||
|
@@ -46,6 +46,8 @@
|
|||||||
{{- with index . "title" }}{{ $title = or . $title }}{{ end -}}
|
{{- with index . "title" }}{{ $title = or . $title }}{{ end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{ if site.Params.main.titleCase }}{{ $title = title $title }}{{ end }}
|
||||||
|
|
||||||
{{- $thumbnail := "" -}}
|
{{- $thumbnail := "" -}}
|
||||||
{{ if reflect.IsMap $sectionPage.Params.Thumbnail }}{{ $thumbnail = $sectionPage.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $sectionPage.Params.Thumbnail }}{{ end }}
|
{{ if reflect.IsMap $sectionPage.Params.Thumbnail }}{{ $thumbnail = $sectionPage.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $sectionPage.Params.Thumbnail }}{{ end }}
|
||||||
{{- $icon := $sectionPage.Params.Icon -}}
|
{{- $icon := $sectionPage.Params.Icon -}}
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.29.0",
|
"version": "0.29.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.29.0",
|
"version": "0.29.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fullhuman/postcss-purgecss": "^7.0.2",
|
"@fullhuman/postcss-purgecss": "^7.0.2",
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.29.0",
|
"version": "0.29.2",
|
||||||
"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",
|
||||||
|
Reference in New Issue
Block a user