mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-08 10:34:26 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ea9295da62 | ||
![]() |
b6b5230cc3 | ||
![]() |
b65110fdcc | ||
![]() |
6d3dc7b590 |
@@ -45,6 +45,7 @@
|
|||||||
orientation = "stacked"
|
orientation = "stacked"
|
||||||
style = "border-0 card-zoom"
|
style = "border-0 card-zoom"
|
||||||
homepage = 3
|
homepage = 3
|
||||||
|
separator = true
|
||||||
[projects]
|
[projects]
|
||||||
title = "Projects"
|
title = "Projects"
|
||||||
sort = "title"
|
sort = "title"
|
||||||
@@ -57,6 +58,7 @@
|
|||||||
orientation = "none"
|
orientation = "none"
|
||||||
style = "border-1 card-emphasize"
|
style = "border-1 card-emphasize"
|
||||||
homepage = 3
|
homepage = 3
|
||||||
|
separator = false
|
||||||
# toml-docs-end list
|
# toml-docs-end list
|
||||||
|
|
||||||
[favicon]
|
[favicon]
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
"href" Optional address for the button or hyperlink. If set, a button is added if the list exceeds the
|
"href" Optional address for the button or hyperlink. If set, a button is added if the list exceeds the
|
||||||
maximum number of cards to display.
|
maximum number of cards to display.
|
||||||
"hrefTitle" Optional title of the button or hyperlink as companion to href.
|
"hrefTitle" Optional title of the button or hyperlink as companion to href.
|
||||||
|
"separator" Optional flag to indicate a horizontal line should be added between items on small screens.
|
||||||
|
|
||||||
In addition, the following arguments are passed to the individual cards.
|
In addition, the following arguments are passed to the individual cards.
|
||||||
"class" Optional class attribute of the card element, e.g. “w-50”.
|
"class" Optional class attribute of the card element, e.g. “w-50”.
|
||||||
@@ -57,20 +58,28 @@
|
|||||||
|
|
||||||
{{- $title := .title -}}
|
{{- $title := .title -}}
|
||||||
|
|
||||||
{{ $paginate := false }}
|
{{- $paginate := false -}}
|
||||||
{{ with .paginate }}
|
{{- with .paginate -}}
|
||||||
{{ if ne (printf "%T" .) "bool" }}
|
{{- if ne (printf "%T" .) "bool" -}}
|
||||||
{{ errorf "Invalid value for param 'paginate'"}}
|
{{- errorf "Invalid value for param 'paginate'" -}}
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
{{ $paginate = . }}
|
{{- $paginate = . -}}
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
{{ if not $paginate }}
|
{{- if not $paginate -}}
|
||||||
{{ $list = first $max $list }}
|
{{- $list = first $max $list -}}
|
||||||
{{ end }}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $moreURL := .href -}}
|
{{- $moreURL := .href -}}
|
||||||
{{- $moreTitle := .hrefTitle -}}
|
{{- $moreTitle := .hrefTitle -}}
|
||||||
|
|
||||||
|
{{- $separator := false -}}
|
||||||
|
{{- with .separator -}}
|
||||||
|
{{- if ne (printf "%T" .) "bool" -}}
|
||||||
|
{{- errorf "Invalid value for param 'separator'" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $separator = . -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- $class := .class -}}
|
{{- $class := .class -}}
|
||||||
{{- $color := .color -}}
|
{{- $color := .color -}}
|
||||||
{{- $padding := .padding -}}
|
{{- $padding := .padding -}}
|
||||||
@@ -96,7 +105,7 @@
|
|||||||
)
|
)
|
||||||
-}}
|
-}}
|
||||||
</div>
|
</div>
|
||||||
{{- if (lt $index (sub $max 1)) -}}
|
{{- if and (lt $index (sub $max 1)) $separator -}}
|
||||||
<div class="col d-block d-sm-none">
|
<div class="col d-block d-sm-none">
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
@@ -121,7 +130,7 @@
|
|||||||
)
|
)
|
||||||
-}}
|
-}}
|
||||||
</div>
|
</div>
|
||||||
{{- if (lt $index (sub $max 1)) -}}
|
{{- if and (lt $index (sub $max 1)) $separator -}}
|
||||||
<div class="col d-block d-sm-none">
|
<div class="col d-block d-sm-none">
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -129,44 +129,42 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}}
|
{{- if eq $orientation "none" }}{{ $thumbnail = "" }}{{ $icon = "" }}{{ end -}}
|
||||||
|
|
||||||
<article>
|
{{- if eq $orientation "horizontal" -}}
|
||||||
{{- if eq $orientation "horizontal" -}}
|
<div class="card mb-3 {{ with $color }}bg-{{ . }} text-bg-{{ . }}{{ end }} {{ $class }}">
|
||||||
<div class="card mb-3 {{ with $color }}bg-{{ . }} text-bg-{{ . }}{{ end }} {{ $class }}">
|
<div class="row g-0">
|
||||||
<div class="row g-0">
|
<div class="col-4">
|
||||||
<div class="col-4">
|
{{- if $thumbnail -}}
|
||||||
{{- if $thumbnail -}}
|
{{- partial "image.html" (dict "url" $thumbnail "ratio" "1x1" "outerClass" "h-100 card-img-wrap" "innerClass" "rounded-start card-img-h100" "title" $title) -}}
|
||||||
{{- partial "image.html" (dict "url" $thumbnail "ratio" "1x1" "outerClass" "h-100 card-img-wrap" "innerClass" "rounded-start card-img-h100" "title" $title) -}}
|
{{- else if $icon -}}
|
||||||
{{- else if $icon -}}
|
<div class="pt-{{ $padding }} ps-{{ $padding }} pe-{{ $padding }}">
|
||||||
<div class="pt-{{ $padding }} ps-{{ $padding }} pe-{{ $padding }}">
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}}
|
||||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}}
|
|
||||||
</div>
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8">
|
{{- end -}}
|
||||||
<div class="card-body d-flex p-{{ $padding }} flex-column h-100">
|
</div>
|
||||||
<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) }}</div>
|
<div class="col-8">
|
||||||
<div class="h-100">
|
<div class="card-body d-flex p-{{ $padding }} flex-column h-100">
|
||||||
{{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description) -}}
|
<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) }}</div>
|
||||||
</div>
|
<div class="h-100">
|
||||||
<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) }}</div>
|
{{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description) -}}
|
||||||
</div>
|
</div>
|
||||||
|
<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{- else -}}
|
</div>
|
||||||
<div class="card {{ with $color }}bg-{{ . }} text-bg-{{ . }}{{ end }} {{ $class }}">
|
{{- else -}}
|
||||||
{{- if $thumbnail -}}
|
<div class="card {{ with $color }}bg-{{ . }} text-bg-{{ . }}{{ end }} {{ $class }}">
|
||||||
{{- partial "image.html" (dict "url" $thumbnail "ratio" "16x9" "outerClass" "card-img-wrap" "innerClass" "card-img-top" "title" $title) -}}
|
{{- if $thumbnail -}}
|
||||||
{{- else if $icon -}}
|
{{- partial "image.html" (dict "url" $thumbnail "ratio" "16x9" "outerClass" "card-img-wrap" "innerClass" "card-img-top" "title" $title) -}}
|
||||||
<div class="pt-{{ $padding }} ps-{{ $padding }} pe-{{ $padding }}">
|
{{- else if $icon -}}
|
||||||
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}}
|
<div class="pt-{{ $padding }} ps-{{ $padding }} pe-{{ $padding }}">
|
||||||
</div>
|
{{- partial "assets/icon.html" (dict "icon" (printf "%s fa-4x text-secondary" $icon)) -}}
|
||||||
{{- end -}}
|
|
||||||
<div class="card-body d-flex flex-column p-{{ $padding }}">
|
|
||||||
{{- partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) -}}
|
|
||||||
{{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description) -}}
|
|
||||||
{{- partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) -}}
|
|
||||||
</div>
|
</div>
|
||||||
|
{{- end -}}
|
||||||
|
<div class="card-body d-flex flex-column p-{{ $padding }}">
|
||||||
|
{{- partial "card-caption.html" (dict "page" $page "keywords" $header "color" $color) -}}
|
||||||
|
{{- partial "card-body.html" (dict "title" $title "href" $href "color" $color "description" $description) -}}
|
||||||
|
{{- partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
</div>
|
||||||
</article>
|
{{- end -}}
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
{{- $paginate := true -}}
|
{{- $paginate := true -}}
|
||||||
{{- $sort := "date" -}}
|
{{- $sort := "date" -}}
|
||||||
{{- $reverse := true -}}
|
{{- $reverse := true -}}
|
||||||
|
{{- $separator := false -}}
|
||||||
{{- $orientation := "stacked" -}}
|
{{- $orientation := "stacked" -}}
|
||||||
{{- $cols := 3 -}}
|
{{- $cols := 3 -}}
|
||||||
{{- $color := "" -}}
|
{{- $color := "" -}}
|
||||||
@@ -26,6 +27,7 @@
|
|||||||
{{- with index . "title" }}{{ $title = . }}{{ end -}}
|
{{- with index . "title" }}{{ $title = . }}{{ end -}}
|
||||||
{{- with index . "sort" }}{{ $sort = . }}{{ end -}}
|
{{- with index . "sort" }}{{ $sort = . }}{{ end -}}
|
||||||
{{- if (index . "reverse") }}{{ $reverse = true }}{{ else }}{{ $reverse = false }}{{ end -}}
|
{{- if (index . "reverse") }}{{ $reverse = true }}{{ else }}{{ $reverse = false }}{{ end -}}
|
||||||
|
{{- if (index . "separator") }}{{ $separator = true }}{{ else }}{{ $separator = false }}{{ end -}}
|
||||||
{{- with index . "orientation" }}{{ $orientation = . }}{{ end -}}
|
{{- with index . "orientation" }}{{ $orientation = . }}{{ end -}}
|
||||||
{{- with index . "cols" }}{{ $cols = . }}{{ end -}}
|
{{- with index . "cols" }}{{ $cols = . }}{{ end -}}
|
||||||
{{- with index . "color" }}{{ $color = . }}{{ end -}}
|
{{- with index . "color" }}{{ $color = . }}{{ end -}}
|
||||||
@@ -74,6 +76,7 @@
|
|||||||
"title" $title
|
"title" $title
|
||||||
"href" $sectionURL
|
"href" $sectionURL
|
||||||
"hrefTitle" $moreTitle
|
"hrefTitle" $moreTitle
|
||||||
|
"separator" $separator
|
||||||
"paginate" $paginate
|
"paginate" $paginate
|
||||||
"class" $style
|
"class" $style
|
||||||
"orientation" $orientation
|
"orientation" $orientation
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.9.5",
|
"version": "0.9.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.9.5",
|
"version": "0.9.6",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gethinode/hinode",
|
"name": "@gethinode/hinode",
|
||||||
"version": "0.9.5",
|
"version": "0.9.6",
|
||||||
"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