mirror of
https://git.bolliret.ch/pcs/pcs-website
synced 2026-01-18 17:41:37 +01:00
Compare commits
2 commits
be931c9b4d
...
4a6b860432
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a6b860432 | ||
|
|
17fdb4f3be |
8 changed files with 167 additions and 29 deletions
|
|
@ -39,21 +39,31 @@ div.page,footer,header {
|
||||||
}
|
}
|
||||||
|
|
||||||
div.page {
|
div.page {
|
||||||
color: #6c7d8c
|
color: #6c7d8c;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.page>div.inner_page,footer>div.inner_footer,header>div.inner_header {
|
div.page>div.inner_page,footer>div.inner_footer,header>div.inner_header {
|
||||||
padding: 20px 30px
|
padding: 20px 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.inner_page>* {
|
div.inner_page > * {
|
||||||
margin: 0
|
margin: 0;
|
||||||
|
padding:0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
body,div.page h1,div.page h2,div.page h3,div.page h4,div.page h5,div.page h6 {
|
|
||||||
color: #5d5d5d
|
body,div.page h1, div.page h2, div.page h3, div.page h4, div.page h5, div.page h6 {
|
||||||
|
color: #5d5d5d;
|
||||||
|
padding: 20px 30px;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body,div.inner_page h1, div.inner_page h2, div.inner_page h3, div.inner_page h4, div.inner_page h5, div.inner_page h6 {
|
||||||
|
color: #5d5d5d;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
div.inner_page {
|
div.inner_page {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -109,6 +119,62 @@ div.page {
|
||||||
width: 283.66px
|
width: 283.66px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.termine *{
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.termine ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.termine li {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.termine ul > li {
|
||||||
|
font-weight: bold;
|
||||||
|
width: 1000px;
|
||||||
|
}
|
||||||
|
.termine ul > li > div {
|
||||||
|
width: 500px;
|
||||||
|
font-size: 0.75vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.termine ul > li > ul > li {
|
||||||
|
width: 175px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.termine ul > li > ul > li:nth-child(1){
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.termine ul > li > ul > li:nth-child(2){
|
||||||
|
width: 75px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.termine ul > li > ul {
|
||||||
|
display: flex;
|
||||||
|
padding-left: 0;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.termine ul > li > ul > li {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.termine ul > li > ul > li > div{
|
||||||
|
font-size: 0.75vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@media (max-width:768px) {
|
@media (max-width:768px) {
|
||||||
header h1 {
|
header h1 {
|
||||||
font-size: 3.15vw
|
font-size: 3.15vw
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -4,18 +4,55 @@ title: Termine
|
||||||
---
|
---
|
||||||
body:
|
body:
|
||||||
|
|
||||||
| **Datum** | **Anlass** | **Zeit** | **Ort** |
|
* <div>Pistolen Gangfisch Schiessen</div>
|
||||||
|-------|--------|------|-----|
|
* <div>So. 8. Dezember 2024</div>
|
||||||
| So. 8. Dezember 2024 | Pistolen Gangfisch Schiessen | | Ermatingen |
|
* <div> </div>
|
||||||
| Sa. 14. Dezember 2024 | Pistolen Gangfisch Schiessen | | Ermatingen |
|
* <div>Ermatingen</div>
|
||||||
| So. 15. Dezember 2024 | Pistolen Gangfisch Schiessen | | Ermatingen |
|
* <div>Pistolen Gangfisch Schiessen</div>
|
||||||
| Do. 2. Januar 2025 | 40. Appenzeller Luftpistolenmeisterschaft 2025 | | |
|
* <div>Sa. 14. Dezember 2024</div>
|
||||||
| Do. 9. Januar 2025 | 40. Appenzeller Luftpistolenmeisterschaft 2025 | | |
|
* <div> </div>
|
||||||
| So. 12. Januar 2025 | Appenzeller Lupi Meisterschaft | | |
|
* <div>Ermatingen</div>
|
||||||
| Sa. 20. September 2025 | Schwaderlohschiessen | 13:00 | |
|
* <div>Pistolen Gangfisch Schiessen</div>
|
||||||
| Di. 23. September 2025 | Schwaderlohschiessen | 17:00 | |
|
* <div>So. 15. Dezember 2024</div>
|
||||||
| Sa. 27. September 2025 | Schwaderlohschiessen | | |
|
* <div> </div>
|
||||||
| So. 28. September 2025 | Schwaderlohschiessen | | |
|
* <div>Ermatingen</div>
|
||||||
| Do. 23. August 2029 | Bezirkssommerschiessen | 18:00 | |
|
* <div>40. Appenzeller Luftpistolenmeisterschaft 2025</div>
|
||||||
| Do. 30. August 2029 | Bezirkssommerschiessen | 18:00 | |
|
* <div>Do. 2. Januar 2025</div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div>40. Appenzeller Luftpistolenmeisterschaft 2025</div>
|
||||||
|
* <div>Do. 9. Januar 2025</div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div>Appenzeller Lupi Meisterschaft</div>
|
||||||
|
* <div>So. 12. Januar 2025</div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div>Schwaderlohschiessen</div>
|
||||||
|
* <div>Sa. 20. September 2025</div>
|
||||||
|
* <div>13:00</div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div>Schwaderlohschiessen</div>
|
||||||
|
* <div>Di. 23. September 2025</div>
|
||||||
|
* <div>17:00</div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div>Schwaderlohschiessen</div>
|
||||||
|
* <div>Sa. 27. September 2025</div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div>Schwaderlohschiessen</div>
|
||||||
|
* <div>So. 28. September 2025</div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div>Bezirkssommerschiessen</div>
|
||||||
|
* <div>Do. 23. August 2029</div>
|
||||||
|
* <div>18:00</div>
|
||||||
|
* <div> </div>
|
||||||
|
* <div>Bezirkssommerschiessen</div>
|
||||||
|
* <div>Do. 30. August 2029</div>
|
||||||
|
* <div>18:00</div>
|
||||||
|
* <div> </div>
|
||||||
|
|
||||||
|
---
|
||||||
|
_template: termine_page.html
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{% extends "layout.html" %}
|
{% extends "layout.html" %}
|
||||||
{% block title %}{{ this.title }}{% endblock %}
|
{% block title %}{{ this.title }}{% endblock %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="inner_page">
|
|
||||||
<h2>{{ this.title }}</h2>
|
<h2>{{ this.title }}</h2>
|
||||||
|
<div class="inner_page">
|
||||||
{{ this.body }}
|
{{ this.body }}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
8
lektor/lektordata/project/templates/termine_page.html
Normal file
8
lektor/lektordata/project/templates/termine_page.html
Normal 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 %}
|
||||||
|
|
@ -4,5 +4,5 @@
|
||||||
<div class="inner_page bgimage">
|
<div class="inner_page bgimage">
|
||||||
<h2>{{ this.title }}</h2>
|
<h2>{{ this.title }}</h2>
|
||||||
{{ this.body }}
|
{{ this.body }}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
|
|
@ -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 " " 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 .
|
||||||
|
# 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 = " "
|
||||||
if (location == "") location = " "
|
if (location == "") location = " "
|
||||||
|
|
||||||
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>\ </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>\ \n@g' | sed '/^$/d'
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "---"
|
||||||
|
echo "_template: termine_page.html"
|
||||||
|
echo ""
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue