Commit Graph

3 Commits

Author SHA1 Message Date
Martin Rubli
f3746e0fc4 layouts: map: Make unique ID unique on page, not only shortcut parent
The SHORTCODE.Ordinal method "returns the zero-based ordinal of the shortcode in
relation to its parent." (https://gohugo.io/methods/shortcode/ordinal/)

This is a problem if the same shortcode is used on the different page through
different paths, e.g. once on the page itself and once by a partial (e.g. a
header or footer).

Instead of just using the .Ordinal by itself, use a hash of the parent file
_and_ the ordinal, which gives us a properly unique identifier.
2023-12-18 23:35:44 +01:00
Martin Rubli
475cb4fd5d layouts: layer: Add selectorPosition parameter 2023-10-16 21:13:04 +02:00
Martin Rubli
88b9607472 layouts: Add shortcodes for various leaflet map elements 2023-10-16 21:13:04 +02:00