better looking tags

This commit is contained in:
Robin Müller 2023-12-11 10:53:38 +01:00
parent 22c1d31628
commit c87cdded7b
7 changed files with 85 additions and 76 deletions

View File

@ -50,11 +50,10 @@ body {
.fsfw-img {
max-width: 50%;
height: auto;
margin-bottom: 1.0rem;
margin-bottom: 1.5rem;
}
.satrs-img {
max-width: 20%;
height: auto;
margin-bottom: 1.0rem;
}

View File

@ -2,6 +2,7 @@ baseURL = 'https://www.absatsw.irs-uni-stuttgart.de'
languageCode = 'en-us'
title = 'IRS Satellite Division Software Projects'
theme = "minimal-theme"
enableRobotsTXT = true
[menu]
[[menu.main]]

View File

@ -1,73 +1,45 @@
{{ 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">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
<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="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"
>
<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 }}
<span>
{{ with site.GetPage "projects/fsfw" }}
{{ with .Params }}
{{ if (and .homeLogo .homeLogoCss) }}
<img
src="/projects/fsfw/{{ .homeLogo }}"
class={{ .homeLogoCss }}
/>
<br />
{{ end }}
{{ end }}
</span>
</div>
</a>
{{ .Params.homeSummary }}
{{ end }}
</span>
</div>
</a>
<a
href="projects/sat-rs"
class="col d-flex flex-column justify-content-center text-decoration-none"
<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"
>
<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" }}
<span>
{{ with site.GetPage "projects/sat-rs" }}
{{ with .Params }}
{{ if (and .homeLogo .homeLogoCss) }}
<img
@ -75,18 +47,42 @@
class={{ .homeLogoCss }}
/>
<br />
{{ else if .homeSummaryHeader }}
{{ .homeSummaryHeader | safeHTML }}
{{ end }}
{{ end }}
{{ end }}
{{ with site.GetPage "projects/spacepackets" }}
<br />
{{ with site.GetPage "projects/sat-rs" }}
{{ .Params.homeSummary }}
{{ end }}
</div>
</a>
</div>
</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>
</main>
{{ end }}

View File

@ -1,4 +1,6 @@
{{ define "main" }}
{{ .Content }}
<div class="container">
{{ .Content }}
</div>
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
{{ end }}

View File

@ -0,0 +1,3 @@
{{- define "main" }}
<div class="not-found">404</div>
{{- end }}{{/* end main */ -}}

View File

@ -13,11 +13,12 @@ For a given taxonomy, renders a list of terms assigned to the page.
{{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }}
<div>
<div>{{ $label }}:</div>
<ul>
{{- range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
<div class="container text-center">
<ul>
{{- range . }}
<a class="badge px-2 py-2 text-bg-primary" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{- end }}
</ul>
</div>
</div>
{{- end }}

View File

@ -0,0 +1,7 @@
User-agent: *
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
Disallow:
{{- else }}
Disallow: /
{{- end }}
Sitemap: {{ "sitemap.xml" | absURL }}