Prepared index
This commit is contained in:
@@ -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 toastError = function (text, time = 3000) { return makeToast('bg-red2-dark', 'fa-times', text, time); }
|
||||||
|
|
||||||
var initRegatten = function() {
|
var initRegatten = function() {
|
||||||
$('#table-favorites').find('tbody').html('<tr><td>Finn Soetebier</td><td>noch nicht verfügbar</td></tr>');
|
loggedin = true;
|
||||||
|
if (typeof siteScript !== 'undefined') {
|
||||||
|
siteScript();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,62 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Title
|
||||||
$content = "<h1>$_CLASS[name]</h1>";
|
$content = "<h1>$_CLASS[name]</h1>";
|
||||||
$content .= "<p>$_CLASS[desc]</p>";
|
$content .= "<p>$_CLASS[desc]</p>";
|
||||||
|
|
||||||
$sp['output'] .= $tpl->load('card', [$content]);
|
$sp['output'] .= $tpl->load('card', [$content]);
|
||||||
|
|
||||||
|
// Favorites
|
||||||
$content = "<h2>Deine Favoriten</h2>";
|
$content = "<h2>Deine Favoriten</h2>";
|
||||||
$thead = "<tr><th>Segler</th><th>Rangliste 2020</th></tr>";
|
$thead = "<tr><th>Segler</th><th>Rangliste 2020</th></tr>";
|
||||||
$content .= $tpl->load('table', [$thead, 'html-id' => 'table-favorites', 'css-class' => 'mb-0 mt-3']);
|
$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 = "<h2>Deine nächsten Regatten</h2>";
|
||||||
|
$thead = "<tr><th>Datum</th><th>Regatta</th><th>Informationen</th><th>RLF</th><th>Segler</th></tr>";
|
||||||
|
$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 = "<h2>Nächste Regatten</h2>";
|
||||||
|
$thead = "<tr><th>Datum</th><th>Regatta</th><th>Informationen</th><th>RLF</th></tr>";
|
||||||
|
$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 = "<h2>Letzte Regatten</h2>";
|
||||||
|
$thead = "<tr><th>Datum</th><th>Regatta</th><th>Ergebnisse</th><th>RLF</th></tr>";
|
||||||
|
$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 = "<h2>Regatta-Kalender</h2>";
|
||||||
|
$content .= "<p>Du willst alle Regatta-Termine in deinem Kalender, aber nicht alles abtippen?<br>Kein Problem! Abonniere einfach unseren ics-Kalender.</p>";
|
||||||
|
$content .= "<p><b>Nur die Regatten, zu denen Du gehst?</b><br>Auch kein Problem! Erstelle einfach eine <a href=\"#\">Saison-Planung</a> und abonniere Deinen persönlichen Kalender.</p>";
|
||||||
|
$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['output'] .= $tpl->load('card', [$content]);
|
||||||
|
|
||||||
|
$sp['scripts'] = '
|
||||||
|
<script>
|
||||||
|
var siteScript = function() {
|
||||||
|
if (loggedin) {
|
||||||
|
$(\'#table-favorites\').find(\'tbody\').html(\'<tr><td>Finn Soetebier</td><td>noch nicht verfügbar</td></tr>\');
|
||||||
|
$(\'#table-yournext\').find(\'tbody\').html(\'<tr><td style="white-space:nowrap;">10. Oct \\\'20<br>14. Oct \\\'20</td><td><a href="#">BSC</a><br>VERSCHOBEN: IDJM, Blankenese</td><td><a href="#">Informationen</a><br><a href="#">Meldung</a> <font style="color:red;">(noch 5 Tage)</a></td><td>1,26</td><td>Finn Soetebier<br>Timon Ostertun</td></tr>\');
|
||||||
|
} else {
|
||||||
|
$(\'#card-favorites\').hide();
|
||||||
|
$(\'#card-yournext\').hide();
|
||||||
|
}
|
||||||
|
$(\'#table-next\').find(\'tbody\').html(\'<tr><td style="white-space:nowrap;">10. Oct \\\'20<br>14. Oct \\\'20</td><td><a href="#">BSC</a><br>VERSCHOBEN: IDJM, Blankenese</td><td><a href="#">Informationen</a><br><a href="#">Meldung</a> <font style="color:red;">(noch 5 Tage)</a></td><td>1,26</td></tr>\');
|
||||||
|
$(\'#table-last\').find(\'tbody\').html(\'<tr><td style="white-space:nowrap;">10. Oct \\\'20<br>14. Oct \\\'20</td><td><a href="#">BSC</a><br>VERSCHOBEN: IDJM, Blankenese</td><td><i style="color:green;" class="fas fa-check"></i> <a href="#">Ergebnisse</a></td><td>1,26</td></tr>\');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
';
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -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.
|
'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
|
'activenav' => false, // Select which entry of bottom nav should be active (1-5). false for none
|
||||||
'output' => '', // This is where the site content goes
|
'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/');
|
$tpl = new Templates(__DIR__ . '/server/templates/');
|
||||||
|
|||||||
@@ -43,6 +43,8 @@
|
|||||||
<!--end of div id page-->
|
<!--end of div id page-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php echo $sp['scripts']; ?>
|
||||||
|
|
||||||
<script type="text/javascript" src="<?php echo SERVER_ADDR; ?>/client/scripts/jquery.js"></script>
|
<script type="text/javascript" src="<?php echo SERVER_ADDR; ?>/client/scripts/jquery.js"></script>
|
||||||
<script type="text/javascript" src="<?php echo SERVER_ADDR; ?>/client/scripts/bootstrap.min.js"></script>
|
<script type="text/javascript" src="<?php echo SERVER_ADDR; ?>/client/scripts/bootstrap.min.js"></script>
|
||||||
<script type="text/javascript" src="<?php echo SERVER_ADDR; ?>/client/scripts/strings.js.php"></script>
|
<script type="text/javascript" src="<?php echo SERVER_ADDR; ?>/client/scripts/strings.js.php"></script>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div class="card card-style">
|
<div id="$html-id;" class="card card-style">
|
||||||
<div id="$html-id;" class="content $css-class;">
|
<div class="content $css-class;">
|
||||||
$0;
|
$0;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user