diff --git a/data/structures/ins.yml b/data/structures/ins.yml new file mode 100644 index 00000000..edfa057b --- /dev/null +++ b/data/structures/ins.yml @@ -0,0 +1,4 @@ +comment: Underlines text. +body: + optional: false + comment: Text to be underlined. diff --git a/exampleSite/content/en/blog/bootstrap-elements.md b/exampleSite/content/en/blog/bootstrap-elements.md index 1b6a3732..57530700 100644 --- a/exampleSite/content/en/blog/bootstrap-elements.md +++ b/exampleSite/content/en/blog/bootstrap-elements.md @@ -287,6 +287,16 @@ As an example, the following shortcode displays a vector image with a symbol ref {{< /example >}} {{% comment %}}{{% /comment %}} +## Ins + +As an example, the following shortcode displays underlined text. + +{{% comment %}}{{% /comment %}} +{{< example >}} +This is an {{}}underlined text{{}}. +{{< /example >}} +{{% comment %}}{{% /comment %}} + ## Link As an example, the following shortcodes render links in different formats. diff --git a/exampleSite/hugo_stats.json b/exampleSite/hugo_stats.json index e7f6c46b..3b2bfade 100644 --- a/exampleSite/hugo_stats.json +++ b/exampleSite/hugo_stats.json @@ -22,6 +22,7 @@ "iframe", "img", "input", + "ins", "label", "li", "link", @@ -575,6 +576,7 @@ "imgix", "indicateur-de-chargement", "infobulle", + "ins", "invite-de-commandes", "kaart", "language-selector", diff --git a/go.mod b/go.mod index b325c006..6d0b631f 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/gethinode/mod-leaflet v1.2.0 // indirect github.com/gethinode/mod-lottie v1.5.11 // indirect github.com/gethinode/mod-simple-datatables v1.1.3 // indirect - github.com/gethinode/mod-utils/v2 v2.8.3 // indirect + github.com/gethinode/mod-utils/v2 v2.8.4 // indirect github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 // indirect github.com/twbs/bootstrap v5.3.3+incompatible // indirect ) diff --git a/go.sum b/go.sum index 4088a34f..8303d54f 100644 --- a/go.sum +++ b/go.sum @@ -336,6 +336,8 @@ github.com/gethinode/mod-utils/v2 v2.8.2 h1:rKndAMmRBSO5Cgoa/2CvF5XchDSvLvd4TYAb github.com/gethinode/mod-utils/v2 v2.8.2/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY= github.com/gethinode/mod-utils/v2 v2.8.3 h1:t1MJcIdFhYi0gCkm8f0DYZwyfq7pRdRc0eNpqZa11ic= github.com/gethinode/mod-utils/v2 v2.8.3/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY= +github.com/gethinode/mod-utils/v2 v2.8.4 h1:ZBkIxFezFz2IrbTt0Y3Nq5ac7klU5N8TY19Qnj5px4M= +github.com/gethinode/mod-utils/v2 v2.8.4/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY= github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo= github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU= github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg= diff --git a/hugo_stats.json b/hugo_stats.json index 85b0fa5b..b8b65586 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -1,7 +1,191 @@ { "htmlElements": { - "tags": null, - "classes": null, - "ids": null + "tags": [ + "a", + "body", + "button", + "div", + "footer", + "form", + "head", + "html", + "img", + "input", + "label", + "li", + "link", + "meta", + "nav", + "ol", + "p", + "path", + "script", + "small", + "span", + "strong", + "svg", + "symbol", + "title", + "ul", + "use" + ], + "classes": [ + "active", + "align-items-center", + "align-self-center", + "align-self-end", + "ball", + "bg-body", + "bg-opacity-10", + "bg-primary", + "bottom-0", + "bottom-bar", + "breadcrumb", + "breadcrumb-item", + "btn", + "btn-close", + "btn-primary", + "checkbox", + "col", + "col-12", + "col-6", + "col-md-2", + "col-md-3", + "col-md-4", + "col-md-8", + "col-md-9", + "col-sm-12", + "collapse", + "collapsed", + "container-fluid", + "container-xxl", + "d-flex", + "d-inline", + "d-md-block", + "d-none", + "display-1", + "display-4", + "emphasis", + "end-0", + "fa", + "fa-10x", + "fa-2x", + "fa-book-open", + "fa-ellipsis", + "fa-face-frown", + "fa-fw", + "fa-github", + "fa-linkedin", + "fa-medium", + "fa-moon", + "fa-sun", + "fab", + "fas", + "fixed-top", + "flex-column", + "flex-fill", + "footer", + "form-control", + "fs-3", + "fs-5", + "fw-30", + "fw-bold", + "hstack", + "img-fluid", + "img-wrap", + "invisible", + "is-search", + "justify-content-center", + "justify-content-end", + "justify-content-start", + "label", + "link-bg-footer", + "link-secondary", + "main-content", + "main-nav-toggler", + "me-auto", + "middle-bar", + "min-vh-100", + "mode-switch", + "ms-auto", + "ms-md-3", + "mt-3", + "mt-4", + "mt-5", + "mt-md-0", + "mx-auto", + "mx-md-0", + "my-auto", + "my-md-auto", + "nav-item", + "nav-link", + "navbar", + "navbar-brand", + "navbar-collapse", + "navbar-container", + "navbar-expand-md", + "navbar-fixed-top", + "navbar-mode-selector", + "navbar-nav", + "navbar-toggler", + "no-js", + "order-0", + "order-1", + "order-md-0", + "order-md-1", + "p-0", + "p-2", + "p-3", + "p-4", + "pb-4", + "pb-md-0", + "position-fixed", + "position-relative", + "ps-1", + "pt-4", + "pt-5", + "pt-md-3", + "px-4", + "px-xxl-0", + "py-3", + "rounded", + "row", + "row-cols-1", + "row-cols-2", + "row-cols-md-2", + "row-cols-sm-3", + "search", + "search-input", + "search-suggestions", + "shadow", + "svg-inline--fa", + "text-center", + "text-decoration-none", + "text-muted", + "text-secondary", + "text-sm-start", + "text-start", + "toast", + "toast-body", + "toast-container", + "toast-header", + "toggler-icon", + "top-bar" + ], + "ids": [ + "fa-face-frown", + "fab-github", + "fab-linkedin", + "fab-medium", + "fas-book-open", + "fas-ellipsis", + "fas-moon", + "fas-sun", + "navbar-0-collapse", + "navbar-mode", + "navbar-mode-checkbox", + "toast-container", + "toast-copied-code-message" + ] } } diff --git a/layouts/shortcodes/ins.html b/layouts/shortcodes/ins.html new file mode 100644 index 00000000..1d31c8d4 --- /dev/null +++ b/layouts/shortcodes/ins.html @@ -0,0 +1,24 @@ + + +{{ $error := false -}} + +{{ $args := partial "utilities/InitArgs.html" (dict "structure" "ins" "args" .Params) }} +{{ if $args.err }} + {{ partial "utilities/LogErr.html" (dict + "partial" "shortcodes/ins.html" + "msg" "Invalid arguments" + "details" $args.errmsg + "file" page.File + )}} +{{ end }} + +{{ $text := .Inner | default "" }} + + +{{- if not $error -}} + {{ $text | strings.TrimSpace | .Page.RenderString }} +{{- end -}} \ No newline at end of file