feat: complete restyling of basic components

This commit is contained in:
2025-04-28 15:42:51 +02:00
parent 30aeb6578e
commit 807a1595d8
20 changed files with 314 additions and 63 deletions

View File

@@ -2,8 +2,8 @@ body {
color: #222;
font-family: sans-serif;
line-height: 1.5;
margin: 1rem;
max-width: 768px;
margin: 2rem;
max-width: 100%;
}
header {
@@ -11,6 +11,11 @@ header {
margin-bottom: 1rem;
}
main {
display: block;
padding: 1rem 2rem;
}
footer {
border-top: 1px solid #222;
margin-top: 1rem;

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>404 Not Found</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bulma/css/bulma.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<section class="hero is-fullheight">
<div class="hero-body">
<div class="container has-text-centered">
<h1 class="title is-1 has-text-danger">404</h1>
<h3 class="subtitle is-2">Ups. Seite nicht gefunden!</h3>
<p class="error-message mb-5">Diese Seite existiert nicht. Kontaktiere <a href="mailto:{{ $.Site.Params.adminEmail }}">{{ $.Site.Params.adminEmail }}</a> wenn du denkst, dass hier ein Fehler vorliegt..</p>
<a href="/" class="button is-primary is-medium">Zurück zur Startseite</a>
</div>
</div>
</section>
</body>
</html>

View File

@@ -7,7 +7,7 @@
<header>
{{ partial "header.html" . }}
</header>
<main>
<main class="main">
{{ block "main" . }}{{ end }}
</main>
<footer>

View File

@@ -1,8 +1,5 @@
{{ define "main" }}
{{ .Content }}
{{ range site.RegularPages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ .Summary }}
{{ end }}
<button class="button is-primary">Button</button>
{{ end }}
<div class="content">
{{ .Content }}
</div>
{{ end }}

View File

@@ -1,8 +1,8 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
<h1 class="title is-1">{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
<h2 class="title is-2"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ .Summary }}
{{ end }}
{{ end }}

View File

@@ -1,10 +1,12 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
<h1 class="title is-1">{{ .Title }}</h1>
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{ .Content }}
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
{{ end }}
<div class="content">
{{ .Content }}
</div>
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
{{ end }}

View File

@@ -1,5 +1,27 @@
{{ with site.Copyright }}
<p>{{ now.Year }} - {{ . }}</p>
{{ else }}
<p>Copyright {{ now.Year }}. All rights reserved.</p>
{{ end }}
<div class="footer" aria-label="Footer">
<div class="columns">
<div class="column">
<div class="block">
<h3 class="footer-title title">ratten.org</h3>
<img class="image is-128x128"
src="https://notfellchen.org/static/fellchensammlung/img/logo_transparent.466f26abb037.png"
alt="Ratten Logo">
</div>
<div class="block">
{{ with site.Copyright }}
<p>Copyright {{ now.Year }} - {{ . }}</p>
{{ else }}
<p>Copyright {{ now.Year }}. All rights reserved.</p>
{{ end }}
</div>
</div>
<div class="column">
<div class="block">
<h3 class="footer-title title" data-i18n="about">Über uns</h3>
<ul class="footer-links">
<li class="footer-link"><a href="/impressum">Impressum</a></li>
</ul>
</div>
</div>
</div>
</div>

View File

@@ -1,6 +1,5 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/bulma/css/bulma.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="/assets/js/main.js"></script>
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partialCached "head/css.html" . }}

View File

@@ -7,3 +7,4 @@
{{- end }}
{{- end }}
{{- end }}
<link rel="stylesheet" href="/bulma/css/bulma.min.css">

View File

@@ -11,10 +11,13 @@ Renders a menu for the given menu ID.
{{- $menuID := .menuID }}
{{- with index site.Menus $menuID }}
<nav>
<nav class="navbar">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<h1 class="title is-1">{{ site.Title }}</h1>
<img src="https://notfellchen.org/static/fellchensammlung/img/logo_transparent.466f26abb037.png"
alt="Ratten Logo">
<h1 class="title is-3">{{ site.Title }}</h1>
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">
@@ -25,9 +28,7 @@ Renders a menu for the given menu ID.
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<ul class="navbar-start">
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</div>
</nav>
{{- end }}
@@ -47,19 +48,18 @@ Renders a menu for the given menu ID.
{{- $name = . }}
{{- end }}
{{- end }}
<li class="navbar-item">
<a
{{- range $k, $v :=$attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
</li>
<a class="navbar-item"
{{- range $k, $v :=$attrs }}
{{- with $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ $name }}
</a>
{{- with .Children }}
<ul class="navbar-item has-dropdown is-hoverable">
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul>
{{- end }}
{{- end }}
{{- end }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

View File