mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-23 06:55:43 -06:00
Merge pull request #921 from nunocoracao/886-adding-gallery-shortcode-to-multiple-timeline-items-breaks-lay-out
🐛 updated logic for unique ids in shortcodes
This commit is contained in:
commit
55bb0db3ac
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…
Reference in a new issue