uci-hugo-landingpage/layouts/partials/sections.html

23 lines
1.0 KiB
HTML
Raw Normal View History

2017-02-28 09:56:46 -08:00
<!-- Renders Section Based on Content -->
{{ if eq .Site.Params.sections.offset true }}{{ $.Scratch.Set "offset" 0 }}{{ else }}{{ $.Scratch.Set "offset" 1 }}{{ end }}
{{ if eq .Site.Params.use_hero true }}{{ $.Scratch.Set "offset" 1 }}{{ end }}
2017-04-07 01:40:29 -07:00
{{ range $i, $e := where ( where .Site.RegularPages "Section" "sections" ) ".Params.hidden" "!=" true }}
{{ $j := add ( $.Scratch.Get "offset" ) $i }}
<section id="{{ .File.BaseFileName }}" class="section section--{{ .File.BaseFileName }} section--{{ if modBool $j 2 }}even{{ else }}odd{{ end }}"
style="color:{{ .Params.color }}; background-color:{{ .Params.bg_color }};"
>
2017-03-10 22:59:27 -08:00
<div class="section__container">
<div class="section__headline section__headline--{{ .File.BaseFileName }}">
2017-03-04 20:02:56 -08:00
<h1>{{ .Title }}</h1>
2017-03-10 22:59:27 -08:00
</div>
<div class="section__content section-content--{{ .File.BaseFileName }}" {{ with .Params.align }}
style="align-items:
{{ if eq . "left" }} flex-start {{ end }}
{{ if eq . "right" }} flex-end {{ end }};"
{{ end }} >
2017-03-10 22:59:27 -08:00
{{ .Content }}
</div>
</div>
2017-02-28 09:56:46 -08:00
</section>
{{ end }}