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 { .fsfw-img {
max-width: 50%; max-width: 50%;
height: auto; height: auto;
margin-bottom: 1.0rem; margin-bottom: 1.5rem;
} }
.satrs-img { .satrs-img {
max-width: 20%; max-width: 20%;
height: auto; height: auto;
margin-bottom: 1.0rem;
} }

View File

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

View File

@ -1,73 +1,45 @@
{{ define "main" }} {{ 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"> <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> <h1 class="display-6">{{ .Content }}</h1>
</div> </div>
<!-- TODO: Find a way that the content of these boxes can be specified in front matter. --> <!-- 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="container py-3 text-center overflow-hidden"> <div class="row row-cols-2">
<div class="row row-cols-2"> <a
<a href="projects/fsfw"
href="projects/fsfw" class="col d-flex flex-column justify-content-center text-decoration-none"
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 <span>
class="bg-body-tertiary rounded d-flex flex-column flex-wrap justify-content-center my-2 px-2 py-3 h-100 border" {{ with site.GetPage "projects/fsfw" }}
> {{ with .Params }}
<span> {{ if (and .homeLogo .homeLogoCss) }}
{{ with site.GetPage "projects/fsfw" }} <img
{{ with .Params }} src="/projects/fsfw/{{ .homeLogo }}"
{{ if (and .homeLogo .homeLogoCss) }} class={{ .homeLogoCss }}
<img />
src="/projects/fsfw/{{ .homeLogo }}" <br />
class={{ .homeLogoCss }} {{ end }}
/>
<br />
{{ end }}
{{ end }}
{{ .Params.homeSummary }}
{{ end }} {{ end }}
</span> {{ .Params.homeSummary }}
</div> {{ end }}
</a> </span>
</div>
</a>
<a <a
href="projects/sat-rs" href="projects/sat-rs"
class="col d-flex flex-column justify-content-center text-decoration-none" 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 <span>
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/sat-rs" }}
>
<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 }} {{ with .Params }}
{{ if (and .homeLogo .homeLogoCss) }} {{ if (and .homeLogo .homeLogoCss) }}
<img <img
@ -75,18 +47,42 @@
class={{ .homeLogoCss }} class={{ .homeLogoCss }}
/> />
<br /> <br />
{{ else if .homeSummaryHeader }}
{{ .homeSummaryHeader | safeHTML }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ with site.GetPage "projects/spacepackets" }} <br />
{{ with site.GetPage "projects/sat-rs" }}
{{ .Params.homeSummary }} {{ .Params.homeSummary }}
{{ end }} {{ end }}
</div> </span>
</a> </div>
</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> </div>
</main>
{{ end }} {{ end }}

View File

@ -1,4 +1,6 @@
{{ define "main" }} {{ define "main" }}
{{ .Content }} <div class="container">
{{ .Content }}
</div>
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
{{ end }} {{ 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 }} {{- with $page.GetTerms $taxonomy }}
{{- $label := (index . 0).Parent.LinkTitle }} {{- $label := (index . 0).Parent.LinkTitle }}
<div> <div>
<div>{{ $label }}:</div> <div class="container text-center">
<ul> <ul>
{{- range . }} {{- range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li> <a class="badge px-2 py-2 text-bg-primary" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{- end }} {{- end }}
</ul> </ul>
</div>
</div> </div>
{{- end }} {{- 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 }}