Merge branch 'feat/mobile-view' into develop

This commit is contained in:
Christian Wolf 2024-01-07 16:54:58 +01:00
commit 8da576c7be
16 changed files with 330 additions and 33 deletions

View File

@ -1,5 +1,6 @@
HUGO_PARAMS = HUGO_PARAMS =
DEV_PARAMS = -D DEV_PARAMS = -D
SERVER_PARAMS = --bind 0.0.0.0
all: all:
@ -10,10 +11,10 @@ dev:
hugo ${HUGO_PARAMS} ${DEV_PARAMS} hugo ${HUGO_PARAMS} ${DEV_PARAMS}
server: server:
hugo server ${HUGO_PARAMS} hugo server ${HUGO_PARAMS} ${SERVER_PARAMS}
dev-server: dev-server:
hugo server ${HUGO_PARAMS} ${DEV_PARAMS} hugo server ${HUGO_PARAMS} ${SERVER_PARAMS} ${DEV_PARAMS}
tarball: build tarball: build
tar czf page.tar.gz -C public . tar czf page.tar.gz -C public .

View File

@ -3,6 +3,7 @@ title: "Archiv"
date: 2023-01-20T16:27:40+01:00 date: 2023-01-20T16:27:40+01:00
draft: false draft: false
# type: home # type: home
layout: archive
menu: menu:
main: main:
weight: 4 weight: 4

View File

@ -10,10 +10,14 @@ menu:
## Vereinsheim vorne und mitte ## Vereinsheim vorne und mitte
{{< tsc/rooms/room >}}
{{< tsc/rooms/image image="vereinsheim.png" >}}
{{% tsc/rooms/address %}}
Rudolf-Harbig-Str. 6 Rudolf-Harbig-Str. 6
71063 Sindelfingen 71063 Sindelfingen
{{% /tsc/rooms/address %}}
![Verinsheim vorne](vereinsheim.png) {{< /tsc/rooms/room >}}
Das Bild zeigt unsere zwei Trainingsräume im Vereinsheim mit geöffneter Trennwand. Das Bild zeigt unsere zwei Trainingsräume im Vereinsheim mit geöffneter Trennwand.
@ -21,7 +25,11 @@ Abgeteilt in zwei Räume&nbsp; "VH Mitte" und "VH Vorn"
## Neuer Saal "VH" neu" ## Neuer Saal "VH" neu"
{{< tsc/rooms/room >}}
{{< tsc/rooms/image image="VH_Neu.jpg" >}}
{{% tsc/rooms/address %}}
Rudolf-Harbig-Str. 6 Rudolf-Harbig-Str. 6
71063 Sindelfingen 71063 Sindelfingen
{{% /tsc/rooms/address %}}
![Vereinsheim neu](VH_Neu.jpg) {{< /tsc/rooms/room >}}

View File

@ -2,6 +2,9 @@
$total_width: 95%; $total_width: 95%;
$color_red: #cd1013; $color_red: #cd1013;
$color_background_mobile_menu: #f5f5f5;
$color_background_mobile_menu_header: #e0e0e0;
$color_hor_line: #a5a5a5;
$gap_columns_persons: 25px; $gap_columns_persons: 25px;
@ -18,6 +21,18 @@ $gap_columns_persons: 25px;
} }
} }
@mixin media-large {
@media screen and (min-width: 700px) {
@content;
}
}
@mixin mouse-available {
@media screen and (pointer: fine) {
@content;
}
}
/* main styling */ /* main styling */
body { body {
@ -50,16 +65,24 @@ h1 {
#header { #header {
border-bottom: 2px solid rgba(173,173,173,.5); border-bottom: 2px solid rgba(173,173,173,.5);
margin: 0 auto 30px; margin: 0 auto 30px;
width: 100%;
> .logo-row { > .logo-row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%;
.logo { .logo {
margin: 15px 0 10px 30px; margin: 15px 30px 10px 30px;
img {
max-width: 100%;
}
} }
.logo-vfl { .logo-vfl {
margin: 12px 45px 0 0; margin: 12px 45px 0 0;
img {
max-width: 100%;
}
} }
} }
@ -67,7 +90,11 @@ h1 {
width: calc(100% - 60px); width: calc(100% - 60px);
// visibility: hidden; // visibility: hidden;
// height: 250px; // height: 250px;
display: flex; display: none;
@include media-large() {
display: flex;
}
padding: 0 10px; padding: 0 10px;
border-right: 20px solid $color_red; border-right: 20px solid $color_red;
border-left: 20px solid $color_red; border-left: 20px solid $color_red;
@ -127,6 +154,11 @@ h1 {
margin: 5px auto 0; margin: 5px auto 0;
font: 1.5em 'Open Sans Condensed', sans-serif; font: 1.5em 'Open Sans Condensed', sans-serif;
display: none;
@include media-large() {
display: block;
}
nav { nav {
display: flex; display: flex;
height: 100%; height: 100%;
@ -149,9 +181,12 @@ h1 {
> .left-side { > .left-side {
flex: auto 0 0; flex: auto 0 0;
display: flex;
flex-direction: column; flex-direction: column;
margin-right: 40px; margin-right: 40px;
display: none;
@include media-large() {
display: flex;
}
.announcements { .announcements {
margin-top: 20px; margin-top: 20px;
@ -207,6 +242,7 @@ h1 {
#content { #content {
flex: 100% 0 1; flex: 100% 0 1;
text-align: justify; text-align: justify;
max-width: 100%;
table { table {
width: 100%; width: 100%;
@ -253,6 +289,10 @@ h1 {
max-width: 100%; max-width: 100%;
} }
h1, h2, h3, h4, h5, h6 {
text-align: left;
}
.to-top { .to-top {
margin: 45px 0 0; margin: 45px 0 0;
} }
@ -269,7 +309,7 @@ h1 {
padding: 4px 10px 0; padding: 4px 10px 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
border-top: 1px solid #a5a5a5; border-top: 1px solid $color_hor_line;
.first-entry { .first-entry {
font: 1em 'Open Sans Condensed', sans-serif; font: 1em 'Open Sans Condensed', sans-serif;
@ -342,6 +382,10 @@ h1 {
padding: 10px; padding: 10px;
flex: 30% 0 0; flex: 30% 0 0;
// height: 30%; // height: 30%;
img {
max-width: 100%;
}
} }
} }
} }
@ -354,7 +398,10 @@ h1 {
} }
.person { .person {
width: calc(50% - #{$gap_columns_persons} / 2); width: 100%;
@include media-large() {
width: calc(50% - #{$gap_columns_persons} / 2);
}
height: 80px; height: 80px;
// margin: 10px 25px 10px 0; // margin: 10px 25px 10px 0;
display: flex; display: flex;
@ -386,10 +433,13 @@ h1 {
} }
.news-blog { .news-blog {
max-width: 100%;
.blog-entry { .blog-entry {
max-width: 100%;
.header { .header {
max-width: 100%;
margin: 5px 0 10px; margin: 5px 0 10px;
text-align: left;
a { a {
font-size: larger; font-size: larger;
} }
@ -398,10 +448,13 @@ h1 {
display: flex; display: flex;
// min-height: 240px; // min-height: 240px;
margin-right: 2px; margin-right: 2px;
flex-direction: column;
@include media-large(){
flex-direction: row;
}
.teaser-image { .teaser-image {
flex: 33% 1 0; flex: 33% 1 0;
background-color: lightcyan;
img { img {
width: 90%; width: 90%;
@ -424,9 +477,6 @@ h1 {
text-align: right; text-align: right;
} }
} }
// .teaser-image, .intro {
// display: ;
// }
} }
@ -435,11 +485,18 @@ h1 {
.pagination { .pagination {
display: flex; display: flex;
list-style: none; list-style: none;
padding: 0;
max-width: 400px;
margin: auto;
.page-item { .page-item {
padding: 0px 5px; flex: auto 1 0;
a { margin: 5px;
padding: 10px 20px; .page-link {
display: inline-block; display: block;
text-align: center;
width: 100%;
height: 100%;
padding: 5px 0;
} }
} }
@ -449,6 +506,68 @@ h1 {
} }
} }
.mobile-menu {
display: flex;
flex-wrap: wrap;
width: 100%;
margin: 30px 0;
padding: 30px 5% 0 5%;
box-sizing: border-box;
@include media-large() {
display: none;
}
border-top: 1px solid $color_hor_line;
.level-1 {
width: 100%;
a {
background-color: $color_background_mobile_menu_header;
}
}
.level-2 {
width: 50%;
a {
background-color: $color_background_mobile_menu;
}
}
.level-1, .level-2 {
display: flex;
padding: 3px;
box-sizing: border-box;
a {
width: 100%;
height: 100%;
padding: 5px;
box-sizing: border-box;
@include menu-style();
&.active {
color: white;
background-color: $color_red;
}
}
}
}
.mobile-menu-link {
display: block;
border: 1px solid black;
width: max-content;
padding: 5px 75px 5px 15px;
margin: 5px 0 5px 20px;
@include menu-style();
@include media-large() {
display: none;
}
}
.announcement-list { .announcement-list {
.entry { .entry {
margin: 0 30px; margin: 0 30px;
@ -469,18 +588,51 @@ h1 {
align-items: center; align-items: center;
justify-items: center; justify-items: center;
&.cols-2 { grid-template-columns: 1fr;
grid-template-columns: 1fr 1fr;
} @include media-large() {
&.cols-3 { &.cols-2 {
grid-template-columns: 1fr 1fr 1fr; grid-template-columns: 1fr 1fr;
} }
&.cols-4 { &.cols-3 {
grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-columns: 1fr 1fr 1fr;
}
&.cols-4 {
grid-template-columns: 1fr 1fr 1fr 1fr;
}
} }
.tsc-gallery-img { .tsc-gallery-img {
margin: 20px; margin: 5px 0;
}
}
.youtube-video {
max-width: 100%;
}
.internal-video {
max-width: 100%;
}
.room {
.image {
max-width: 70%;
}
@include media-large() {
display: flex;
align-items: start;
.image {
flex: 50% 0 1;
}
.address {
margin-left: 10px;
}
p {
margin: 0;
}
} }
} }
@ -511,6 +663,93 @@ h1 {
} }
} }
.archive-short-links {
display: flex;
flex-direction: row;
flex-wrap: wrap;
padding: 0;
li {
display: block;
padding: 5px;
}
}
.archive-year-list {
display: flex;
margin: 5px 0;
align-items: baseline;
@include mouse-available() {
margin: 0;
}
.date {
font-weight: bold;
// height: 100%;
}
.title {
margin: 0 0 0 10px;
text-align: left;
a {
display: block;
padding: 6.5px 0;
@include mouse-available() {
padding: 3px 0;
}
}
}
}
table.time {
// width: 100%;
display: flex;
flex-direction: column;
tr {
display: flex;
flex-direction: column;
width: 100%;
td:nth-child(1) {
font-weight: bold;
}
}
tr:first-child {
display: none;
}
&.time-no-age {
td:nth-child(3)::before {
content: "Uhrzeit: ";
}
td:nth-child(4)::before {
content: "Ort: ";
}
}
&.time-age {
td:nth-child(2)::before {
content: "Jahrgang: ";
}
td:nth-child(4)::before {
content: "Uhrzeit: ";
}
td:nth-child(5)::before {
content: "Ort: ";
}
}
}
.iframe-generic {
display: block;
width: 100%;
height: 800px;
max-height: 75vh;
}
@font-face{ @font-face{
font-family: 'Open Sans Condensed'; font-family: 'Open Sans Condensed';
font-style: normal; font-style: normal;

View File

@ -0,0 +1,29 @@
{{ define "main" }}
<a name="top">
<h1>{{ .Title }}</h1>
</a>
{{ $archiveGroups := (( where .Site.RegularPages "Section" "==" "news").GroupByDate "2006" ) }}
<ul class="archive-short-links">
{{ range $archiveGroups }}
<li><a href="#year-{{ .Key }}">{{ .Key }}</a></li>
{{ end }}
</ul>
{{ range $archiveGroups }}
<h2><a id="year-{{ .Key }}">{{ .Key }}</a></h2>
{{ range .Pages.ByDate.Reverse }}
<div class="archive-year-list">
<div class="date">{{ .Date.Format "02.01.2006" }}</div>
<div class="title">
<a href="{{ .RelPermalink}}">
{{ .Title }}
</a>
</div>
</div>
{{ end }}
<div class="archive-to-top">
[<a href="#top">Zurück</a>]
</div>
{{ end }}
{{ end }}

View File

@ -17,6 +17,10 @@
{{- block "main" . -}}{{- end -}} {{- block "main" . -}}{{- end -}}
</div> </div>
</div> </div>
<div class="mobile-menu">
<a id="mobile-menu"></a>
{{- partial "page/mobile-menu" . -}}
</div>
{{- partial "page/footer.html" . -}} {{- partial "page/footer.html" . -}}
</div> </div>
<div id="overlay" class="hidden"> <div id="overlay" class="hidden">

View File

@ -3,7 +3,7 @@
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
</a> </a>
<div class="news-blog"> <div class="news-blog">
{{ range (.Paginate (first 200 ( where .Site.RegularPages "Section" "==" "news")) 10 ).Pages }} {{ range (.Paginate (first 30 ( where .Site.RegularPages "Section" "==" "news")) 10 ).Pages }}
{{ $urlBlogEntry := .RelPermalink}} {{ $urlBlogEntry := .RelPermalink}}
<div class="blog-entry"> <div class="blog-entry">
<div class="header"> <div class="header">

View File

@ -42,4 +42,5 @@
{{ end }} {{ end }}
</nav> </nav>
</div> </div>
<a class="mobile-menu-link" href="#mobile-menu">Menu</a>
</div> </div>

View File

@ -0,0 +1,6 @@
{{ range .Site.Menus.main }}
<div class="level-1"><a href="{{ .URL }}" class="menu-link{{ if $.IsMenuCurrent "main" . }} active{{ end }}">{{ .Title }}</a></div>
{{ range .Children }}
<div class="level-2"><a href="{{ .URL }}" class="menu-link{{ if $.IsMenuCurrent "main" .}} active{{ end}}">{{ .Title }}</a></div>
{{ end }}
{{ end }}

View File

@ -1 +1 @@
<iframe src="{{ .Inner }}" frameborder="0" style="display: block; width: 100%; height: 800px;"></iframe> <iframe src="{{ .Inner }}" frameborder="0" class="iframe-generic"></iframe>

View File

@ -8,7 +8,7 @@
{{ $resource := .Page.Resources.Get $filename -}} {{ $resource := .Page.Resources.Get $filename -}}
src="{{ $resource.RelPermalink }}" src="{{ $resource.RelPermalink }}"
style=" style="
{{- with .Get "width" -}}max-width: {{.}}px;{{- end -}} {{- with .Get "width" -}}width: {{.}}px;{{- end -}}
" "
> >
{{ with .Get "href" }} {{ with .Get "href" }}

View File

@ -2,6 +2,7 @@
{{ with .Get "poster" }}poster="{{ . }}"{{ end }} {{ with .Get "poster" }}poster="{{ . }}"{{ end }}
{{ with .Get "width" }}width="{{ . }}"{{ end }} {{ with .Get "width" }}width="{{ . }}"{{ end }}
{{ with .Get "height" }}height="{{ . }}"{{ end }} {{ with .Get "height" }}height="{{ . }}"{{ end }}
class="internal-video"
> >
<source <source
{{ with .Get "type" }}type="{{ . }}"{{ end }} {{ with .Get "type" }}type="{{ . }}"{{ end }}

View File

@ -5,5 +5,6 @@
title="{{ with .Get "title" }}{{ . }}{{ else }}YouTube video player{{ end }}" title="{{ with .Get "title" }}{{ . }}{{ else }}YouTube video player{{ end }}"
frameborder="0" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen> allowfullscreen
class="youtube-video">
</iframe> </iframe>

View File

@ -0,0 +1 @@
<div class="address">{{ .Inner }}</div>

View File

@ -0,0 +1,4 @@
<div class="image">
{{ $resource := .Page.Resources.GetMatch (.Get "image") }}
<img src="{{ $resource.RelPermalink}} ">
</div>

View File

@ -0,0 +1 @@
<div class="room">{{ .Inner }}</div>