mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 10:04:22 +00:00
Compare commits
19 Commits
v0.21.0-be
...
v0.21.0-be
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6ad6eef347 | ||
![]() |
43ed4d411e | ||
![]() |
7c8d5453cc | ||
![]() |
f4a40367f6 | ||
![]() |
e786ef279a | ||
![]() |
a6684e1bb5 | ||
![]() |
4fbe389245 | ||
![]() |
04b0af5d58 | ||
![]() |
7f797af3eb | ||
![]() |
4a3a0fb0bb | ||
![]() |
f9e9eec611 | ||
![]() |
cb71742a91 | ||
![]() |
638c7054d0 | ||
![]() |
fb21633f8c | ||
![]() |
9bb7cf1825 | ||
![]() |
e00ad4498b | ||
![]() |
a0f7e62616 | ||
![]() |
11653015ab | ||
![]() |
e6a37cab0f |
@@ -18,7 +18,7 @@
|
||||
@import "components/alert.scss";
|
||||
@import "components/blockquote.scss";
|
||||
@import "components/breadcrumb.scss";
|
||||
@import "components/buttons.scss";
|
||||
@import "components/button.scss";
|
||||
@import "components/card.scss";
|
||||
@import "components/carousel.scss";
|
||||
@import "components/clipboard.scss";
|
||||
|
@@ -16,7 +16,7 @@
|
||||
@import "components/alert.scss";
|
||||
@import "components/blockquote.scss";
|
||||
@import "components/breadcrumb.scss";
|
||||
@import "components/buttons.scss";
|
||||
@import "components/button.scss";
|
||||
@import "components/card.scss";
|
||||
@import "components/carousel.scss";
|
||||
@import "components/clipboard.scss";
|
||||
|
@@ -28,3 +28,16 @@
|
||||
background-color: transparent;
|
||||
color: var(--bs-primary) if($enable-important-utilities, !important, null);
|
||||
}
|
||||
|
||||
a.btn {
|
||||
margin-top: $spacer * .25;
|
||||
margin-bottom: $spacer * .25;
|
||||
}
|
||||
|
||||
.btn-close {
|
||||
background-color: transparent if($enable-important-utilities, !important, null);
|
||||
background-image: var(--#{$prefix}btn-close-bg) if($enable-important-utilities, !important, null);
|
||||
background-position: center if($enable-important-utilities, !important, null);
|
||||
background-repeat: no-repeat if($enable-important-utilities, !important, null);
|
||||
background-size: $btn-close-width if($enable-important-utilities, !important, null);
|
||||
}
|
@@ -404,11 +404,11 @@ H{{</* sub 2 */>}}O est un liquide.
|
||||
<!-- markdownlint-disable MD037 -->
|
||||
{{< example lang="hugo" >}}
|
||||
{{</* button toast="toast-example-1" */>}}
|
||||
Affiche la notifiaction #1
|
||||
Affiche la notification #1
|
||||
{{</* /button */>}}
|
||||
|
||||
{{</* button toast="toast-example-2" */>}}
|
||||
Affiche la notifiaction #1
|
||||
Affiche la notification #1
|
||||
{{</* /button */>}}
|
||||
|
||||
{{</* toast id="toast-example-1" header="Premier titre" */>}}
|
||||
|
2
go.mod
2
go.mod
@@ -3,7 +3,7 @@ module github.com/gethinode/hinode
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/gethinode/mod-bootstrap v1.2.1 // indirect
|
||||
github.com/gethinode/mod-bootstrap v1.2.2 // indirect
|
||||
github.com/gethinode/mod-flexsearch v1.5.1 // indirect
|
||||
github.com/gethinode/mod-fontawesome v1.5.0 // indirect
|
||||
github.com/gethinode/mod-katex v1.0.4 // indirect
|
||||
|
2
go.sum
2
go.sum
@@ -8,6 +8,8 @@ github.com/gethinode/mod-bootstrap v1.2.0 h1:JkTcImU3qpi25WgKvUxUYiMoiXtrxrG+Wf/
|
||||
github.com/gethinode/mod-bootstrap v1.2.0/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8=
|
||||
github.com/gethinode/mod-bootstrap v1.2.1 h1:z54dgsbhShhlri+X77Z+yLrg0wz/f8C8ojA/wnlhsJc=
|
||||
github.com/gethinode/mod-bootstrap v1.2.1/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8=
|
||||
github.com/gethinode/mod-bootstrap v1.2.2 h1:Q8E04OKWr9owk7nhQ/NBukUgSFhsECxZsOLEaf5oeiQ=
|
||||
github.com/gethinode/mod-bootstrap v1.2.2/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8=
|
||||
github.com/gethinode/mod-flexsearch v1.0.1 h1:FJkRsUzSnQTXl3MWCigT4E6vfff870UWTnkGqaDGIhA=
|
||||
github.com/gethinode/mod-flexsearch v1.0.1/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
|
||||
github.com/gethinode/mod-flexsearch v1.1.0 h1:7BCMyQDlYlskNXuazt8Jg/jg9WREexu2xVkYqThkAX4=
|
||||
|
@@ -30,7 +30,6 @@
|
||||
"align-items-center",
|
||||
"align-self-center",
|
||||
"bg-body",
|
||||
"bg-info",
|
||||
"bg-opacity-10",
|
||||
"bg-primary",
|
||||
"bottom-0",
|
||||
@@ -82,15 +81,12 @@
|
||||
"flex-column",
|
||||
"flex-fill",
|
||||
"flex-grow-1",
|
||||
"flex-row",
|
||||
"footer",
|
||||
"form-control",
|
||||
"fs-3",
|
||||
"fs-5",
|
||||
"fullscreen",
|
||||
"fw-30",
|
||||
"fw-bold",
|
||||
"h-100",
|
||||
"hstack",
|
||||
"img-fluid",
|
||||
"img-wrap",
|
||||
@@ -169,8 +165,7 @@
|
||||
"toast-container",
|
||||
"toast-header",
|
||||
"toggler-icon",
|
||||
"top-bar",
|
||||
"w-100"
|
||||
"top-bar"
|
||||
],
|
||||
"ids": [
|
||||
"-theme",
|
||||
|
@@ -65,6 +65,8 @@
|
||||
translation: "Startseite"
|
||||
- id: languageSwitcherLabel
|
||||
translation: "Sprache"
|
||||
- id: close
|
||||
translation: "Schließen"
|
||||
|
||||
# Table of contents
|
||||
- id: toc
|
||||
|
@@ -71,6 +71,8 @@
|
||||
translation: "Home"
|
||||
- id: languageSwitcherLabel
|
||||
translation: "Language"
|
||||
- id: close
|
||||
translation: "Close"
|
||||
|
||||
# Table of contents
|
||||
- id: toc
|
||||
|
@@ -67,6 +67,8 @@
|
||||
translation: "Accueil"
|
||||
- id: languageSwitcherLabel
|
||||
translation: "Langage"
|
||||
- id: close
|
||||
translation: "Fermer"
|
||||
|
||||
# Table of contents
|
||||
- id: toc
|
||||
|
@@ -69,6 +69,8 @@
|
||||
translation: "Home"
|
||||
- id: languageSwitcherLabel
|
||||
translation: "Taal"
|
||||
- id: close
|
||||
translation: "Sluiten"
|
||||
|
||||
# Table of contents
|
||||
- id: toc
|
||||
|
@@ -40,18 +40,9 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Define section headings */ -}}
|
||||
{{- $headings := slice -}}
|
||||
{{ if .Fragments }}
|
||||
{{ $headings = $headings | append .Title }}
|
||||
{{- range .Fragments.Headings }}
|
||||
{{- range .Headings }}
|
||||
{{- $headings = $headings | append .Title -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{- $.Scratch.Set "headings" $headings -}}
|
||||
{{ $sections := partial "utilities/GetSections.html" . }}
|
||||
{{- $.Scratch.Set "sections" $sections -}}
|
||||
|
||||
{{- $section := .Section }}
|
||||
{{- $fullCover := or (or (and .IsHome .Site.Params.home.fullCover) .Page.Params.fullCover) .Site.Params.main.footerBelowFold }}
|
||||
|
||||
<!doctype html>
|
||||
|
@@ -1,5 +1,11 @@
|
||||
{{- define "featured" }}
|
||||
{{- $headings := $.Scratch.Get "headings" -}}
|
||||
{{- $sections := $.Scratch.Get "sections" -}}
|
||||
{{- $headings := slice }}
|
||||
{{ if .Params.sectionMenu }}
|
||||
{{ range $sections }}
|
||||
{{ $headings = $headings | append .title }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{- $page := . -}}
|
||||
{{- $orientation := site.Params.list.feature.orientation | default "horizontal" -}}
|
||||
@@ -33,86 +39,9 @@
|
||||
|
||||
{{- define "main" -}}
|
||||
{{- $page := . -}}
|
||||
{{- $sections := slice -}}
|
||||
{{- $sections = $sections | append $page.Type -}}
|
||||
{{ with $page.Params.sections }}
|
||||
{{ $sections = $sections | append . }}
|
||||
{{ end }}
|
||||
{{- $headings := slice -}}
|
||||
{{- $sections := $.Scratch.Get "sections" -}}
|
||||
{{- $layout := $page.Params.layout -}}
|
||||
|
||||
{{ if $page.IsHome }}
|
||||
{{- if not $page.Params.sections -}}
|
||||
{{- with site.Params.home.sections }}
|
||||
{{ $sections = $sections | append . }}
|
||||
{{ else }}
|
||||
{{ range $section := site.Sections }}
|
||||
{{ $sections = $sections | append $section.Type }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{ else }}
|
||||
{{ $headings = $headings | append $page.Title }}
|
||||
{{- range .Fragments.Headings }}
|
||||
{{- range .Headings }}
|
||||
{{- $headings = $headings | append .Title -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{/* Generate section content first to determine headings */}}
|
||||
{{ $body := "" }}
|
||||
{{- range $index, $section := $sections -}}
|
||||
{{- $sectionPage := site.GetPage "section" $section -}}
|
||||
{{- $sectionURL := $sectionPage.RelPermalink -}}
|
||||
{{ with $sectionPage.Params.redirect}}
|
||||
{{ $target := partial "utilities/GetPage.html" (dict "url" . "page" $page) }}
|
||||
{{- if not $target -}}
|
||||
{{ if eq (printf "%T" $page.File) "*hugolib.fileInfo"}}
|
||||
{{- errorf "Cannot find redirect target on page '%s': %s" $page.File . -}}
|
||||
{{ else }}
|
||||
{{- errorf "Cannot find redirect target: %s" . -}}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{- $sectionURL = $target.RelPermalink -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- $title := or $sectionPage.Title $sectionPage.Type -}}
|
||||
|
||||
{{- with (index site.Params.sections $section) -}}
|
||||
{{- with index . "title" }}{{ $title = or . $title }}{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $thumbnail := (or (and (reflect.IsMap $sectionPage.Params.Thumbnail) $sectionPage.Params.Thumbnail.url) $sectionPage.Params.Thumbnail) -}}
|
||||
{{- $icon := $sectionPage.Params.Icon -}}
|
||||
{{- $content := $sectionPage.Content -}}
|
||||
{{- $sectionTitle := strings.FirstUpper $sectionPage.Type -}}
|
||||
{{- $moreTitle := "" -}}
|
||||
{{- with (index site.Params.sections $section) -}}
|
||||
{{- with index . "reference" }}{{ $moreTitle = . }}{{ end -}}
|
||||
{{- end -}}
|
||||
{{- $moreTitle = or $moreTitle (printf (T "more" (pluralize $sectionTitle))) -}}
|
||||
|
||||
{{- $sectionContent := trim (partial "assets/section-list.html" (dict
|
||||
"page" $page
|
||||
"section" $section
|
||||
"home" $page.IsHome
|
||||
"simple" (eq (len $sections) 1)
|
||||
"nested" (and $page.IsHome (eq $section $page.Section))
|
||||
"thumbnail" $thumbnail
|
||||
"icon" $icon
|
||||
"content" $content
|
||||
"moreTitle" $moreTitle
|
||||
"sectionURL" $sectionURL)) " \r\n"
|
||||
-}}
|
||||
|
||||
{{ if $sectionContent }}
|
||||
{{- if not $page.IsHome }}{{ $headings = $headings | append $title }}{{ end -}}
|
||||
{{- $body = printf "%s%s" $body $sectionContent }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Display main content */}}
|
||||
<div class="container-xxl flex-fill px-4 px-xxl-0">
|
||||
{{- if ne $layout "featured" -}}
|
||||
{{ if and (not $page.IsHome) site.Params.navigation.breadcrumb }}
|
||||
@@ -130,7 +59,7 @@
|
||||
{{- end -}}
|
||||
{{- $content := partial "utilities/ProcessContent" (dict "page" $page "raw" $page.RawContent) -}}
|
||||
{{ $content | safeHTML }}
|
||||
{{ if and (and (and $sections (eq (len $sections) 1)) (not $body)) (not $content) }}
|
||||
{{ if and (and $sections (eq (len $sections) 1)) (not $content) }}
|
||||
<p class="pt-4">{{- T "emptyList" }}.</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -153,5 +82,7 @@
|
||||
</div>
|
||||
|
||||
{{/* Display generated sections */}}
|
||||
{{ $body | safeHTML }}
|
||||
{{ range $sections }}
|
||||
{{ .content | safeHTML }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
@@ -37,7 +37,7 @@
|
||||
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvass-sidebar" aria-inledby="offcanvas-label">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title" id="offcanvas-label">{{ strings.FirstUpper $.Section }}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="{{ T "close" }}"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
{{ . | safeHTML }}
|
||||
|
@@ -161,7 +161,7 @@
|
||||
>
|
||||
<div class="d-flex justify-content-{{ $justify }}">
|
||||
<div class="my-auto">{{ $title | safeHTML }}</div>
|
||||
{{- with $icon }}<div class="align-self-center{{ if $title }}{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon) }}</div>{{ end }}
|
||||
{{- with $icon }}<div class="align-self-center{{ if $title }}{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon "spacing" false) }}</div>{{ end }}
|
||||
</div>
|
||||
|
||||
{{- with $badge }}
|
||||
|
@@ -242,8 +242,9 @@
|
||||
<!-- Insert the brand logo or name -->
|
||||
<a class="navbar-brand mx-auto" href="{{ site.Home.RelPermalink }}">
|
||||
{{- if (and $logoLight $logoDark) -}}
|
||||
<img src="{{if $absoluteURL }}{{ absURL $logoLight }}{{ else }}{{ $logoLight }}{{ end }}" class="d-none-dark" alt="{{ $title }} logo" height="30">
|
||||
<img src="{{if $absoluteURL }}{{ absURL $logoDark }}{{ else }}{{ $logoDark }}{{ end }}" class="d-none-light" alt="{{ $title }} logo" height="30">
|
||||
{{ $width := partial "utilities/GetWidth.html" (dict "path" $logoLight "height" 30) }}
|
||||
<img src="{{if $absoluteURL }}{{ absURL $logoLight }}{{ else }}{{ $logoLight }}{{ end }}" class="d-none-dark" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
|
||||
<img src="{{if $absoluteURL }}{{ absURL $logoDark }}{{ else }}{{ $logoDark }}{{ end }}" class="d-none-light" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
|
||||
{{- else if $logo -}}
|
||||
{{ $width := partial "utilities/GetWidth.html" (dict "path" $logo "height" 30) }}
|
||||
<img src="{{if $absoluteURL }}{{ absURL $logo }}{{ else }}{{ $logo }}{{ end }}" alt="{{ $title }} logo" height="30"{{ with $width }} width="{{ . }}"{{ end }}>
|
||||
@@ -356,7 +357,7 @@
|
||||
<input id="search-input-modal" class="search-input form-control is-search" tabindex="1" type="search" placeholder="{{ T "ui_search" }}..." aria-label="{{ T "ui_search" }}" autocomplete="off">
|
||||
</form>
|
||||
</div>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ T "close" }}"></button>
|
||||
</div>
|
||||
<div class="modal-body p-2">
|
||||
<div class="search-suggestions bg-body" data-no-results="{{ T "ui_no_results" }}"></div>
|
||||
|
@@ -10,6 +10,6 @@
|
||||
{{- if $pageAlertMsg -}}
|
||||
<div id="page-alert" class="alert alert-primary alert-no-decoration fade show d-flex align-items-center small m-0 py-1" data-page-alert-version="{{ $version }}">
|
||||
<a href="{{ with $pageAlertURL }}{{ . }}{{ else }}#!{{ end }}" class="text-decoration-none flex-grow-1 text-center">{{ $pageAlertMsg }}</a>
|
||||
<button id="page-alert-btn-close" type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||||
<button id="page-alert-btn-close" type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{{ T "close" }}"></button>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
<div id="{{ $id }}" class="toast{{ with $class }} {{ . }}{{ end }}" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-header">
|
||||
{{ with $header }}<strong class="me-auto">{{ . }}</strong>{{ end }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="{{ T "close" }}"></button>
|
||||
</div>
|
||||
<div class="toast-body">{{ $message }}</div>
|
||||
</div>
|
||||
|
@@ -31,7 +31,8 @@
|
||||
<span class="fs-5 text-muted">{{ $page.Description }}</span>
|
||||
|
||||
{{ if $actions }}
|
||||
<div class="hstack{{ if gt (len $actions) 1 }} gap-3{{ end }} justify-content-{{ $align}} pt-5 pt-md-3">
|
||||
{{- $actions = sort $actions "weight" "asc" -}}
|
||||
<div class="hstack{{ if gt (len $actions) 1 }} gap-1{{ end }} justify-content-{{ $align}} pt-5 pt-md-3">
|
||||
{{ range $actions }}
|
||||
{{ partial "assets/button.html" (dict "href" .url "icon" .icon "title" .title "outline" .outline "order" "last" "justify" "start") }}
|
||||
{{ end }}
|
||||
|
76
layouts/partials/utilities/GetSections.html
Normal file
76
layouts/partials/utilities/GetSections.html
Normal file
@@ -0,0 +1,76 @@
|
||||
{{- $page := . -}}
|
||||
|
||||
{{/* Add title for current page */}}
|
||||
{{- $items := slice -}}
|
||||
{{ $items = $items | append (dict "title" .Title "content" "" )}}
|
||||
|
||||
{{/* Identify page sections */}}
|
||||
{{- $sections := slice -}}
|
||||
{{- $sections = $sections | append $page.Type -}}
|
||||
{{ with $page.Params.sections }}
|
||||
{{ $sections = $sections | append . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $page.IsHome }}
|
||||
{{- if not $page.Params.sections -}}
|
||||
{{- with site.Params.home.sections }}
|
||||
{{ $sections = $sections | append . }}
|
||||
{{ else }}
|
||||
{{ range $section := site.Sections }}
|
||||
{{ $sections = $sections | append $section.Type }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
||||
{{/* Generate title and content for each section */}}
|
||||
{{- range $index, $section := $sections -}}
|
||||
{{- $sectionPage := site.GetPage "section" $section -}}
|
||||
{{- $sectionURL := $sectionPage.RelPermalink -}}
|
||||
{{ with $sectionPage.Params.redirect}}
|
||||
{{ $target := partial "utilities/GetPage.html" (dict "url" . "page" $page) }}
|
||||
{{- if not $target -}}
|
||||
{{ if eq (printf "%T" $page.File) "*hugolib.fileInfo"}}
|
||||
{{- errorf "Cannot find redirect target on page '%s': %s" $page.File . -}}
|
||||
{{ else }}
|
||||
{{- errorf "Cannot find redirect target: %s" . -}}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{- $sectionURL = $target.RelPermalink -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- $title := or $sectionPage.Title $sectionPage.Type -}}
|
||||
|
||||
{{- with (index site.Params.sections $section) -}}
|
||||
{{- with index . "title" }}{{ $title = or . $title }}{{ end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $thumbnail := (or (and (reflect.IsMap $sectionPage.Params.Thumbnail) $sectionPage.Params.Thumbnail.url) $sectionPage.Params.Thumbnail) -}}
|
||||
{{- $icon := $sectionPage.Params.Icon -}}
|
||||
{{- $content := $sectionPage.Content -}}
|
||||
{{- $sectionTitle := strings.FirstUpper $sectionPage.Type -}}
|
||||
{{- $moreTitle := "" -}}
|
||||
{{- with (index site.Params.sections $section) -}}
|
||||
{{- with index . "reference" }}{{ $moreTitle = . }}{{ end -}}
|
||||
{{- end -}}
|
||||
{{- $moreTitle = or $moreTitle (printf (T "more" (pluralize $sectionTitle))) -}}
|
||||
|
||||
{{- $sectionContent := trim (partial "assets/section-list.html" (dict
|
||||
"page" $page
|
||||
"section" $section
|
||||
"home" $page.IsHome
|
||||
"simple" (eq (len $sections) 1)
|
||||
"nested" (and $page.IsHome (eq $section $page.Section))
|
||||
"thumbnail" $thumbnail
|
||||
"icon" $icon
|
||||
"content" $content
|
||||
"moreTitle" $moreTitle
|
||||
"sectionURL" $sectionURL)) " \r\n"
|
||||
-}}
|
||||
|
||||
{{ if $sectionContent }}
|
||||
{{ $items = $items | append (dict "title" $title "content" $sectionContent)}}
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{ return $items }}
|
@@ -5,7 +5,7 @@
|
||||
{{ if eq (path.Ext $path) ".svg" }}
|
||||
{{ $path := path.Join "static" .path }}
|
||||
{{ if fileExists $path }}
|
||||
{{ with findRE `viewBox="\d+[\s,]\d+[\s,]\d+[\s,]\d+"` (readFile $path) 1 }}
|
||||
{{ with findRE `viewBox="\d*\.?\d+[\s,]\d*\.?\d+[\s,]\d*\.?\d+[\s,]\d*\.?\d+"` (readFile $path) 1 }}
|
||||
{{ $content := split (index (split (index . 0) `"`) 1) " " }}
|
||||
{{ $viewbox_width := float (index $content 2) }}
|
||||
{{ $viewbox_height := float (index $content 3) }}
|
||||
|
@@ -56,7 +56,7 @@
|
||||
{{ with $icon }}<div class="pt-1 pe-2">{{ . }}</div>{{ end }}
|
||||
<div class="flex-grow-1 my-auto">
|
||||
{{ trim .Inner " \r\n" | .Page.RenderString | safeHTML -}}
|
||||
{{ if $dismissible }}<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>{{ end }}
|
||||
{{ if $dismissible }}<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{{ T "close" }}"></button>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.21.0-beta3",
|
||||
"version": "0.21.0-beta5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.21.0-beta3",
|
||||
"version": "0.21.0-beta5",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@fullhuman/postcss-purgecss": "^5.0.0",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.21.0-beta3",
|
||||
"version": "0.21.0-beta5",
|
||||
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
|
||||
"keywords": [
|
||||
"hugo",
|
||||
|
Reference in New Issue
Block a user