Aroy-Art-Site/layouts/partials/fragments/sample-custom-fragment.html
2020-12-01 12:12:43 +01:00

27 lines
858 B
HTML

{{- $fragment := .self.Params -}}
{{- $name := strings.TrimSuffix ".md" (replace .self.Name "/index.md" "") -}}
{{- $bg := $fragment.background | default "secondary" }}
<section id="{{ $name }}">
<div class="overlay container-fluid
{{- printf " bg-%s" $bg -}}
">
<div class="container py-5">
<div class="row">
<div class="col text-center
{{- if eq $bg "dark" -}}
{{- printf " text-%s" "light" -}}
{{- else -}}
{{- printf " text-%s" "dark" -}}
{{- end -}}
">
<h4>Custom fragments</h4>
</div>
</div>
<div class="row">
<div class="col text-center">
<h5>Introducing custom fragments</h5>
<p>This is a custom fragments. Dynamically loaded since there was a call for it in the index content directory.</p>
</div>
</div>
</div>
</section>