diff --git a/.htaccess_example b/.htaccess_example index 76dd3f8..73e3dbf 100644 --- a/.htaccess_example +++ b/.htaccess_example @@ -6,7 +6,6 @@ RewriteBase /projects/RegattenApp/ ### RESTRICTED FOLDER RewriteRule ^(.*)server(.*)$ / [R=301,L,NC] -RewriteRule ^(.*)content(.*)$ / [R=301,L,NC] diff --git a/client/styles/style.css b/client/styles/style.css index 22e1688..6634c8a 100644 --- a/client/styles/style.css +++ b/client/styles/style.css @@ -1220,6 +1220,7 @@ img.mx-auto { bottom: 0px; z-index: 99999; transition: all 150ms ease; + background-color: #0f1117; } #preloader .spinner-border { diff --git a/index.php b/index.php index 6b2f486..4ff9644 100644 --- a/index.php +++ b/index.php @@ -24,7 +24,7 @@ exit; } - if (!file_exists(__DIR__ . '/content/' . $site . '.php')) { + if (!file_exists(__DIR__ . '/server/content/' . $site . '.php')) { $site = '404'; } @@ -40,7 +40,7 @@ $tpl = new Templates(__DIR__ . '/server/templates/'); $scripts = new Scripts(__DIR__ . '/server/scripts/'); - require_once(__DIR__ . '/content/' . $site . '.php'); + require_once(__DIR__ . '/server/content/' . $site . '.php'); require_once(__DIR__ . '/server/buildpage.php'); diff --git a/content/404.php b/server/content/404.php similarity index 100% rename from content/404.php rename to server/content/404.php diff --git a/content/index.php b/server/content/index.php similarity index 69% rename from content/index.php rename to server/content/index.php index 7fd163a..f040ebf 100644 --- a/content/index.php +++ b/server/content/index.php @@ -22,8 +22,7 @@ // Planning next $content = '
'; $content .= 'Du fährst in den nächsten vier Wochen auf keine Regatta!'; $content .= '
'; @@ -41,8 +40,7 @@ // Next $content = ''; $content .= 'Keine Regatten in den nächsten zwei Wochen!'; $content .= '
'; @@ -51,8 +49,7 @@ // Last $content = ''; $content .= 'Keine Regatten in den letzten zwei Wochen!'; $content .= '
'; @@ -71,6 +68,18 @@ $sp['output'] .= $tpl->load('card', [$content]); - $sp['scripts'] = $scripts->load('index'); + // Regattas Menu + $items = ''; + $items .= $tpl->load('menu/item-icon', ['Saison-Planungen', '', 'html-id' => 'menu-item-plannings', 'icon' => 'fa-calendar-alt']); + $items .= $tpl->load('menu/item-icon', ['Ergebnisse', '', 'html-id' => 'menu-item-results', 'icon' => 'fa-poll']); + $items .= $tpl->load('menu/item-icon', ['Bericht', '', 'html-id' => 'menu-item-bericht', 'icon' => 'fa-book']); + $items .= $tpl->load('menu/item-icon', ['Informationen', '', 'html-id' => 'menu-item-info', 'icon' => 'fa-info']); + $items .= $tpl->load('menu/item-icon-badge', ['Meldung', '', 'html-id' => 'menu-item-meldung', 'icon' => 'fa-file-signature', 'badge-id' => 'badge-regatta-meldung']); + $items .= $tpl->load('menu/item-icon', ['offizielle Ergebnisse', '', 'html-id' => 'menu-item-oresults', 'icon' => 'fa-poll']); + $items .= $tpl->load('menu/item-icon', ['Vereins-Website', '', 'html-id' => 'menu-item-clubwebsite', 'icon' => 'fa-globe']); + $sp['menus'] .= $tpl->load('menu/bottom', [$items, 'html-id' => 'menu-regatta', 'title' => 'Regatta-Details', 'height' => 320]); + + $sp['scripts'] .= $scripts->load('onRegattaClicked'); + $sp['scripts'] .= $scripts->load('index'); ?> \ No newline at end of file diff --git a/content/regattas.php b/server/content/regattas.php similarity index 82% rename from content/regattas.php rename to server/content/regattas.php index 4754d56..f6256f1 100644 --- a/content/regattas.php +++ b/server/content/regattas.php @@ -22,7 +22,9 @@ $sp['output'] .= $tpl->load('card', [$content, 'html-id' => 'card-regattas']); // Menu - $items = $tpl->load('menu/item-icon', ['Ergebnisse', '', 'html-id' => 'menu-item-results', 'icon' => 'fa-poll']); + $items = ''; + $items .= $tpl->load('menu/item-icon', ['Saison-Planungen', '', 'html-id' => 'menu-item-plannings', 'icon' => 'fa-calendar-alt']); + $items .= $tpl->load('menu/item-icon', ['Ergebnisse', '', 'html-id' => 'menu-item-results', 'icon' => 'fa-poll']); $items .= $tpl->load('menu/item-icon', ['Bericht', '', 'html-id' => 'menu-item-bericht', 'icon' => 'fa-book']); $items .= $tpl->load('menu/item-icon', ['Informationen', '', 'html-id' => 'menu-item-info', 'icon' => 'fa-info']); $items .= $tpl->load('menu/item-icon-badge', ['Meldung', '', 'html-id' => 'menu-item-meldung', 'icon' => 'fa-file-signature', 'badge-id' => 'badge-regatta-meldung']); @@ -30,6 +32,7 @@ $items .= $tpl->load('menu/item-icon', ['Vereins-Website', '', 'html-id' => 'menu-item-clubwebsite', 'icon' => 'fa-globe']); $sp['menus'] .= $tpl->load('menu/bottom', [$items, 'html-id' => 'menu-regatta', 'title' => 'Regatta-Details', 'height' => 320]); + $sp['scripts'] .= $scripts->load('onRegattaClicked'); $sp['scripts'] .= $scripts->load('regattas'); ?> \ No newline at end of file diff --git a/server/page/install.php b/server/page/install.php index 14e2d87..61754fa 100644 --- a/server/page/install.php +++ b/server/page/install.php @@ -1,6 +1,6 @@ '; } - $('#table-yournext').find('tbody').html(tbody); + $('#div-yournext').html(list); $('#p-yournext').hide(); - $('#table_yournext').show(); + $('#div-yournext').show(); } else { - $('#table-yournext').hide(); + $('#div-yournext').hide(); $('#p-yournext').show(); } $('#card-yournext').show(); @@ -169,9 +160,12 @@ var siteScript = async function() { maxDate.setDate(maxDate.getDate() + 14); var regattas = await dbGetRegattasRange(minDate, maxDate); if (regattas.length > 0) { - tbody = ''; + list = ''; for (i in regattas) { var regatta = regattas[i]; + + if (regatta['length'] < 1) continue; + var club = null; if (regatta['club'] != null) club = await dbGetData('clubs', regatta['club']); @@ -180,27 +174,33 @@ var siteScript = async function() { var dateTo = regatta['dateTo']; // output - tbody += '