Merge branch 'materialize-cwsvJudo-homepage' of https://gitea.cwsvjudo.dedyn.io/marko/cwsvJudo into materialize-cwsvJudo-homepage
This commit is contained in:
3
homepage/cwsvJudo/src/css/materialize/promo.css
Normal file
3
homepage/cwsvJudo/src/css/materialize/promo.css
Normal file
@@ -0,0 +1,3 @@
|
||||
.promo>i {
|
||||
font-size: 7rem;
|
||||
}
|
||||
@@ -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 '<div class="col l4 s6">' .
|
||||
'<div class="center promo promo-example">' .
|
||||
'<i class="material-icons">' .
|
||||
$promo["icon"] .
|
||||
"</i>" .
|
||||
'<p class="promo-caption">' .
|
||||
$promo["caption"] .
|
||||
"</p>" .
|
||||
'<p class="light center">' .
|
||||
$promo["text"] .
|
||||
"</p>" .
|
||||
'<a class="btn filled" href="' .
|
||||
$promo["target"] .
|
||||
'">' .
|
||||
$promo["caption"] .
|
||||
"</a>" .
|
||||
"</div>" .
|
||||
"</div>";
|
||||
}
|
||||
|
||||
function promos_html($promos)
|
||||
{
|
||||
$ret = '<div class="row">';
|
||||
foreach ($promos as $promo) {
|
||||
$ret .= promo_html($promo);
|
||||
}
|
||||
$ret .= "</div>";
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
$sections = [
|
||||
'<h2>Judo im Chemnitzer WSV</h2>Herzlich willkommen auf der Website des Judo-Teams des <a href="http://www.cwsv-sport.de">Chem­nitzer Frei­zeit- und Wohng­ebiets­sport­vereines e. V.</a>'.
|
||||
'<div class="row">'.
|
||||
'<div class="col s4">'.
|
||||
'<div class="center promo promo-example">'.
|
||||
'<i class="material-icons">flash_on</i>'.
|
||||
'<p class="promo-caption">Speeds up development</p>'.
|
||||
'<p class="light center">'.
|
||||
'Most of the heavy lifting is done for you to provide a default stylings that incorporate our custom components. We also refined animations and transitions'.
|
||||
'to provide a smoother experience for developers.'.
|
||||
'</p>'.
|
||||
'</div>'.
|
||||
'</div>'.
|
||||
'<div class="col s4">'.
|
||||
'<div class="center promo promo-example">'.
|
||||
'<i class="material-icons">group</i>'.
|
||||
'<p class="promo-caption">User Experience Focused</p>'.
|
||||
'<p class="light center">By utilizing elements and principles of Material Design, we were able to create a framework that focuses on User Experience.</p>'.
|
||||
'</div>'.
|
||||
'</div>'.
|
||||
'<div class="col s4">'.
|
||||
'<div class="center promo promo-example">'.
|
||||
'<i class="material-icons">settings</i>'.
|
||||
'<p class="promo-caption">Easy to work with</p>'.
|
||||
'<p class="light center">We have provided detailed documentation as well as specific code examples to help new users get started.</p>'.
|
||||
'</div>'.
|
||||
'</div>'.
|
||||
'</div>',
|
||||
'<h2>Judo im Chemnitzer WSV</h2>Herzlich willkommen auf der Website des Judo-Teams des <a href="http://www.cwsv-sport.de">Chem­nitzer Frei­zeit- und Wohng­ebiets­sport­vereines e. V.</a>' .
|
||||
promos_html($promos),
|
||||
\CwsvJudo\News\newsBoard(
|
||||
dbHandle: $dbHandle,
|
||||
options: [
|
||||
@@ -190,7 +213,9 @@ function main($sections, $wallpapers)
|
||||
<div class="l6 s12">
|
||||
<a
|
||||
title="Seite auf HTML 5 Konformität prüfen"
|
||||
href="http://validator.w3.org/check?uri=<?php echo urlencode(getCurPagesUrl());?>"
|
||||
href="http://validator.w3.org/check?uri=<?php echo urlencode(
|
||||
getCurPagesUrl()
|
||||
); ?>"
|
||||
>
|
||||
<i class="material-icons">html</i>5
|
||||
</a>
|
||||
|
||||
@@ -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}",
|
||||
|
||||
Reference in New Issue
Block a user