mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-21 04:41:53 +02:00
updated logic for unique ids in shortcodes
This commit is contained in:
parent
dc1ff0f998
commit
96fdb6db8b
4 changed files with 4 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
||||||
{{ $time := now.UnixNano }}
|
{{ $id := delimit (slice "carousel" .Ordinal now.UnixNano) "-" }}
|
||||||
{{ $id := delimit (slice "gallery" $time) "-" }}
|
|
||||||
{{ $aspect := default "16-9" (.Get "aspectRatio") }}
|
{{ $aspect := default "16-9" (.Get "aspectRatio") }}
|
||||||
{{ $images := .Page.Resources.Match (.Get "images") }}
|
{{ $images := .Page.Resources.Match (.Get "images") }}
|
||||||
{{ $interval := default "2000" (.Get "interval") }}
|
{{ $interval := default "2000" (.Get "interval") }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
{{ $id := delimit (slice "chart" .Ordinal now.UnixNano) "-" }}
|
||||||
<div class="chart">
|
<div class="chart">
|
||||||
{{ $id := delimit (shuffle (seq 1 9)) "" }}
|
|
||||||
<canvas id="{{ $id }}"></canvas>
|
<canvas id="{{ $id }}"></canvas>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.addEventListener("DOMContentLoaded", (event) => {
|
window.addEventListener("DOMContentLoaded", (event) => {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{ $id := delimit (slice "gallery" .Ordinal) "-" }}
|
{{ $id := delimit (slice "gallery" .Ordinal now.UnixNano) "-" }}
|
||||||
|
|
||||||
<div id="{{ $id }}">
|
<div id="{{ $id }}">
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $tag := .Get "tag" | default "div" -}}
|
{{- $tag := .Get "tag" | default "div" -}}
|
||||||
|
|
||||||
{{ $time := now.UnixNano }}
|
{{ $id := delimit (slice "typeit" .Ordinal now.UnixNano) "-" }}
|
||||||
{{ $id := delimit (slice "typeit" $time) "-" }}
|
|
||||||
|
|
||||||
{{- $attrs := printf `id="%v"` $id -}}
|
{{- $attrs := printf `id="%v"` $id -}}
|
||||||
{{- with $classList -}}
|
{{- with $classList -}}
|
||||||
|
|
Loading…
Add table
Reference in a new issue