diff --git a/client/scripts/regatten.js.php b/client/scripts/regatten.js.php index 2e638a1..bb702e1 100644 --- a/client/scripts/regatten.js.php +++ b/client/scripts/regatten.js.php @@ -97,5 +97,8 @@ var toastInfo = function (text, time = 3000) { return makeToast('bg-blue2-dark' var toastError = function (text, time = 3000) { return makeToast('bg-red2-dark', 'fa-times', text, time); } var initRegatten = function() { - $('#table-favorites').find('tbody').html('Finn Soetebiernoch nicht verfügbar'); + loggedin = true; + if (typeof siteScript !== 'undefined') { + siteScript(); + } } \ No newline at end of file diff --git a/content/index.php b/content/index.php index 2997ec3..09047f8 100644 --- a/content/index.php +++ b/content/index.php @@ -1,14 +1,62 @@ $_CLASS[name]"; $content .= "

$_CLASS[desc]

"; $sp['output'] .= $tpl->load('card', [$content]); + // Favorites $content = "

Deine Favoriten

"; $thead = "SeglerRangliste 2020"; $content .= $tpl->load('table', [$thead, 'html-id' => 'table-favorites', 'css-class' => 'mb-0 mt-3']); + $sp['output'] .= $tpl->load('card', [$content, 'html-id' => 'card-favorites']); + + // Planning next + $content = "

Deine nächsten Regatten

"; + $thead = "DatumRegattaInformationenRLFSegler"; + $content .= $tpl->load('table', [$thead, 'html-id' => 'table-yournext', 'css-class' => 'mb-0 mt-3']); + + $sp['output'] .= $tpl->load('card', [$content, 'html-id' => 'card-yournext']); + + // Next + $content = "

Nächste Regatten

"; + $thead = "DatumRegattaInformationenRLF"; + $content .= $tpl->load('table', [$thead, 'html-id' => 'table-next', 'css-class' => 'mb-0 mt-3']); + + $sp['output'] .= $tpl->load('card', [$content, 'html-id' => 'card-next']); + + // Last + $content = "

Letzte Regatten

"; + $thead = "DatumRegattaErgebnisseRLF"; + $content .= $tpl->load('table', [$thead, 'html-id' => 'table-last', 'css-class' => 'mb-0 mt-3']); + + $sp['output'] .= $tpl->load('card', [$content, 'html-id' => 'card-last']); + + // Calendar + $content = "

Regatta-Kalender

"; + $content .= "

Du willst alle Regatta-Termine in deinem Kalender, aber nicht alles abtippen?
Kein Problem! Abonniere einfach unseren ics-Kalender.

"; + $content .= "

Nur die Regatten, zu denen Du gehst?
Auch kein Problem! Erstelle einfach eine Saison-Planung und abonniere Deinen persönlichen Kalender.

"; + $content .= $tpl->load('button', ['Regatta-Kalender', '#', 'css-class' => 'mb-2']); + $content .= $tpl->load('button', ['Kalender für Timon', '#']); + $sp['output'] .= $tpl->load('card', [$content]); + $sp['scripts'] = ' + + '; + ?> \ No newline at end of file diff --git a/index.php b/index.php index 0ada832..8585582 100644 --- a/index.php +++ b/index.php @@ -31,7 +31,8 @@ 'backbutton' => false, // Show a back button (true, false, string). If a string is given, the back button is a link to this page. 'activenav' => false, // Select which entry of bottom nav should be active (1-5). false for none 'output' => '', // This is where the site content goes - 'menus' => '' // Additional menus go here + 'menus' => '', // Additional menus go here + 'scripts' => '' // Site specific scripts ]; $tpl = new Templates(__DIR__ . '/server/templates/'); diff --git a/server/page/wrapper.php b/server/page/wrapper.php index b21492a..f09e18f 100644 --- a/server/page/wrapper.php +++ b/server/page/wrapper.php @@ -43,6 +43,8 @@ + + diff --git a/server/templates/card.html b/server/templates/card.html index ba875fe..c0a2c5b 100644 --- a/server/templates/card.html +++ b/server/templates/card.html @@ -1,5 +1,5 @@ -
-
+
+
$0;
\ No newline at end of file