Compare commits

...

8 Commits

Author SHA1 Message Date
Mark Dumay
4688176216 Merge pull request #529 from gethinode/develop
Add animation support
2023-09-24 06:31:05 +02:00
mark
dbee9aafd7 Prevent processing of empty scss bundles 2023-09-24 05:58:27 +02:00
mark
8c20617b1a Bump dependencies 2023-09-23 17:27:24 +02:00
Mark Dumay
9e2ed6480d Merge branch 'main' into develop 2023-09-23 17:08:35 +02:00
mark
7ef1b1aba9 Remove newlines 2023-09-23 17:07:51 +02:00
mark
b74071d4cf Bump package release 2023-09-23 16:59:17 +02:00
mark
dc7578a5c3 Add animation support 2023-09-23 16:58:38 +02:00
Mark Dumay
2227cf5fe2 Standardize capitalization 2023-09-22 07:21:31 +02:00
15 changed files with 53 additions and 26 deletions

2
.github/release.yml vendored
View File

@@ -14,7 +14,7 @@ changelog:
labels:
- Semver-Minor
- enhancement
- title: 🐛 Bug fixes
- title: 🐛 Bug Fixes
labels:
- fix
- bugfix

View File

@@ -120,4 +120,6 @@ home = ["HTML", "RSS", "REDIR"]
path = "github.com/gethinode/mod-katex"
[[module.imports]]
path = "github.com/gethinode/mod-leaflet"
[[module.imports]]
path = "github.com/gethinode/mod-lottie"
# toml-docs-end modules

View File

@@ -16,7 +16,7 @@
# toml-docs-start modules
[modules]
core = ["bootstrap", "flexsearch", "fontawesome"]
optional = ["leaflet", "katex"]
optional = ["leaflet", "katex", "lottie"]
excludeSCSS = ["bootstrap"]
disableTemplate = ["katex"]
[modules.fontawesome]

View File

@@ -12,7 +12,7 @@
[modules]
core = ["bootstrap", "flexsearch", "fontawesome"]
optional = ["leaflet", "katex"]
optional = ["leaflet", "katex", "lottie"]
excludeSCSS = ["bootstrap"]
disableTemplate = ["katex"]
[modules.fontawesome]

View File

@@ -1,7 +1,7 @@
---
author: Mark Dumay
title: Components
date: 2023-07-21
date: 2023-09-23
description: Use shortcodes to add predefined components powered by external libraries.
tags: ["bootstrap", "shortcode"]
thumbnail:
@@ -10,11 +10,21 @@ thumbnail:
authorURL: https://unsplash.com/@ryoji__iwata
origin: Unsplash
originURL: https://unsplash.com/photos/5siQcvSxCP8
modules: ["katex", "leaflet"]
modules: ["katex", "leaflet", "lottie"]
---
Hinode provides several shortcodes on top of the common [Bootstrap elements]({{< relref "bootstrap-elements" >}}). Refer to the [official documentation]({{< param "links.hinode_docs" >}}) for more details.
## Animation
As an example, the following shortcode shows an animation that plays on hover.
<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* animation data="gatin.json" auto=false hover=true class="col-6 mx-auto" */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->
## Formula (KaTeX)
As an example, the following markdown renders two formulas using the KaTeX typesetting library.

View File

@@ -29,3 +29,7 @@ github.com/gethinode/mod-leaflet v0.3.4 h1:oY+YQ0JiJuhFQNrk9XgFdg0NMsTUQPXNfnILp
github.com/gethinode/mod-leaflet v0.3.4/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
github.com/gethinode/mod-leaflet v0.3.5 h1:69Bv/6zRXhbcTzo7TMr58h3ry47srHRpM1k81LrLbYU=
github.com/gethinode/mod-leaflet v0.3.5/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
github.com/gethinode/mod-lottie v1.0.0 h1:1CUZMcgN5FAyjjyuP3qkaOQ6M5sv6HUAbosW4sIT5VE=
github.com/gethinode/mod-lottie v1.0.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
github.com/gethinode/mod-lottie v1.0.1 h1:+IE7xtnSVQpJS56oBJq9RWKZeFEfxrOZAqE3BSrS/u0=
github.com/gethinode/mod-lottie v1.0.1/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=

View File

@@ -245,6 +245,7 @@
"link-secondary",
"link-success",
"link-warning",
"lottie-animation",
"m-0",
"main-nav-toggler",
"mb-0",
@@ -420,6 +421,7 @@
"accordéon",
"alert",
"alerte",
"animation",
"badge",
"barre-de-navigation",
"body-docs-collapse-15",
@@ -460,6 +462,7 @@
"leaflet-map-0",
"lien",
"link",
"lottie-animation-0",
"map",
"mark",
"nav",

File diff suppressed because one or more lines are too long

1
go.mod
View File

@@ -8,4 +8,5 @@ require (
github.com/gethinode/mod-fontawesome v1.3.2 // indirect
github.com/gethinode/mod-katex v1.0.2 // indirect
github.com/gethinode/mod-leaflet v0.3.5 // indirect
github.com/gethinode/mod-lottie v1.0.1 // indirect
)

4
go.sum
View File

@@ -66,3 +66,7 @@ github.com/gethinode/mod-leaflet v0.3.4 h1:oY+YQ0JiJuhFQNrk9XgFdg0NMsTUQPXNfnILp
github.com/gethinode/mod-leaflet v0.3.4/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
github.com/gethinode/mod-leaflet v0.3.5 h1:69Bv/6zRXhbcTzo7TMr58h3ry47srHRpM1k81LrLbYU=
github.com/gethinode/mod-leaflet v0.3.5/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
github.com/gethinode/mod-lottie v1.0.0 h1:1CUZMcgN5FAyjjyuP3qkaOQ6M5sv6HUAbosW4sIT5VE=
github.com/gethinode/mod-lottie v1.0.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
github.com/gethinode/mod-lottie v1.0.1 h1:+IE7xtnSVQpJS56oBJq9RWKZeFEfxrOZAqE3BSrS/u0=
github.com/gethinode/mod-lottie v1.0.1/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=

View File

@@ -49,19 +49,21 @@
{{- $options := (dict "transpiler" $transpiler "targetPath" $target "enableSourceMap" (not hugo.IsProduction) "vars" $vars) -}}
{{- $bundle := partial "utilities/bundle" (dict "match" $source "filename" (printf "scss/bundle-%d.scss" now.UnixNano) "modules" $modules "basepath" "scss" "debugging" site.Params.debugging.showSCSS) -}}
{{- $css := $bundle | resources.ExecuteAsTemplate $target . | toCSS $options -}}
{{- if gt ($bundle.Content | len) 0 }}
{{- $css := $bundle | resources.ExecuteAsTemplate $target . | toCSS $options -}}
{{ if $core }}
{{- partial "head/icons.html" (dict "css" $css) -}}
{{ end }}
{{- if site.Params.style.purge -}}
{{- $post_options := dict "config" "config" -}}
{{- $css = $css | resources.PostCSS $post_options -}}
{{- end -}}
{{ if $core }}
{{- partial "head/icons.html" (dict "css" $css) -}}
{{ end }}
{{- if site.Params.style.purge -}}
{{- $post_options := dict "config" "config" -}}
{{- $css = $css | resources.PostCSS $post_options -}}
{{- end -}}
{{- if not hugo.IsProduction -}}
<link rel="stylesheet" href="{{ if $absoluteURL }}{{ $css.Permalink }}{{ else }}{{ $css.RelPermalink }}{{ end }}">
{{- else -}}
{{- $css = $css | fingerprint | resources.PostProcess -}}
<link rel="stylesheet" href="{{ if $absoluteURL }}{{ $css.Permalink }}{{ else }}{{ $css.RelPermalink }}{{ end }}" integrity="{{ $css.Data.Integrity }}" crossorigin="anonymous">
{{- if not hugo.IsProduction -}}
<link rel="stylesheet" href="{{ if $absoluteURL }}{{ $css.Permalink }}{{ else }}{{ $css.RelPermalink }}{{ end }}">
{{- else -}}
{{- $css = $css | fingerprint | resources.PostProcess -}}
<link rel="stylesheet" href="{{ if $absoluteURL }}{{ $css.Permalink }}{{ else }}{{ $css.RelPermalink }}{{ end }}" integrity="{{ $css.Data.Integrity }}" crossorigin="anonymous">
{{- end -}}
{{- end -}}

View File

@@ -71,6 +71,6 @@
{{- end -}}
{{- end -}}
{{ if not $error }}
{{ if not $error -}}
<a {{ with $class }}class="{{ . }}" {{ end }}href="{{ $destination | safeURL }}"{{ with $target }} target="{{ . }}"{{ end }}{{ with $rel }} rel="{{ . }}"{{ end }}>{{ $text }}</a>
{{ end }}
{{- end }}

View File

@@ -4,12 +4,12 @@
command = "npm run build:example"
[build.environment]
DART_SASS_VERSION = "1.66.1"
DART_SASS_VERSION = "1.68.0"
HUGO_VERSION = "0.118.2"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
NODE_VERSION = "18.17.1"
NPM_VERSION = "9.6.7"
NODE_VERSION = "18.18.0"
NPM_VERSION = "9.8.1"
# toml-docs-end netlify
[[headers]]

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@gethinode/hinode",
"version": "0.20.3",
"version": "0.20.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@gethinode/hinode",
"version": "0.20.3",
"version": "0.20.4",
"license": "MIT",
"devDependencies": {
"@fullhuman/postcss-purgecss": "^5.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.20.3",
"version": "0.20.4",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",