sat-sw-website/layouts/index.html

93 lines
3.1 KiB
HTML

{{ define "main" }}
<main aria-role="main">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
<div class="container">
<h1 class="display-6">{{ .Content }}</h1>
</div>
<!-- TODO: Find a way that the content of these boxes can be specified in front matter. -->
<div class="container">
<div class="container py-3 text-center overflow-hidden">
<div class="row row-cols-2">
<a
href="projects/fsfw"
class="col d-flex flex-column justify-content-center text-decoration-none"
>
<div
class="bg-body-tertiary rounded d-flex flex-column flex-wrap justify-content-center my-2 px-2 py-3 h-100 border"
>
<span>
{{ with site.GetPage "projects/fsfw" }}
{{ with .Params }}
{{ if (and .homeLogo .homeLogoCss) }}
<img
src="/projects/fsfw/{{ .homeLogo }}"
class={{ .homeLogoCss }}
/>
<br />
{{ end }}
{{ end }}
{{ .Params.homeSummary }}
{{ end }}
</span>
</div>
</a>
<a
href="projects/sat-rs"
class="col d-flex flex-column justify-content-center text-decoration-none"
>
<div
class="bg-body-tertiary rounded d-flex flex-column flex-wrap justify-content-center my-2 py-3 px-2 h-100 border"
>
<span>
{{ with site.GetPage "projects/sat-rs" }}
{{ with .Params }}
{{ if (and .homeLogo .homeLogoCss) }}
<img
src="/projects/sat-rs/{{ .homeLogo }}"
class={{ .homeLogoCss }}
/>
<br />
{{ end }}
{{ end }}
{{ end }}
<br />
{{ with site.GetPage "projects/sat-rs" }}
{{ .Params.homeSummary }}
{{ end }}
</span>
</div>
</a>
<a
href="projects/spacepackets"
class="col d-flex flex-column justify-content-center text-decoration-none"
>
<div
class="bg-body-tertiary rounded d-flex flex-column flex-wrap justify-content-center my-2 py-3 px-2 h-100 border"
>
{{ with site.GetPage "projects/spacepackets" }}
{{ with .Params }}
{{ if (and .homeLogo .homeLogoCss) }}
<img
src="/projects/sat-rs/{{ .homeLogo }}"
class={{ .homeLogoCss }}
/>
<br />
{{ else if .homeSummaryHeader }}
{{ .homeSummaryHeader | safeHTML }}
{{ end }}
{{ end }}
{{ end }}
{{ with site.GetPage "projects/spacepackets" }}
{{ .Params.homeSummary }}
{{ end }}
</div>
</a>
</div>
</div>
</div>
</main>
{{ end }}