Compare commits

...

15 commits

Author SHA1 Message Date
Reto
266ab308a6 Merge branch 'main' into 'cssrework'
# Conflicts:
#   lektor/lektordata/project/assets/static/style.css
2024-11-24 19:35:50 +00:00
Reto Bollinger
38b52ee662 hopefully rfixing all that mess 2024-11-24 20:33:47 +01:00
Reto Bollinger
fab490633a No clue what I'm doing4 2024-11-24 20:31:10 +01:00
Reto Bollinger
f03bab8af1 Even more CSS tweaking 2024-11-24 20:30:55 +01:00
Reto Bollinger
fdd4e1d367 Some more CSS adjustments 2024-11-24 20:30:55 +01:00
Reto Bollinger
96060078a1 No clue what I'm doing3 2024-11-24 20:30:40 +01:00
Reto Bollinger
6111a72f1a No clue what I'm doing2 2024-11-24 20:30:13 +01:00
Reto Bollinger
7e6f4969fd No clue what I'm doing 2024-11-24 20:28:28 +01:00
Reto Bollinger
6a2b708d00 Converting termine from table to list as a basis for responsive quirks 2024-11-24 20:27:19 +01:00
Reto Bollinger
a7f46a11a4 Even more CSS tweaking 2024-11-19 20:08:56 +01:00
Reto Bollinger
3a37becc51 Some more CSS adjustments 2024-11-19 18:49:17 +01:00
Reto Bollinger
835da7ccb8 Responsive table on termine page! Woohoo! 2024-11-19 15:10:21 +01:00
Reto Bollinger
e4c4875fa0 Constant font sizes above viewport width of 1540px and tried to reduce jumpiness between 1530p and 1540px 2024-11-19 13:35:08 +01:00
Reto Bollinger
4a6b860432 Wooohaaa! Look! I did magic: I converted a list into a table. How beautiful ist that? 2024-11-19 12:16:08 +01:00
Reto Bollinger
17fdb4f3be Converting termine from table to list as a basis for responsive quirks 2024-11-19 10:14:15 +01:00
7 changed files with 145 additions and 30 deletions

View file

@ -128,14 +128,6 @@ nav{
align-items: center; align-items: center;
} }
ul {
list-style: none;
}
li {
list-style: none;
}
.navbar-nav{ .navbar-nav{
color: #f00; color: #f00;
} }
@ -408,4 +400,55 @@ div.left_footer, div.middle_footer, div.right_footer {
flex-direction: column; flex-direction: column;
flex-wrap: wrap; flex-wrap: wrap;
} }
.termine ul {
display: table;
border-collapse: collapse;
padding: 0;
margin: 0;
}
.termine ul > li{
display: table-row;
width: 75vw;
padding: 0;
margin: 0;
}
.termine ul > li > div{
width: 70vw;
text-align: left;
padding: 0;
margin: 0;
display: inline-block;
white-space: nowrap;
}
.termine ul > li > ul {
display: table-row;
}
.termine ul > li > ul > div{
font-weight: normal;
padding: 0;
margin: 0;
text-align: left;
}
.termine ul > li > ul > li {
display: table-cell;
}
.termine ul > li > ul > li:nth-child(1) { width: 27vw; }
.termine ul > li > ul > li:nth-child(2) { width: 1.5vw; }
.termine ul > li > ul > li:nth-child(3) { width: 46.5vw; }
.termine ul > li > ul > li:nth-child(1) > div{ width: 27vw; }
.termine ul > li > ul > li:nth-child(2) > div{ width: 1.5vw; }
.termine ul > li > ul > li:nth-child(3) > div{ width: 46.5vw; }
.termine ul > li > div, .termine ul > li > ul > li > div {
font-size: 2.5vw;
}
} }

View file

@ -34,3 +34,5 @@ Ob im Training oder an Schützenfesten, überall sind Mitglieder des Pistolenclu
| **2010** | | Einbau künstliche Kugelfänge System Leu + Helfenstein.<br>Umbau 50m Zugscheibenanlage von System Schmalz Uster auf System Leu + Helfenstein.<br>Einbau neuer Motoren und Steuerung. | | **2010** | | Einbau künstliche Kugelfänge System Leu + Helfenstein.<br>Umbau 50m Zugscheibenanlage von System Schmalz Uster auf System Leu + Helfenstein.<br>Einbau neuer Motoren und Steuerung. |
| | | | | | | |
| **2015** | | Einbau Schallschutzwände standseitig und Verkleidung der Hochblende mit Schalldämmplatten. | | **2015** | | Einbau Schallschutzwände standseitig und Verkleidung der Hochblende mit Schalldämmplatten. |
---
_template: page.html

View file

@ -4,18 +4,55 @@ title: Termine
--- ---
body: body:
| **Datum** | **Anlass** | **Zeit** | **Ort** | * <div>Pistolen Gangfisch Schiessen</div>&nbsp;
|-------|--------|------|-----| * <div>So. 8. Dezember 2024</div>&nbsp;
| So. 8. Dezember 2024 | Pistolen Gangfisch Schiessen | | Ermatingen | * <div>&nbsp;</div>&nbsp;
| Sa. 14. Dezember 2024 | Pistolen Gangfisch Schiessen | | Ermatingen | * <div>Ermatingen</div>&nbsp;
| So. 15. Dezember 2024 | Pistolen Gangfisch Schiessen | | Ermatingen | * <div>Pistolen Gangfisch Schiessen</div>&nbsp;
| Do. 2. Januar 2025 | 40. Appenzeller Luftpistolenmeisterschaft 2025 | | | * <div>Sa. 14. Dezember 2024</div>&nbsp;
| Do. 9. Januar 2025 | 40. Appenzeller Luftpistolenmeisterschaft 2025 | | | * <div>&nbsp;</div>&nbsp;
| So. 12. Januar 2025 | Appenzeller Lupi Meisterschaft | | | * <div>Ermatingen</div>&nbsp;
| Sa. 20. September 2025 | Schwaderlohschiessen | 13:00 | | * <div>Pistolen Gangfisch Schiessen</div>&nbsp;
| Di. 23. September 2025 | Schwaderlohschiessen | 17:00 | | * <div>So. 15. Dezember 2024</div>&nbsp;
| Sa. 27. September 2025 | Schwaderlohschiessen | | | * <div>&nbsp;</div>&nbsp;
| So. 28. September 2025 | Schwaderlohschiessen | | | * <div>Ermatingen</div>&nbsp;
| Do. 23. August 2029 | Bezirkssommerschiessen | 18:00 | | * <div>40. Appenzeller Luftpistolenmeisterschaft 2025</div>&nbsp;
| Do. 30. August 2029 | Bezirkssommerschiessen | 18:00 | | * <div>Do. 2. Januar 2025</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>40. Appenzeller Luftpistolenmeisterschaft 2025</div>&nbsp;
* <div>Do. 9. Januar 2025</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>Appenzeller Lupi Meisterschaft</div>&nbsp;
* <div>So. 12. Januar 2025</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>Schwaderlohschiessen</div>&nbsp;
* <div>Sa. 20. September 2025</div>&nbsp;
* <div>13:00</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>Schwaderlohschiessen</div>&nbsp;
* <div>Di. 23. September 2025</div>&nbsp;
* <div>17:00</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>Schwaderlohschiessen</div>&nbsp;
* <div>Sa. 27. September 2025</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>Schwaderlohschiessen</div>&nbsp;
* <div>So. 28. September 2025</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>Bezirkssommerschiessen</div>&nbsp;
* <div>Do. 23. August 2029</div>&nbsp;
* <div>18:00</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
* <div>Bezirkssommerschiessen</div>&nbsp;
* <div>Do. 30. August 2029</div>&nbsp;
* <div>18:00</div>&nbsp;
* <div>&nbsp;</div>&nbsp;
---
_template: termine_page.html

View file

@ -12,3 +12,5 @@ body:
| **Müller Konrad** | 1. Schützenmeister | schiesswesen@pc-stammertal.ch | | **Müller Konrad** | 1. Schützenmeister | schiesswesen@pc-stammertal.ch |
| **Bollinger Reto** | Schützenmeister, Beisitz | beisitz@pc-stammertal.ch | | **Bollinger Reto** | Schützenmeister, Beisitz | beisitz@pc-stammertal.ch |
| **Horvath Richard** | Schützenmeister, Fähnrich, Standwart | infrastruktur@pc-stammertal.ch | | **Horvath Richard** | Schützenmeister, Fähnrich, Standwart | infrastruktur@pc-stammertal.ch |
---
_template: page.html

View file

@ -1,8 +1,8 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% block title %}{{ this.title }}{% endblock %} {% block title %}{{ this.title }}{% endblock %}
{% block body %} {% block body %}
<h2>{{ this.title }}</h2>
<div class="inner_page"> <div class="inner_page">
<h2>{{ this.title }}</h2>
{{ this.body }} {{ this.body }}
</div> </div>
{% endblock %} {% endblock %}

View file

@ -0,0 +1,8 @@
{% extends "layout.html" %}
{% block title %}{{ this.title }}{% endblock %}
{% block body %}
<h2>{{ this.title }}</h2>
<div class="inner_page termine">
{{ this.body }}
</div>
{% endblock %}

View file

@ -17,13 +17,33 @@ echo "title: Termine"
echo "---" echo "---"
echo "body:" echo "body:"
echo "" echo ""
echo "| **Datum** | **Anlass** | **Zeit** | **Ort** |"
echo "|-------|--------|------|-----|"
#original statement: #original statement:
#awk 'BEGIN{FS=":"}/^DTSTART/{dtstart=$2}/^SUMMARY/{summary=$2}/^END:VEVENT/{print substr(dtstart,7,2)"/"substr(dtstart,5,2)"/"substr(dtstart,1,4),sprintf("%02d",substr(dtstart,10,2)+3)":"substr(dtstart,12,2),summary}' file.txt #awk 'BEGIN{FS=":"}/^DTSTART/{dtstart=$2}/^SUMMARY/{summary=$2}/^END:VEVENT/{print substr(dtstart,7,2)"/"substr(dtstart,5,2)"/"substr(dtstart,1,4),sprintf("%02d",substr(dtstart,10,2)+3)":"substr(dtstart,12,2),summary}' file.txt
#from here: https://stackoverflow.com/questions/74111401/parse-ics-and-create-output #from here: https://stackoverflow.com/questions/74111401/parse-ics-and-create-output
#OK what the heck are we doing here? TBH I even do not know exactly myself
# First we iterate over the ICS items looking for DTSTART, SUMMARY, LOCATION and END:VEVENT
# as soon as we found an END:VEVENT we consider that an event and start processing it
# if we havent found DTSTART, SUMMARY OR LOCATION for that event (actually rather just since last itartion step, that's why at the end we empty those variables)
# we insert "19700101T000000" for dtstart and "&nbsp;" for the other variables.
# As whole day events have a starting time of exactly 00:00 we consider this starting time equivalent to a whole day event.
# Yes, that' means we can't have all those midnight parties as those turn into whole day events.
# Once we have this all collected we print that into the markdown representation of a list item with a sublist for the subsequent fields
# We wrap each string into a div as Summaries like "40. Appenzeller Luftpistolenmeisterschaft 2025" would be rendered int a numbered list representation in markdown
# turning it into "1. Appenzeller Luftpistolenmeisterschaft 2025" which gives it a completely different meaning
# But! Beware: we are for one not printing the newlines (except for one at the end of eac event) and for the other our lines start with a YYYYMMDD representation of the date
# So we have for each event a line starting with YYYYMMDD followed by the markdown representation of a list item containing a sublist with all fields terminated with a newline
# Thats the first awk command
# Second awk command filters all lines which are in the past (yes, most probably this could have been done in the first awk call as well)
# Now we sort those remaining lines as they come in absolute random order (that's the reason for having an event squeezed on one line, and starting the line with YYYYMMDD representation of te event date)
# Now we no longer need the leading timestamp so we cut it off
# Last thing to do is to expand the list items into separate lines so they are actually markdown
# I chose a very simple approach: As each field is wrapped in a div I just use closing div tag as indication (this breaks if a calendar-entry contains HTML with a div element)
# Additionally after the closing tag I add an additional &nbsp;.
# This is due to a limitation of the list rendered which does not render the sub-list if the last sub-list item terminates with a closing div tag
# and finally I trim excessive linefeeds (aboave approach leads to double linefeeds after an event as the event was already a seperate line and adding linefeeds adds then one too much)
echo "$ICS_DATA" | awk 'BEGIN{FS=":"} echo "$ICS_DATA" | awk 'BEGIN{FS=":"}
/^DTSTART/{dtstart=$2} /^DTSTART/{dtstart=$2}
/^SUMMARY/{summary=$2} /^SUMMARY/{summary=$2}
@ -32,8 +52,8 @@ echo "$ICS_DATA" | awk 'BEGIN{FS=":"}
gsub(/\r/, "", summary) gsub(/\r/, "", summary)
gsub(/\r/, "", location) gsub(/\r/, "", location)
if (dtstart == "") dtstart = "19700101T000000" if (dtstart == "") dtstart = "19700101T000000"
if (summary == "") summary = " " if (summary == "") summary = "&nbsp;"
if (location == "") location = " " if (location == "") location = "&nbsp;"
date_str = substr(dtstart, 1, 4) "-" substr(dtstart, 5, 2) "-" substr(dtstart, 7, 2) date_str = substr(dtstart, 1, 4) "-" substr(dtstart, 5, 2) "-" substr(dtstart, 7, 2)
cmd = "LC_ALL=de_DE.UTF-8 date -d \"" date_str "\" +%a" cmd = "LC_ALL=de_DE.UTF-8 date -d \"" date_str "\" +%a"
@ -49,12 +69,15 @@ echo "$ICS_DATA" | awk 'BEGIN{FS=":"}
starttime=sprintf("%02d:%02d", substr(dtstart,10,2), substr(dtstart,12,2)) starttime=sprintf("%02d:%02d", substr(dtstart,10,2), substr(dtstart,12,2))
summarystring=sprintf("%s", summary) summarystring=sprintf("%s", summary)
locationstring=sprintf("%s", location) locationstring=sprintf("%s", location)
wholeline=sprintf("%s | %s | %s | %s | %s |", orderstartdate, realstartdate, summarystring, starttime, location) wholeline=sprintf("%s * <div>%s</div> * <div>%s</div> * <div>%s</div> * <div>%s</div>", orderstartdate, summarystring, realstartdate, starttime, location)
gsub(/\| 00:00 \|/, "| |", wholeline) gsub(/<div>00:00<\/div>/, "<div>\&nbsp;</div>", wholeline)
print wholeline print wholeline
dtstart="" dtstart=""
summary="" summary=""
location="" location=""
}' | awk -v today="$TODAY" 'substr($1,1,8) >= today' | sort | awk '{$1=""}1' | awk '{$1=$1}1' }' | awk -v today="$TODAY" 'substr($1,1,8) >= today' | sort | cut -d " " -f 2- | sed 's@</div>@</div>\&nbsp;\n@g' | sed '/^$/d'
echo "" echo ""
echo "---"
echo "_template: termine_page.html"
echo ""