mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 18:14:28 +00:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ce79ef402e | ||
![]() |
d63c838799 | ||
![]() |
e209704acf | ||
![]() |
01d19609c4 | ||
![]() |
ee3bdfc9a0 | ||
![]() |
a0db71d3ff | ||
![]() |
fc40ee55c3 | ||
![]() |
2f61fcabf2 | ||
![]() |
9d30a98ff3 |
@@ -162,7 +162,7 @@ arguments:
|
||||
parent: cascade
|
||||
optional: true
|
||||
default: start
|
||||
release: v0.23.0-alpha2
|
||||
release: v0.23.0
|
||||
comment: Icon alignment.
|
||||
options:
|
||||
values:
|
||||
@@ -173,7 +173,7 @@ arguments:
|
||||
type: string
|
||||
parent: cascade
|
||||
optional: true
|
||||
release: v0.23.0-alpha2
|
||||
release: v0.23.0
|
||||
comment: Icon style.
|
||||
orientation:
|
||||
type: select
|
||||
@@ -191,15 +191,21 @@ arguments:
|
||||
type: bool
|
||||
parent: cascade
|
||||
optional: true
|
||||
release: v0.23.0-alpha2
|
||||
release: v0.23.0
|
||||
comment: Apply subtle background colors.
|
||||
button:
|
||||
type: bool
|
||||
parent: cascade
|
||||
optional: true
|
||||
release: v0.23.0-beta
|
||||
release: v0.23.0
|
||||
comment: >-
|
||||
Flag indicating the cards should include a button that links to the provided address.
|
||||
buttonLabel:
|
||||
type: string
|
||||
optional: true
|
||||
release: v0.23.2
|
||||
comment: >-
|
||||
Label of the link button, defaults to the card title.
|
||||
hook:
|
||||
type: string
|
||||
optional: true
|
||||
|
@@ -119,4 +119,4 @@ arguments:
|
||||
type: string
|
||||
optional: true
|
||||
comment: Class attribute of the figure caption, e.g. `px-4`.
|
||||
release: v0.23.0-beta
|
||||
release: v0.23.0
|
||||
|
@@ -32,6 +32,7 @@
|
||||
{{- $subtle := .subtle }}
|
||||
{{- $loading := .loading -}}
|
||||
{{- $button := .button -}}
|
||||
{{- $buttonLabel := .buttonLabel -}}
|
||||
{{- $hook := .hook | default "assets/card.html" }}
|
||||
|
||||
<!-- Override arguments -->
|
||||
@@ -104,6 +105,7 @@
|
||||
"style" $style
|
||||
"align" $align
|
||||
"button" $button
|
||||
"buttonLabel" $buttonLabel
|
||||
) -}}
|
||||
{{- $params = merge $params $element }}
|
||||
|
||||
|
@@ -30,6 +30,7 @@
|
||||
{{- $title := .title -}}
|
||||
{{- $subtle := .subtle -}}
|
||||
{{- $button := .button -}}
|
||||
{{- $buttonLabel := .buttonLabel -}}
|
||||
{{- $colorStyle := "" -}}
|
||||
{{ if $color }}
|
||||
{{ if $subtle }}
|
||||
@@ -76,12 +77,16 @@
|
||||
{{- if $href -}}
|
||||
<a href="{{ $href }}" class="{{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }} stretched-link">
|
||||
<p class="card-title fs-5 fw-bold">{{ $title }}</p>
|
||||
{{ with $description }}<div class="card-text {{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }}">{{ . | page.RenderString | safeHTML }}</div>{{ end -}}
|
||||
{{ with $description }}
|
||||
<div class="card-text {{ if $color }}link-bg-{{ $color }}{{ else }}card-body-link{{ end }}">
|
||||
{{ . | safeHTML }}
|
||||
</div>
|
||||
{{ end -}}
|
||||
</a>
|
||||
{{- else -}}
|
||||
<div>
|
||||
{{ with $title }}<p class="card-title fs-5 fw-bold">{{ . }}</p>{{ end -}}
|
||||
{{ with $description }}<div class="card-text">{{ . | page.RenderString | safeHTML }}</div>{{ end -}}
|
||||
{{ with $description }}<div class="card-text">{{ . | safeHTML }}</div>{{ end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -141,7 +146,7 @@
|
||||
</div>
|
||||
{{ if $page }}<div>{{ partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) }}</div>{{ end }}
|
||||
{{ if $button }}
|
||||
{{ $label := $title | default (T "readMore") }}
|
||||
{{ $label := (or $buttonLabel $title) | default (T "readMore") }}
|
||||
<div>{{ partial "assets/button.html" (dict "title" $label "icon" "fas chevron-right" "href" $href "outline" true "size" "sm" "class" "card-button mb-n4") }}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -164,7 +169,7 @@
|
||||
{{ if $page }}{{- partial "card-caption.html" (dict "page" $page "keywords" $footer "color" $color) -}}{{ end }}
|
||||
</div>
|
||||
{{ if $button }}
|
||||
{{ $label := $title | default (T "readMore") }}
|
||||
{{ $label := (or $buttonLabel $title) | default (T "readMore") }}
|
||||
<div class="row p-{{ $padding }}" >
|
||||
<div class="{{ if eq $orientation "horizontal-sm" }}col-4 col-md-2{{ else if eq $orientation "horizontal" }}col-4{{ end }}"></div>
|
||||
<div class="col {{ if eq $orientation "horizontal-sm" }}px-2{{ else if eq $orientation "horizontal"}}px-1 {{ else }}px-2 pt-1{{ end }}">
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.23.0",
|
||||
"version": "0.23.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.23.0",
|
||||
"version": "0.23.2",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@fullhuman/postcss-purgecss": "^5.0.0",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.23.0",
|
||||
"version": "0.23.2",
|
||||
"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