diff --git a/homepage/cwsvJudo/src/css/materialize/promo.css b/homepage/cwsvJudo/src/css/materialize/promo.css
new file mode 100644
index 0000000..e3983f2
--- /dev/null
+++ b/homepage/cwsvJudo/src/css/materialize/promo.css
@@ -0,0 +1,3 @@
+.promo>i {
+ font-size: 7rem;
+}
\ No newline at end of file
diff --git a/homepage/cwsvJudo/src/pages/responsive/index.php b/homepage/cwsvJudo/src/pages/responsive/index.php
index f1ff5e0..b82ed31 100644
--- a/homepage/cwsvJudo/src/pages/responsive/index.php
+++ b/homepage/cwsvJudo/src/pages/responsive/index.php
@@ -14,34 +14,57 @@ $mainNav = [
],
];
+$promos = [
+ [
+ "icon" => "schedule",
+ "caption" => "Trainingszeiten",
+ "target" => "/training#trainingszeiten",
+ "text" => "Wann welche Alters- und Zielgruppe trainieren kann",
+ ],
+ [
+ "icon" => "location_on",
+ "caption" => "Dojo",
+ "target" => "/training#karten-der-trainingsstätten",
+ "text" => "Wegbeschreibung zu unserem Dojo",
+ ],
+];
+
+function promo_html($promo)
+{
+ return '
";
+}
+
+function promos_html($promos)
+{
+ $ret = '';
+ foreach ($promos as $promo) {
+ $ret .= promo_html($promo);
+ }
+ $ret .= "
";
+
+ return $ret;
+}
+
$sections = [
- 'Judo im Chemnitzer WSV
Herzlich willkommen auf der Website des Judo-Teams des Chemnitzer Freizeit- und Wohngebietssportvereines e. V.'.
- '',
+ 'Judo im Chemnitzer WSV
Herzlich willkommen auf der Website des Judo-Teams des Chemnitzer Freizeit- und Wohngebietssportvereines e. V.' .
+ promos_html($promos),
\CwsvJudo\News\newsBoard(
dbHandle: $dbHandle,
options: [
@@ -190,7 +213,9 @@ function main($sections, $wallpapers)
html5
diff --git a/homepage/participo/bdCheck.py b/homepage/participo/bdCheck.py
index 66584ca..6a1567f 100644
--- a/homepage/participo/bdCheck.py
+++ b/homepage/participo/bdCheck.py
@@ -54,51 +54,48 @@ try:
if t["gebDatum"] not in [None, "0000-00-00"]
]
- MatrixIm.post(
- message="last birthdays: \n"
- + "\n".join(
- [
- f"- {t['name']['given']} {t['name']['family']}: {get_days_since_birthday(t['date_of_birth'])} ({t['date_of_birth'].strftime('%d.%m.')})"
- for t in sorted(
- [
- t
- for t in trainees
- if get_days_since_birthday(t["date_of_birth"]) > -14
- ],
- key=lambda t: get_days_since_birthday(t["date_of_birth"]),
- )
- ]
- ),
- home_server_url="https://matrix.org",
- room_id="!vFXxgKsLbRLdWCSTIO:matrix.org",
- credentials={
- "user": "@ukenth-the-grumpy:matrix.org",
- "password": "DQpSs1yn9Y26c1zo",
- },
+ last_birthday_kids = sorted(
+ [t for t in trainees if get_days_since_birthday(t["date_of_birth"]) > -14],
+ key=lambda t: get_days_since_birthday(t["date_of_birth"]),
+ )
+ if last_birthday_kids:
+ MatrixIm.post(
+ message="last birthdays: \n"
+ + "\n".join(
+ [
+ f"- {t['name']['given']} {t['name']['family']}: {get_days_since_birthday(t['date_of_birth'])} ({t['date_of_birth'].strftime('%d.%m.')})"
+ for t in last_birthday_kids
+ ]
+ ),
+ home_server_url="https://matrix.org",
+ room_id="!vFXxgKsLbRLdWCSTIO:matrix.org",
+ credentials={
+ "user": "@ukenth-the-grumpy:matrix.org",
+ "password": "DQpSs1yn9Y26c1zo",
+ },
+ )
+
+ next_birthday_kids = sorted(
+ [t for t in trainees if get_days_until_birthday(t["date_of_birth"]) < 14],
+ key=lambda t: get_days_until_birthday(t["date_of_birth"]),
)
- MatrixIm.post(
- message="next birthdays: \n"
- + "\n".join(
- [
- f"- {t['name']['given']} {t['name']['family']}: {get_days_until_birthday(t['date_of_birth'])} ({t['date_of_birth'].strftime('%d.%m.')})"
- for t in sorted(
- [
- t
- for t in trainees
- if get_days_until_birthday(t["date_of_birth"]) < 14
- ],
- key=lambda t: get_days_until_birthday(t["date_of_birth"]),
- )
- ]
- ),
- home_server_url="https://matrix.org",
- room_id="!vFXxgKsLbRLdWCSTIO:matrix.org",
- credentials={
- "user": "@ukenth-the-grumpy:matrix.org",
- "password": "DQpSs1yn9Y26c1zo",
- },
- )
+ if next_birthday_kids:
+ MatrixIm.post(
+ message="next birthdays: \n"
+ + "\n".join(
+ [
+ f"- {t['name']['given']} {t['name']['family']}: {get_days_until_birthday(t['date_of_birth'])} ({t['date_of_birth'].strftime('%d.%m.')})"
+ for t in next_birthday_kids
+ ]
+ ),
+ home_server_url="https://matrix.org",
+ room_id="!vFXxgKsLbRLdWCSTIO:matrix.org",
+ credentials={
+ "user": "@ukenth-the-grumpy:matrix.org",
+ "password": "DQpSs1yn9Y26c1zo",
+ },
+ )
except Exception as e:
MatrixIm.post(
message=f"bdCheck: Exception {e} ({repr(e)})\nResponse was {response}",