mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 01:54:23 +00:00
Compare commits
3 Commits
v1.0.0-alp
...
v1.0.0-alp
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4e6aad33d6 | ||
![]() |
8c3989e4f1 | ||
![]() |
42a81bab5f |
@@ -1,6 +1,8 @@
|
||||
comment: >-
|
||||
Defines an individual item.
|
||||
arguments:
|
||||
page:
|
||||
group: partial
|
||||
id:
|
||||
group: partial
|
||||
parent-id:
|
||||
|
@@ -33,8 +33,9 @@ As an example, the following shortcode displays an accordion with three elements
|
||||
{{< example lang="hugo" >}}
|
||||
{{</* accordion */>}}
|
||||
{{</* accordion-item title="Accordion Item #1" show="true" */>}}
|
||||
This is the first item's accordion body. It supports HTML content, if enabled in the goldmark
|
||||
renderer. The item is shown by adding the value `show` to the `class` argument.
|
||||
This is the first item's accordion body.
|
||||
It supports Markdown content. The item
|
||||
is shown by adding the value `show` to the `class` argument.
|
||||
{{</* /accordion-item */>}}
|
||||
{{</* accordion-item title="Accordion Item #2" */>}}
|
||||
This is the second item's accordion body.
|
||||
@@ -352,8 +353,8 @@ As an example, the following shortcode displays a tab group with vertically alig
|
||||
{{< example lang="hugo" >}}
|
||||
{{</* nav tab-type="pills" vertical="true" */>}}
|
||||
{{</* nav-item title="Nav Item #1" show="true" */>}}
|
||||
This is the first item's nav body. It supports HTML content, if enabled in the goldmark
|
||||
renderer. The item is shown by adding the value `show` to the `class` argument.
|
||||
This is the first item's nav body. It supports Markdown content.
|
||||
The item is shown by adding the value `show` to the `class` argument.
|
||||
{{</* /nav-item */>}}
|
||||
{{</* nav-item title="Nav Item #2" */>}}
|
||||
This is the second item's nav body.
|
||||
|
@@ -603,11 +603,11 @@
|
||||
"fab-medium",
|
||||
"fab-whatsapp",
|
||||
"fab-x-twitter",
|
||||
"faq-422100b13f9388f5e5d9733a89582b72",
|
||||
"faq-422100b13f9388f5e5d9733a89582b72-heading-faq-422100b13f9388f5e5d9733a89582b72",
|
||||
"faq-422100b13f9388f5e5d9733a89582b72-item-0",
|
||||
"faq-422100b13f9388f5e5d9733a89582b72-item-1",
|
||||
"faq-422100b13f9388f5e5d9733a89582b72-item-2",
|
||||
"faq-d60f86697e8e822c14f81bde047a063e",
|
||||
"faq-d60f86697e8e822c14f81bde047a063e-heading-faq-d60f86697e8e822c14f81bde047a063e",
|
||||
"faq-d60f86697e8e822c14f81bde047a063e-item-0",
|
||||
"faq-d60f86697e8e822c14f81bde047a063e-item-1",
|
||||
"faq-d60f86697e8e822c14f81bde047a063e-item-2",
|
||||
"fas-1",
|
||||
"fas-2",
|
||||
"fas-3",
|
||||
|
@@ -72,7 +72,7 @@
|
||||
aria-labelledby="{{ $parentID }}-heading-{{ $args.id }}"
|
||||
data-bs-parent="#accordion-{{ $parentID }}"
|
||||
>
|
||||
<div class="accordion-body">{{- $args.body | safeHTML -}}</div>
|
||||
<div class="accordion-body">{{ $args.body | $args.page.RenderString | safeHTML }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
@@ -87,7 +87,7 @@
|
||||
data-has-content="{{ gt (len $args.body) 0 }}"
|
||||
{{ if $args.disabled }} data-disabled-id="{{ $args.id }}"{{ end }}
|
||||
>
|
||||
{{ $args.body }}
|
||||
{{ $args.body | $args.page.RenderString | safeHTML }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
@@ -33,7 +33,8 @@
|
||||
<div class="d-lg-none">
|
||||
<div id="accordion-{{ $id }}" class="accordion mb-3{{ with $args.class }} {{ . }}{{ end }} nav-callout">
|
||||
{{- range $index, $item := $args.list -}}
|
||||
{{ partial "assets/nav-item.html" (dict
|
||||
{{ partial "assets/nav-item.html" (dict
|
||||
"page" $args.page
|
||||
"id" $index
|
||||
"parentID" $id
|
||||
"fade" false
|
||||
|
@@ -30,11 +30,12 @@
|
||||
{{- if isset .Parent.Params "fade" }}{{ $parentFade = partial "utilities/CastBool.html" (.Parent.Get "fade") }}{{ end -}}
|
||||
{{- $fade = or $fade $parentFade -}}
|
||||
{{- $title := or $args.title $args.header -}}
|
||||
{{- $body := trim .Inner " \r\n" | .Page.RenderString -}}
|
||||
{{- $body := trim .Inner " \r\n" -}}
|
||||
{{- $current := "" -}}
|
||||
|
||||
{{/* Main code */}}
|
||||
{{- $output := partial "assets/nav-item.html" (dict
|
||||
"page" .Page
|
||||
"id" $id
|
||||
"parent-id" $parent
|
||||
"fade" $fade
|
||||
@@ -57,6 +58,7 @@
|
||||
{{- end }}
|
||||
|
||||
{{- $alternative := partial "assets/nav-item" (dict
|
||||
"page" .Page
|
||||
"id" $id
|
||||
"parent-id" $parent
|
||||
"fade" $fade
|
||||
|
@@ -21,9 +21,9 @@
|
||||
{{- $innerTitles := .Scratch.Get "inner-title" -}}
|
||||
{{- $input := trim .Inner " \r\n" -}}
|
||||
{{- if $input -}}
|
||||
{{ $input = replace $input "\n" "\n " -}}
|
||||
{{ warnf "Unexpected inner content: %s\r\n %s" .Position $input -}}
|
||||
{{ end }}
|
||||
{{- $input = replace $input "\n" "\n " -}}
|
||||
{{- warnf "Unexpected inner content: %s\r\n %s" .Position $input -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Main code */}}
|
||||
{{- if not $args.err -}}
|
||||
@@ -41,4 +41,4 @@
|
||||
"width" $args.width
|
||||
)
|
||||
-}}
|
||||
{{ end }}
|
||||
{{- end -}}
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "1.0.0-alpha5",
|
||||
"version": "1.0.0-alpha6",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "1.0.0-alpha5",
|
||||
"version": "1.0.0-alpha6",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fullhuman/postcss-purgecss": "^7.0.2",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "1.0.0-alpha5",
|
||||
"version": "1.0.0-alpha6",
|
||||
"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