erynwells.me/layouts/shortcodes/scripts/railroad.html
Eryn Wells 294fa8343b Get all the fingerprinting done!
- Add partials in the resources folder for each of the major resources of my site
- Consolidate .css and .js files via resources.Concat where possible
2022-11-08 17:45:41 -08:00

8 lines
372 B
HTML

{{ $parentID := .Parent.Get "id" -}}
{{ $narrowOnly := not (not (.Get "narrow")) | default false }}
<script defer type="module">
import { railroadDiagram } from {{ (partial "resources/railroad_utils.html" .).RelPermalink }};
railroadDiagram(rr => {
{{ .Inner | safeJS }}
}, "{{ $parentID }}", {{ cond $narrowOnly "true" "false" | safeJS }});
</script>