Individualisations
This commit is contained in:
File diff suppressed because it is too large
Load Diff
1397
client/scripts/custom.js.php
Normal file
1397
client/scripts/custom.js.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
header('Content-Type: text/javascript');
|
||||||
|
|
||||||
|
require_once(__DIR__ . '/../../server/config.php');
|
||||||
|
|
||||||
|
?>
|
||||||
//Loading the Service Worker
|
//Loading the Service Worker
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
navigator.serviceWorker.register('_service-worker.js', {scope: ''});
|
// TODO navigator.serviceWorker.register('_service-worker.js', {scope: ''});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9,7 +16,7 @@ if ('serviceWorker' in navigator) {
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
var pwaVersion = '3.0'; //must be identical to _manifest.json version. If not it will create update window loop
|
var pwaVersion = '<?php echo PWA_VERSION; ?>'; //must be identical to _manifest.json version. If not it will create update window loop
|
||||||
var pwaCookie = true; // if set to false, the PWA prompt will appear even if the user selects "maybe later"
|
var pwaCookie = true; // if set to false, the PWA prompt will appear even if the user selects "maybe later"
|
||||||
var pwaNoCache = true; // always keep the cache clear to serve the freshest possible content
|
var pwaNoCache = true; // always keep the cache clear to serve the freshest possible content
|
||||||
|
|
||||||
@@ -116,7 +123,7 @@ $(document).ready(function(){
|
|||||||
var interval = setInterval(function() {
|
var interval = setInterval(function() {
|
||||||
counter--;
|
counter--;
|
||||||
console.log(counter);
|
console.log(counter);
|
||||||
$('.page-update').html('Updating in ... '+ counter + ' seconds');
|
$('.page-update').html('Aktuallisierung in ... '+ counter + ' Sekunden');
|
||||||
if (counter == 0) {
|
if (counter == 0) {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
window.location.reload(true)
|
window.location.reload(true)
|
||||||
@@ -141,7 +148,7 @@ $(document).ready(function(){
|
|||||||
var dt = new Date();
|
var dt = new Date();
|
||||||
var maniTimeVersion = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
|
var maniTimeVersion = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
|
||||||
var localVersionNumber = $('link[rel="manifest"]').data('pwa-version');
|
var localVersionNumber = $('link[rel="manifest"]').data('pwa-version');
|
||||||
var onlineVersionJSON = "_manifest.json?ver=" + maniTimeVersion;
|
var onlineVersionJSON = "<?php echo SERVER_ADDR; ?>/manifest.json.php?ver=" + maniTimeVersion;
|
||||||
var onlineVersionNumber = "Connection Offline. Waiting to Reconect";
|
var onlineVersionNumber = "Connection Offline. Waiting to Reconect";
|
||||||
$.getJSON(onlineVersionJSON, function(onlineData) {onlineVersionNumber = onlineData.version;});
|
$.getJSON(onlineVersionJSON, function(onlineData) {onlineVersionNumber = onlineData.version;});
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
@@ -187,8 +194,8 @@ $(document).ready(function(){
|
|||||||
var offlineAlerts = $('.offline-message');
|
var offlineAlerts = $('.offline-message');
|
||||||
|
|
||||||
if(!offlineAlerts.length){
|
if(!offlineAlerts.length){
|
||||||
$('body').append('<p class="offline-message bg-red2-dark color-white center-text uppercase ultrabold">No internet connection detected</p> ');
|
$('body').append('<p class="offline-message bg-red2-dark color-white center-text uppercase ultrabold">' + strings['inetMsgOffline'] + '</p>');
|
||||||
$('body').append('<p class="online-message bg-green1-dark color-white center-text uppercase ultrabold">You are back online</p>');
|
$('body').append('<p class="online-message bg-green1-dark color-white center-text uppercase ultrabold">' + strings['inetMsgOnline'] + '</p>');
|
||||||
}
|
}
|
||||||
|
|
||||||
//Offline Function Show
|
//Offline Function Show
|
||||||
101
client/scripts/regatten.js.php
Normal file
101
client/scripts/regatten.js.php
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
header('Content-Type: text/javascript');
|
||||||
|
|
||||||
|
require_once(__DIR__ . '/../../server/config.php');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
var randomId = function() { return '_' + Math.random().toString(36).substr(2, 9); }
|
||||||
|
|
||||||
|
var badges = {
|
||||||
|
more: {
|
||||||
|
id: 'badge-footer-more',
|
||||||
|
cnt: 0,
|
||||||
|
childs: {
|
||||||
|
news: {
|
||||||
|
id: 'badge-more-news',
|
||||||
|
cnt: 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* updateBadge - updates the count in pre-defined badges
|
||||||
|
* name - name of the badge (e.g. 'more/news'), must exist and must not have childs
|
||||||
|
* val - new value for badge ('+2' or '-4' for increase/decrease current value)
|
||||||
|
* returns true, if badge was updated, false on error
|
||||||
|
*/
|
||||||
|
var updateBadge = function (name, val) {
|
||||||
|
const names = name.split('/');
|
||||||
|
if (!(names[0] in badges)) return false;
|
||||||
|
var badge = [badges[names[0]]];
|
||||||
|
var cnt = names.length;
|
||||||
|
for (i = 1; i < cnt; i ++) {
|
||||||
|
if (!('childs' in badge[i-1]) || !(names[i] in badge[i-1].childs)) return false;
|
||||||
|
badge[i] = badge[i-1].childs[names[i]];
|
||||||
|
}
|
||||||
|
if ('childs' in badge[cnt-1]) return false;
|
||||||
|
if (String(val).substr(0, 1) == '+') val = parseInt(badge[cnt-1].cnt) + parseInt(String(val).substr(1));
|
||||||
|
else if (String(val).substr(0, 1) == '-') val = parseInt(badge[cnt-1].cnt) - parseInt(String(val).substr(1));
|
||||||
|
badge[cnt-1].cnt = parseInt(val);
|
||||||
|
$('#' + badge[cnt-1].id).text(val == 0 ? '' : val);
|
||||||
|
for (i = cnt - 2; i >= 0; i --) {
|
||||||
|
var sum = 0;
|
||||||
|
for (b in badge[i].childs) {
|
||||||
|
sum += badge[i].childs[b].cnt;
|
||||||
|
}
|
||||||
|
badge[i].cnt = sum
|
||||||
|
$('#' + badge[i].id).text(sum == 0 ? '' : sum);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* makeToast - creates a snackbar toast
|
||||||
|
* color - css class as bg-color / font-color (e.g. 'bg-highlight color-white')
|
||||||
|
* icon - font awesome icon
|
||||||
|
* text - text to be displayed
|
||||||
|
* time - time after which toast is hidden (ms), 0 to disable auto-hide
|
||||||
|
* returns id of created toast (needed for manual hide)
|
||||||
|
*/
|
||||||
|
var makeToast = function (color, icon, text, time) {
|
||||||
|
var id = 'snackbar' + randomId();
|
||||||
|
var delay = (time > 0 ? 'data-delay="' + time + '" data-autohide="true"' : 'data-autohide="false"');
|
||||||
|
var div = '<div id="' + id + '" class="snackbar-toast ' + color + '" ' + delay + '>';
|
||||||
|
div += '<i class="fa ' + icon + ' mr-3"></i>' + text + '</div>';
|
||||||
|
$('#page').append(div);
|
||||||
|
$('#' + id).toast('show');
|
||||||
|
if (time > 0) {
|
||||||
|
setTimeout(function(){
|
||||||
|
$('#' + id).remove();
|
||||||
|
}, parseInt(time) + 1000);
|
||||||
|
}
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* closeToast - hides a toast
|
||||||
|
* id - id of toast to be hidden
|
||||||
|
*/
|
||||||
|
var closeToast = function (id) {
|
||||||
|
$('#' + id).toast('hide');
|
||||||
|
setTimeout(function(){
|
||||||
|
$('#' + id).remove();
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* toastType - creates a pre-defined toast (Load, Ok, Warn, Info, Error)
|
||||||
|
* text - text to be displayed
|
||||||
|
* time (optional) - time after which toast is hidden(ms), 0 to disable auto-hide
|
||||||
|
* returns id of created toast (needed for manual hide)
|
||||||
|
*/
|
||||||
|
var toastLoad = function (text, time = 3000) { return makeToast('bg-highlight color-white', 'fa-sync fa-spin', text, time); }
|
||||||
|
var toastOk = function (text, time = 3000) { return makeToast('bg-green1-dark', 'fa-check', text, time); }
|
||||||
|
var toastWarn = function (text, time = 3000) { return makeToast('bg-yellow1-dark', 'fa-info', text, time); }
|
||||||
|
var toastInfo = function (text, time = 3000) { return makeToast('bg-blue2-dark', 'fa-info', text, time); }
|
||||||
|
var toastError = function (text, time = 3000) { return makeToast('bg-red2-dark', 'fa-times', text, time); }
|
||||||
|
|
||||||
|
var initRegatten = function() {
|
||||||
|
$('#table-favorites').find('tbody').html('<tr><td>Finn Soetebier</td><td>noch nicht verfügbar</td></tr>');
|
||||||
|
}
|
||||||
11
client/scripts/strings.js.php
Normal file
11
client/scripts/strings.js.php
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
header('Content-Type: text/javascript');
|
||||||
|
|
||||||
|
require_once(__DIR__ . '/../../server/config.php');
|
||||||
|
|
||||||
|
?>
|
||||||
|
const strings = {
|
||||||
|
inetMsgOffline: "Keine Internet-Verbindung erkannt",
|
||||||
|
inetMsgOnline: "Du bist wieder online",
|
||||||
|
}
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
BEGIN:VCARD
|
|
||||||
N:Black;Karla;;Mrs;
|
|
||||||
ADR;INTL;PARCEL;WORK:;;UltraMobile Street;Planet Earth;Milky Way;2134;
|
|
||||||
ADR;DOM;PARCEL;HOME:;;Enabled Avenue;Planet Erath;Milky Way;1234;
|
|
||||||
EMAIL;home:home@domain.com
|
|
||||||
EMAIL;office:office@domain.com
|
|
||||||
EMAIL;personal:personal@domain.com
|
|
||||||
ORG:Enabled
|
|
||||||
TEL;mobile:+1 234 567 890
|
|
||||||
TEL;office:+1 234 567 890
|
|
||||||
TEL;personal:+1 234 567 890
|
|
||||||
TITLE:Photographer
|
|
||||||
URL;WORK:www.domain.com
|
|
||||||
URL;facebook:www.facebook.com
|
|
||||||
URL;twitter:www.twitter.com
|
|
||||||
URL;google plus:www.googleplus.com
|
|
||||||
END:VCARD
|
|
||||||
@@ -4866,13 +4866,38 @@ code {
|
|||||||
.theme-dark .loader-main,
|
.theme-dark .loader-main,
|
||||||
.theme-dark .instant-article,
|
.theme-dark .instant-article,
|
||||||
.theme-dark .divider-icon i,
|
.theme-dark .divider-icon i,
|
||||||
.theme-dark .table tr.even td,
|
.theme-dark .timeline-body {
|
||||||
.theme-dark .timeline-body,
|
|
||||||
.theme-dark table,
|
|
||||||
.theme-dark td {
|
|
||||||
background-color: #1b1d21 !important;
|
background-color: #1b1d21 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* auto table-dark by theme */
|
||||||
|
.theme-dark .table th,
|
||||||
|
.theme-dark .table td,
|
||||||
|
.theme-dark .table thead th,
|
||||||
|
.theme-dark .table tbody + tbody {
|
||||||
|
border-color: #95999c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-dark .table {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #343a40;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-dark .table th,
|
||||||
|
.theme-dark .table td,
|
||||||
|
.theme-dark .table thead th {
|
||||||
|
border-color: #454d55;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-dark .table-bordered {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-dark .table-striped tbody tr:nth-of-type(odd) {
|
||||||
|
background-color: rgba(255, 255, 255, 0.05);
|
||||||
|
}
|
||||||
|
/* END OF table-dark */
|
||||||
|
|
||||||
.theme-dark .ios-switch label::before,
|
.theme-dark .ios-switch label::before,
|
||||||
.theme-dark .android-switch label::before {
|
.theme-dark .android-switch label::before {
|
||||||
background-color: #1b1d21;
|
background-color: #1b1d21;
|
||||||
|
|||||||
@@ -1,24 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sp['output'] = '<div class="card bg-transparent" data-card-height="cover">
|
$content = $tpl->load('error', ['404', 'Seite nicht gefunden']);
|
||||||
<div class="card-center text-center">
|
$content .= '<p>';
|
||||||
<i class="fa fa-exclamation-triangle fa-8x color-red2-dark"></i>
|
$content .= 'Die gesuchte Seite wurde nicht gefunden.<br>';
|
||||||
<h1 class="fa-6x mt-5 font-900">404</h1>
|
$content .= 'Wie wäre es mit der Homepage?';
|
||||||
<h4 class="mb-5 mt-3">Seite nicht gefunden</h4>
|
$content .= '</p>';
|
||||||
<p>
|
$content .= $tpl->load('button', ['Zur Startseite', LINK_PRE . 'index', 'css-class' => 'mb-3']);
|
||||||
Die gesuchte Seite wurde nicht gefunden.<br>
|
$content .= $tpl->load('button', ['Kontakt', LINK_PRE . 'contact']);
|
||||||
Wie wäre es mit der Homepage?
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="row ml-5 mr-5 mt-5 mb-0">
|
$sp['output'] = $tpl->load('card', [$content, 'css-class' => 'text-center pt-3']);
|
||||||
<div class="col-6">
|
|
||||||
<a href="' . LINK_PRE . 'index" class="btn btn-m rounded-sm btn-full bg-red2-dark text-uppercase font-900">Zur Startseite</a>
|
|
||||||
</div>
|
|
||||||
<div class="col-6">
|
|
||||||
<a href="' . LINK_PRE . 'contact" class="btn btn-m rounded-sm btn-full bg-red2-dark text-uppercase font-900">Kontakt</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -1,22 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sp['output'] = '<div class="card bg-transparent" data-card-height="cover">
|
$content = "<h1>$_CLASS[name]</h1>";
|
||||||
<div class="card-center text-center">
|
$content .= "<p>$_CLASS[desc]</p>";
|
||||||
<i class="fa fa-exclamation-triangle fa-8x color-red2-dark"></i>
|
|
||||||
<h4 class="mb-5 mt-3">Startseite</h4>
|
|
||||||
<p>
|
|
||||||
Diese Seite befindet sich noch in der Entwicklung.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="row ml-5 mr-5 mt-5 mb-0">
|
$sp['output'] .= $tpl->load('card', [$content]);
|
||||||
<div class="col-6">
|
|
||||||
<a href="' . LINK_PRE . 'index" class="btn btn-m rounded-sm btn-full bg-red2-dark text-uppercase font-900">Zur Startseite</a>
|
$content = "<h2>Deine Favoriten</h2>";
|
||||||
</div>
|
$thead = "<tr><th>Segler</th><th>Rangliste 2020</th></tr>";
|
||||||
<div class="col-6">
|
$content .= $tpl->load('table', [$thead, 'html-id' => 'table-favorites', 'css-class' => 'mb-0 mt-3']);
|
||||||
<a href="' . LINK_PRE . 'contact" class="btn btn-m rounded-sm btn-full bg-red2-dark text-uppercase font-900">Kontakt</a>
|
|
||||||
</div>
|
$sp['output'] .= $tpl->load('card', [$content]);
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>';
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
require_once(__DIR__ . '/server/config.php');
|
require_once(__DIR__ . '/server/config.php');
|
||||||
require_once(__DIR__ . '/server/log.php');
|
require_once(__DIR__ . '/server/log.php');
|
||||||
|
require_once(__DIR__ . '/server/templates.php');
|
||||||
|
|
||||||
$request = false;
|
$request = false;
|
||||||
if (isset($_GET['request'])) {
|
if (isset($_GET['request'])) {
|
||||||
@@ -26,13 +27,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sp = [
|
$sp = [
|
||||||
'title' => 'Regatten.net ' . $_CLASSES[BOATCLASS]['name']['de'], // This is the page title
|
'title' => 'Regatten.net ' . $_CLASS['name'], // This is the page title
|
||||||
'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
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$tpl = new Templates(__DIR__ . '/server/templates/');
|
||||||
|
|
||||||
require_once(__DIR__ . '/content/' . $site . '.php');
|
require_once(__DIR__ . '/content/' . $site . '.php');
|
||||||
|
|
||||||
require_once(__DIR__ . '/server/buildpage.php');
|
require_once(__DIR__ . '/server/buildpage.php');
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"lang" : "de",
|
"lang" : "de",
|
||||||
"name" : "Regatten.net <?php echo $_CLASSES[BOATCLASS]['name']['de'] ?>",
|
"name" : "Regatten.net <?php echo $_CLASS['name'] ?>",
|
||||||
"scope" : "/",
|
"scope" : "/",
|
||||||
"display" : "standalone",
|
"display" : "standalone",
|
||||||
"start_url" : "/index",
|
"start_url" : "/index",
|
||||||
"short_name" : "<?php echo $_CLASSES[BOATCLASS]['name']['de'] ?>",
|
"short_name" : "<?php echo $_CLASS['name'] ?>",
|
||||||
"description" : "Regatta-Termine, Ergebnisse und Ranglisten",
|
"description" : "Regatta-Termine, Ergebnisse und Ranglisten",
|
||||||
"orientation" : "portrait",
|
"orientation" : "portrait",
|
||||||
"background_color": "#ffffff",
|
"background_color": "#ffffff",
|
||||||
|
|||||||
@@ -19,36 +19,12 @@
|
|||||||
define('BOATCLASS', 'pirat');
|
define('BOATCLASS', 'pirat');
|
||||||
|
|
||||||
// BOAT CLASSES
|
// BOAT CLASSES
|
||||||
$_CLASSES = array(
|
$_CLASS = array(
|
||||||
'pirat' => [
|
'name' => 'Pirat',
|
||||||
'name' => [
|
'desc' => 'eine vom DSV geförderte Jugendmeisterschaftsklasse',
|
||||||
'de' => 'Pirat',
|
'special' => 'Jugend',
|
||||||
'en' => 'Pirate'
|
'youth-age' => 19,
|
||||||
],
|
'youth-german-name' => 'IDJM'
|
||||||
'desc' => [
|
|
||||||
'de' => 'eine vom DSV geförderte Jugendmeisterschaftsklasse',
|
|
||||||
'en' => 'a DSV sponsored youth championship class'
|
|
||||||
],
|
|
||||||
'special' => [
|
|
||||||
'de' => 'Jugend',
|
|
||||||
'en' => 'Youth'
|
|
||||||
],
|
|
||||||
'youth-age' => 19,
|
|
||||||
'youth-german-name' => 'IDJM'
|
|
||||||
],
|
|
||||||
'teeny' => [
|
|
||||||
'name' => [
|
|
||||||
'de' => 'Teeny',
|
|
||||||
'en' => 'Teeny'
|
|
||||||
],
|
|
||||||
'desc' => [
|
|
||||||
'de' => 'die offizielle 2-Mann Bootsklasse des DSV für den Jüngstenbereich',
|
|
||||||
'en' => 'the official 2-man boat class of the DSV for the youngest area'
|
|
||||||
],
|
|
||||||
'special' => false,
|
|
||||||
'youth-age' => 15,
|
|
||||||
'youth-german-name' => 'IDJüM'
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
18
server/page/headerfooter.php
Normal file
18
server/page/headerfooter.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<!-- header and footer bar go here-->
|
||||||
|
<div class="header header-fixed header-logo-center">
|
||||||
|
<a href="<?php echo LINK_PRE; ?>index" class="header-title">Regatten.net <?php echo $_CLASS['name']; ?></a>
|
||||||
|
<?php if ($sp['backbutton'] !== false) {
|
||||||
|
if ($sp['backbutton'] === true)
|
||||||
|
echo '<a href="#" class="back-button header-icon header-icon-1"><i class="fas fa-arrow-left"></i></a>';
|
||||||
|
else
|
||||||
|
echo '<a href="' . LINK_PRE . $sp['backbutton'] . '" class="header-icon header-icon-1"><i class="fas fa-arrow-left"></i></a>';
|
||||||
|
} ?>
|
||||||
|
<a href="#" data-menu="menu-settings" class="header-icon header-icon-4"><i class="fas fa-cog"></i></a>
|
||||||
|
</div>
|
||||||
|
<div id="footer-bar" class="footer-bar-1">
|
||||||
|
<a href="<?php echo LINK_PRE; ?>index"<?php if ($sp['activenav'] == 1) echo ' class="active-nav"'; ?>><i class="fa fa-home"></i><span>Start</span></a>
|
||||||
|
<a href="<?php echo LINK_PRE; ?>regattas"<?php if ($sp['activenav'] == 2) echo ' class="active-nav"'; ?>><i class="fa fa-flag-checkered"></i><span>Regatten</span></a>
|
||||||
|
<a href="<?php echo LINK_PRE; ?>rank"<?php if ($sp['activenav'] == 3) echo ' class="active-nav"'; ?>><i class="fa fa-trophy"></i><span>Ranglisten</span></a>
|
||||||
|
<a href="#" data-menu="menu-lists"<?php if ($sp['activenav'] == 4) echo ' class="active-nav"'; ?>><i class="fa fa-list"></i><span>Listen</span></a>
|
||||||
|
<a href="#" data-menu="menu-more"<?php if ($sp['activenav'] == 5) echo ' class="active-nav"'; ?>><i class="fa fa-ellipsis-h"></i><span>Mehr</span><em id="badge-footer-more" class="badge bg-highlight"></em></a>
|
||||||
|
</div>
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
data-menu-height="350"
|
data-menu-height="350"
|
||||||
data-menu-effect="menu-parallax">
|
data-menu-effect="menu-parallax">
|
||||||
<div class="boxed-text-l mt-4">
|
<div class="boxed-text-l mt-4">
|
||||||
<img class="rounded-l mb-3" src="app/icons/icon-128x128.png" alt="img" width="90">
|
<img class="rounded-l mb-3" src="<?php echo SERVER_ADDR; ?>/client/app/icons/icon-128x128.png" alt="img" width="90">
|
||||||
<h4 class="mt-3">Add Sticky on your Home Screen</h4>
|
<h4 class="mt-3">Füge Regatten.net <?php echo $_CLASS['name']; ?> zu Deinem Startbildschirm hinzu</h4>
|
||||||
<p>
|
<p>
|
||||||
Install Sticky on your home screen, and access it just like a regular app. It really is that simple!
|
Installiere Regatten.net auf Deinem Startbildschirm und greife wie bei einer normalen App darauf zu. So einfach ist das wirklich.
|
||||||
</p>
|
</p>
|
||||||
<a href="#" class="pwa-install btn btn-s rounded-s shadow-l text-uppercase font-900 bg-highlight mb-2">Add to Home Screen</a><br>
|
<a href="#" class="pwa-install btn btn-s rounded-s shadow-l text-uppercase font-900 bg-highlight mb-2">Zum Startbildschirm hinzufügen</a><br>
|
||||||
<a href="#" class="pwa-dismiss close-menu color-gray2-light text-uppercase font-900 opacity-60 font-10">Maybe later</a>
|
<a href="#" class="pwa-dismiss close-menu color-gray2-light text-uppercase font-900 opacity-60 font-10">Vielleicht später</a>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -20,13 +20,13 @@
|
|||||||
data-menu-height="320"
|
data-menu-height="320"
|
||||||
data-menu-effect="menu-parallax">
|
data-menu-effect="menu-parallax">
|
||||||
<div class="boxed-text-xl mt-4">
|
<div class="boxed-text-xl mt-4">
|
||||||
<img class="rounded-l mb-3" src="app/icons/icon-128x128.png" alt="img" width="90">
|
<img class="rounded-l mb-3" src="<?php echo SERVER_ADDR; ?>/client/app/icons/icon-128x128.png" alt="img" width="90">
|
||||||
<h4 class="mt-3">Add Sticky on your Home Screen</h4>
|
<h4 class="mt-3">Füge Regatten.net <?php echo $_CLASS['name']; ?> zu Deinem Startbildschirm hinzu</h4>
|
||||||
<p class="mb-0 pb-0">
|
<p class="mb-0 pb-0">
|
||||||
Install Sticky on your home screen, and access it just like a regular app. Open your Safari menu and tap "Add to Home Screen".
|
Installiere Regatten.net auf Deinem Startbildschirm und greife wie bei einer normalen App darauf zu. Öffne Dein Safari-Menü und tippe auf "Zum Startbildschirm hinzufügen".
|
||||||
</p>
|
</p>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<a href="#" class="pwa-dismiss close-menu color-highlight uppercase ultrabold opacity-80 top-25">Maybe later</a>
|
<a href="#" class="pwa-dismiss close-menu color-highlight uppercase ultrabold opacity-80 top-25">Vielleicht später</a>
|
||||||
<i class="fa-ios-arrow fa fa-caret-down font-40"></i>
|
<i class="fa-ios-arrow fa fa-caret-down font-40"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
132
server/page/menus.php
Normal file
132
server/page/menus.php
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<div id="menu-share" class="menu menu-box-bottom menu-box-detached rounded-m" data-menu-height="345" data-menu-effect="menu-over">
|
||||||
|
<div class="menu-title mt-n1"><h1>Share the Love</h1><p class="color-highlight">Just Tap the Social Icon. We'll add the Link</p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
||||||
|
<div class="content mb-0">
|
||||||
|
<div class="divider mb-0"></div>
|
||||||
|
<div class="list-group list-custom-small list-icon-0">
|
||||||
|
<a href="#" class="shareToFacebook">
|
||||||
|
<i class="font-18 fab fa-facebook color-facebook"></i>
|
||||||
|
<span class="font-13">Facebook</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="shareToTwitter">
|
||||||
|
<i class="font-18 fab fa-twitter-square color-twitter"></i>
|
||||||
|
<span class="font-13">Twitter</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="shareToLinkedIn">
|
||||||
|
<i class="font-18 fab fa-linkedin color-linkedin"></i>
|
||||||
|
<span class="font-13">LinkedIn</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="shareToWhatsApp">
|
||||||
|
<i class="font-18 fab fa-whatsapp-square color-whatsapp"></i>
|
||||||
|
<span class="font-13">WhatsApp</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="#" class="shareToMail border-0">
|
||||||
|
<i class="font-18 fa fa-envelope-square color-mail"></i>
|
||||||
|
<span class="font-13">Email</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- All Menus, Action Sheets, Modals, Notifications, Toasts get Placed outside the <div class="page-content"> -->
|
||||||
|
<div id="menu-lists" class="menu menu-box-bottom menu-box-detached rounded-m" data-menu-height="260" >
|
||||||
|
<div class="menu-title"><h1>Listen</h1><p class="color-highlight"> </p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
||||||
|
<div class="divider divider-margins mb-n2"></div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="list-group list-custom-small">
|
||||||
|
<a href="<?php echo LINK_PRE; ?>sailors">
|
||||||
|
<i class="fa font-14 fa-users rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>Segler</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo LINK_PRE; ?>boats">
|
||||||
|
<i class="fa font-14 fa-ship rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>Boote</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo LINK_PRE; ?>clubs" class="border-0">
|
||||||
|
<i class="fa font-14 fa-home rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>Vereine</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="menu-more" class="menu menu-box-bottom menu-box-detached rounded-m" data-menu-height="360" >
|
||||||
|
<div class="menu-title"><h1>Mehr</h1><p class="color-highlight"> </p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
||||||
|
<div class="divider divider-margins mb-n2"></div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="list-group list-custom-small">
|
||||||
|
<a href="<?php echo LINK_PRE; ?>news">
|
||||||
|
<i class="fa font-14 fa-newspaper rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>Neuigkeiten</span>
|
||||||
|
<span id="badge-more-news" class="badge bg-highlight color-white"></span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo LINK_PRE; ?>planning">
|
||||||
|
<i class="fa font-14 fa-calendar-alt rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>Saison-Planung</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo LINK_PRE; ?>trim_list">
|
||||||
|
<i class="fa font-14 fa-book rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>Trimm-Bücher</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo LINK_PRE; ?>calc">
|
||||||
|
<i class="fa font-14 fa-calculator rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>RLP-Rechner</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo LINK_PRE; ?>contact" class="border-0">
|
||||||
|
<i class="fa font-14 fa-phone rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>Kontakt</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="menu-settings" class="menu menu-box-bottom menu-box-detached rounded-m" data-menu-height="270">
|
||||||
|
<div class="menu-title"><h1>Einstellungen</h1><p class="color-highlight"> </p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
||||||
|
<div class="divider divider-margins mb-n2"></div>
|
||||||
|
<div class="content">
|
||||||
|
<div class="list-group list-custom-small">
|
||||||
|
<a href="#" data-toggle-theme data-trigger-switch="switch-dark" class="pb-2">
|
||||||
|
<i class="fa font-14 fa-moon rounded-s bg-dark1-dark color-white"></i>
|
||||||
|
<span>Dark Mode</span>
|
||||||
|
<div class="custom-control scale-switch ios-switch">
|
||||||
|
<input data-toggle-theme-switch type="checkbox" class="ios-input" id="switch-dark">
|
||||||
|
<label class="custom-control-label" for="switch-dark"></label>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo LINK_PRE; ?>login">
|
||||||
|
<i class="fa font-14 fa-sign-in-alt rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>Login</span>
|
||||||
|
<i class="fa fa-angle-right"></i>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo LINK_PRE; ?>signup" class="border-0">
|
||||||
|
<i class="fa font-14 fa-user-plus rounded-s bg-highlight color-white"></i>
|
||||||
|
<span>Registrieren</span>
|
||||||
|
<span class="badge bg-red2-dark color-white">FREE</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="menu-update">
|
||||||
|
<div class="content bottom-0">
|
||||||
|
<p class="text-center mt-5"><i class="fa fa-sync-alt fa-7x color-highlight fa-spin"></i></p>
|
||||||
|
<h1 class="text-center mt-5 font-900">Update Verfügbar</h1>
|
||||||
|
<p class="text-center">
|
||||||
|
Eine neue Version unserer App ist verfügbar. Keine Sorge, Du musst nichts machen. Wir aktuallisieren den Inhalt in wenigen Sekunden.
|
||||||
|
</p>
|
||||||
|
<a href="#" class="page-update btn btn-center-xl btn-m shadow-xl rounded-s bg-highlight font-900 text-center">Update</a>
|
||||||
|
<p class="text-center font-10 bottom-0">Die App wird neu laden und das Update ist abgeschlossen.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -22,24 +22,7 @@
|
|||||||
|
|
||||||
<div id="page">
|
<div id="page">
|
||||||
|
|
||||||
<!-- header and footer bar go here-->
|
<?php include(__DIR__ . '/headerfooter.php'); ?>
|
||||||
<div class="header header-fixed header-logo-center">
|
|
||||||
<a href="<?php echo LINK_PRE; ?>index" class="header-title">Regatten.net <?php echo $_CLASSES[BOATCLASS]['name']['de']; ?></a>
|
|
||||||
<?php if ($sp['backbutton'] !== false) {
|
|
||||||
if ($sp['backbutton'] === true)
|
|
||||||
echo '<a href="#" class="back-button header-icon header-icon-1"><i class="fas fa-arrow-left"></i></a>';
|
|
||||||
else
|
|
||||||
echo '<a href="' . LINK_PRE . $sp['backbutton'] . '" class="header-icon header-icon-1"><i class="fas fa-arrow-left"></i></a>';
|
|
||||||
} ?>
|
|
||||||
<a href="#" data-menu="menu-settings" class="header-icon header-icon-4"><i class="fas fa-cog"></i></a>
|
|
||||||
</div>
|
|
||||||
<div id="footer-bar" class="footer-bar-1">
|
|
||||||
<a href="<?php echo LINK_PRE; ?>index"<?php if ($sp['activenav'] == 1) echo ' class="active-nav"'; ?>><i class="fa fa-home"></i><span>Start</span></a>
|
|
||||||
<a href="<?php echo LINK_PRE; ?>regattas"<?php if ($sp['activenav'] == 2) echo ' class="active-nav"'; ?>><i class="fa fa-flag-checkered"></i><span>Regatten</span></a>
|
|
||||||
<a href="<?php echo LINK_PRE; ?>rank"<?php if ($sp['activenav'] == 3) echo ' class="active-nav"'; ?>><i class="fa fa-trophy"></i><span>Ranglisten</span></a>
|
|
||||||
<a href="#" data-menu="menu-lists"<?php if ($sp['activenav'] == 4) echo ' class="active-nav"'; ?>><i class="fa fa-list"></i><span>Listen</span></a>
|
|
||||||
<a href="#" data-menu="menu-more"<?php if ($sp['activenav'] == 5) echo ' class="active-nav"'; ?>><i class="fa fa-ellipsis-h"></i><span>Mehr</span></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--start of page content, add your stuff here-->
|
<!--start of page content, add your stuff here-->
|
||||||
<div class="page-content header-clear-medium">
|
<div class="page-content header-clear-medium">
|
||||||
@@ -47,125 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--end of page content, off canvas elements here-->
|
<!--end of page content, off canvas elements here-->
|
||||||
|
|
||||||
<div id="menu-share" class="menu menu-box-bottom menu-box-detached rounded-m" data-menu-height="345" data-menu-effect="menu-over">
|
<?php include(__DIR__ . '/menus.php'); ?>
|
||||||
<div class="menu-title mt-n1"><h1>Share the Love</h1><p class="color-highlight">Just Tap the Social Icon. We'll add the Link</p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
|
||||||
<div class="content mb-0">
|
|
||||||
<div class="divider mb-0"></div>
|
|
||||||
<div class="list-group list-custom-small list-icon-0">
|
|
||||||
<a href="#" class="shareToFacebook">
|
|
||||||
<i class="font-18 fab fa-facebook color-facebook"></i>
|
|
||||||
<span class="font-13">Facebook</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="#" class="shareToTwitter">
|
|
||||||
<i class="font-18 fab fa-twitter-square color-twitter"></i>
|
|
||||||
<span class="font-13">Twitter</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="#" class="shareToLinkedIn">
|
|
||||||
<i class="font-18 fab fa-linkedin color-linkedin"></i>
|
|
||||||
<span class="font-13">LinkedIn</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="#" class="shareToWhatsApp">
|
|
||||||
<i class="font-18 fab fa-whatsapp-square color-whatsapp"></i>
|
|
||||||
<span class="font-13">WhatsApp</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="#" class="shareToMail border-0">
|
|
||||||
<i class="font-18 fa fa-envelope-square color-mail"></i>
|
|
||||||
<span class="font-13">Email</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- All Menus, Action Sheets, Modals, Notifications, Toasts get Placed outside the <div class="page-content"> -->
|
|
||||||
<div id="menu-lists" class="menu menu-box-bottom menu-box-detached rounded-m" data-menu-height="260" >
|
|
||||||
<div class="menu-title"><h1>Listen</h1><p class="color-highlight"> </p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
|
||||||
<div class="divider divider-margins mb-n2"></div>
|
|
||||||
<div class="content">
|
|
||||||
<div class="list-group list-custom-small">
|
|
||||||
<a href="<?php echo LINK_PRE; ?>sailors">
|
|
||||||
<i class="fa font-14 fa-users rounded-s bg-highlight color-white"></i>
|
|
||||||
<span>Segler</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="<?php echo LINK_PRE; ?>boats">
|
|
||||||
<i class="fa font-14 fa-ship rounded-s bg-highlight color-white"></i>
|
|
||||||
<span>Boote</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="<?php echo LINK_PRE; ?>clubs" class="border-0">
|
|
||||||
<i class="fa font-14 fa-home rounded-s bg-highlight color-white"></i>
|
|
||||||
<span>Vereine</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="menu-more" class="menu menu-box-bottom menu-box-detached rounded-m" data-menu-height="360" >
|
|
||||||
<div class="menu-title"><h1>Mehr</h1><p class="color-highlight"> </p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
|
||||||
<div class="divider divider-margins mb-n2"></div>
|
|
||||||
<div class="content">
|
|
||||||
<div class="list-group list-custom-small">
|
|
||||||
<a href="<?php echo LINK_PRE; ?>news">
|
|
||||||
<i class="fa font-14 fa-newspaper rounded-s bg-highlight color-white"></i>
|
|
||||||
<span>Neuigkeiten</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="<?php echo LINK_PRE; ?>planning">
|
|
||||||
<i class="fa font-14 fa-calendar-alt rounded-s bg-highlight color-white"></i>
|
|
||||||
<span>Saison-Planung</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="<?php echo LINK_PRE; ?>trim_list">
|
|
||||||
<i class="fa font-14 fa-book rounded-s bg-highlight color-white"></i>
|
|
||||||
<span>Trimm-Bücher</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="<?php echo LINK_PRE; ?>calc">
|
|
||||||
<i class="fa font-14 fa-calculator rounded-s bg-highlight color-white"></i>
|
|
||||||
<span>RLP-Rechner</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="<?php echo LINK_PRE; ?>contact" class="border-0">
|
|
||||||
<i class="fa font-14 fa-phone rounded-s bg-highlight color-white"></i>
|
|
||||||
<span>Kontakt</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="menu-settings" class="menu menu-box-bottom menu-box-detached rounded-m" data-menu-height="270">
|
|
||||||
<div class="menu-title"><h1>Einstellungen</h1><p class="color-highlight"> </p><a href="#" class="close-menu"><i class="fa fa-times"></i></a></div>
|
|
||||||
<div class="divider divider-margins mb-n2"></div>
|
|
||||||
<div class="content">
|
|
||||||
<div class="list-group list-custom-small">
|
|
||||||
<a href="#" data-toggle-theme data-trigger-switch="switch-dark" class="pb-2">
|
|
||||||
<i class="fa font-14 fa-moon rounded-s bg-dark1-dark color-white"></i>
|
|
||||||
<span>Dark Mode</span>
|
|
||||||
<div class="custom-control scale-switch ios-switch">
|
|
||||||
<input data-toggle-theme-switch type="checkbox" class="ios-input" id="switch-dark">
|
|
||||||
<label class="custom-control-label" for="switch-dark"></label>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
<a href="<?php echo LINK_PRE; ?>login">
|
|
||||||
<i class="fa font-14 fa-sign-in-alt rounded-s bg-highlight color-white"></i>
|
|
||||||
<span>Login</span>
|
|
||||||
<i class="fa fa-angle-right"></i>
|
|
||||||
</a>
|
|
||||||
<a href="<?php echo LINK_PRE; ?>signup" class="border-0">
|
|
||||||
<i class="fa font-14 fa-user-plus rounded-s bg-highlight color-white"></i>
|
|
||||||
<span>Registrieren</span>
|
|
||||||
<span class="badge bg-red2-dark color-white">FREE</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php echo $sp['menus']; ?>
|
<?php echo $sp['menus']; ?>
|
||||||
|
|
||||||
@@ -180,7 +45,10 @@
|
|||||||
|
|
||||||
<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/custom.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/regatten.js.php"></script>
|
||||||
|
<script type="text/javascript" src="<?php echo SERVER_ADDR; ?>/client/scripts/custom.js.php"></script>
|
||||||
|
<script type="text/javascript" src="<?php echo SERVER_ADDR; ?>/client/scripts/pwa.js.php"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
37
server/templates.php
Normal file
37
server/templates.php
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class Templates {
|
||||||
|
|
||||||
|
private $path;
|
||||||
|
private $templates;
|
||||||
|
|
||||||
|
function __construct($path) {
|
||||||
|
if (substr($path, -1) != '/') $path .= '/';
|
||||||
|
$this->path = $path;
|
||||||
|
$this->templates = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function load($name, $params = []) {
|
||||||
|
if (!isset($this->templates[$name])) {
|
||||||
|
$filename = $this->path . $name . '.html';
|
||||||
|
if (file_exists($filename) and is_file($filename)) {
|
||||||
|
$this->templates[$name] = file_get_contents($filename);
|
||||||
|
} else {
|
||||||
|
return "<p>Template '$name' not found!</p>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$template = $this->templates[$name];
|
||||||
|
while (($pos = strpos($template, '$')) !== false) {
|
||||||
|
$pos ++;
|
||||||
|
$pos2 = strpos($template, ';', $pos);
|
||||||
|
if ($pos2 === false) return "<p>Syntax error in template '$name'!</p>";
|
||||||
|
$ph = substr($template, $pos, $pos2 - $pos);
|
||||||
|
if (!isset($params[$ph])) $params[$ph] = '';
|
||||||
|
$template = str_replace('$' . $ph . ';', $params[$ph], $template);
|
||||||
|
}
|
||||||
|
return $template;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
3
server/templates/button.html
Normal file
3
server/templates/button.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<a id="$html-id;" class="btn btn-full rounded-s text-uppercase font-900 shadow-m bg-highlight $css-class;" href="$1;">
|
||||||
|
$0;
|
||||||
|
</a>
|
||||||
5
server/templates/card.html
Normal file
5
server/templates/card.html
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<div class="card card-style">
|
||||||
|
<div id="$html-id;" class="content $css-class;">
|
||||||
|
$0;
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
3
server/templates/error.html
Normal file
3
server/templates/error.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<i class="fa fa-exclamation-triangle fa-8x color-red2-dark"></i>
|
||||||
|
<h1 class="fa-6x mt-5 font-900">$0;</h1>
|
||||||
|
<h4 class="mb-5 mt-3">$1;</h4>
|
||||||
10
server/templates/table.html
Normal file
10
server/templates/table.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<div style="width: 100%; overflow-x: auto;">
|
||||||
|
<table id="$html-id;" class="table table-striped table-bordered $css-class;">
|
||||||
|
<thead>
|
||||||
|
$0;
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
$1;
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user