26 lines
776 B
HTML
26 lines
776 B
HTML
{{ define "banner" }}
|
|
{{ $image := "" }}
|
|
{{ if .Resources.GetMatch "banner*" }}
|
|
{{ $image = .Resources.GetMatch "banner*" }}
|
|
{{ end }}
|
|
{{ partial "snippets/banner_new" (dict "context" . "image" $image "title" .Title "section" .Section) }}
|
|
{{ end }}
|
|
|
|
{{ define "content" }}
|
|
{{ $partial := "" }}
|
|
{{ if eq .Params.tool "generator" }}
|
|
{{ $partial = "tools/generator" }}
|
|
{{ else if eq .Params.tool "nottranslated" }}
|
|
{{ $partial = "tools/nottranslated" }}
|
|
{{ end }}
|
|
<article>
|
|
{{ .Content }}
|
|
{{ if .Params.js }}
|
|
{{ range .Params.js }}
|
|
{{ $js := printf "/js/%s" . | safeURL }}
|
|
<script defer src="{{ $js | urlize }}"></script>
|
|
{{ end }}
|
|
{{ end }}
|
|
</article>
|
|
{{ end }}
|