Compare commits

..

3 commits

10 changed files with 74 additions and 74 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

@ -0,0 +1,21 @@
{
"name": "PC Stammertal",
"short_name": "PCS",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View file

@ -1,73 +0,0 @@
<!doctype html>
<meta charset="utf-8">
<link rel="stylesheet" href="static/style.css">
<title>Welcome to PCS! — PCS</title>
<body>
<header>
<h1>PCS</h1>
<nav>
<ul class="nav navbar-nav">
<li class="active"><a href="./">Home</a></li>
<li><a href="termine/">Termine</a></li>
<li><a href="about/">About</a></li>
</ul>
</nav>
</header>
<div class="page">
<h2>Welcome to PCS!</h2>
<p>This is a basic demo website that shows how to use Lektor for a basic
website with some pages.</p>
</div>
<footer>
&copy; Copyright 2024 by PC Stammertal.
</footer>
</body>
<style type="text/css">
#lektor-edit-link {
position: fixed;
z-index: 9999999;
right: 10px;
top: 10px;
position: fixed;
margin: 0;
font-family: 'Verdana', sans-serif;
background: #eee;
color: #77304c;
font-weight: normal;
font-size: 32px;
padding: 0;
text-decoration: none!important;
border: 1px solid #ccc!important;
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
opacity: 0.7;
}
#lektor-edit-link:hover {
background: white!important;
opacity: 1.0;
border: 1px solid #aaa!important;
}
</style>
<script type="text/javascript">
(function() {
if (window != window.top) {
return;
}
var link = document.createElement('a');
link.setAttribute('href', "/admin/edit?path=/");
link.setAttribute('id', 'lektor-edit-link');
link.innerHTML = '✎';
document.body.appendChild(link);
})();
</script>

View file

@ -1,10 +1,16 @@
<!doctype html> <!doctype html>
<meta charset="utf-8"> <meta charset="utf-8">
<link rel="stylesheet" href="{{ '/static/style.css'|url }}"> <link rel="stylesheet" href="{{ '/static/style.css'|url }}">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-title" content="PCS" />
<link rel="manifest" href="/site.webmanifest" />
<title>{% block title %}Welcome{% endblock %} — PCS</title> <title>{% block title %}Welcome{% endblock %} — PCS</title>
<body> <body>
<header> <header>
<h1>PCS</h1> <h1>Pistolenclub Stammertal</h1>
<nav> <nav>
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li{% if this._path == '/' %} class="active"{% endif <li{% if this._path == '/' %} class="active"{% endif

View file

@ -0,0 +1,43 @@
#!/bin/bash
ICS_URL="$1"
if [ -z "$ICS_URL" ]; then
echo "Usage: $0 <ICS_URL>"
exit 1
fi
ICS_DATA=$(curl -s "$ICS_URL")
echo "| Datum | Anlass | Zeit | Ort |"
echo "|-------|--------|------|-----|"
#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
#from here: https://stackoverflow.com/questions/74111401/parse-ics-and-create-output
echo "$ICS_DATA" | awk 'BEGIN{FS=":"}
/^DTSTART/{dtstart=$2}
/^SUMMARY/{summary=$2}
/^LOCATION/{location=$2}
/^END:VEVENT/{
gsub(/\r/, "", summary)
gsub(/\r/, "", location)
if (dtstart == "") dtstart = "Kein Datum"
if (summary == "") summary = "Kein Titel"
if (location == "") location = "Kein Ort"
date_str = substr(dtstart, 1, 4) "-" substr(dtstart, 5, 2) "-" substr(dtstart, 7, 2)
cmd = "LC_TIME=de_DE.UTF-8 date -j -f \"%Y-%m-%d\" \"" date_str "\" +%a"
cmd | getline weekday
close(cmd)
orderstartdate=sprintf("%s", substr(dtstart,1,8))
realstartdate=sprintf("%s. %s. %s. %s", weekday, substr(dtstart,7,2), substr(dtstart,5,2), substr(dtstart,1,4))
starttime=sprintf("%02d:%02d", substr(dtstart,10,2), substr(dtstart,12,2))
summarystring=sprintf("%s", summary)
locationstring=sprintf("%s", location)
wholeline=sprintf("%s | %s | %s | %s | %s |", orderstartdate, realstartdate, starttime, summarystring, location)
gsub(/\| 00:00 \|/, "| |", wholeline)
print wholeline
}' | sort | awk '{$1=""}1' | awk '{$1=$1}1'