- Add dynamic string
- Make header biger
This commit is contained in:
parent
61cc21d199
commit
ec50558e9c
2 changed files with 71 additions and 70 deletions
70
strings.php
70
strings.php
|
@ -2,50 +2,38 @@
|
|||
|
||||
defined('L_EXEC') or die();
|
||||
|
||||
// Available placeholders:
|
||||
// {$customizationConfig['organizationName']}
|
||||
// {$customizationConfig['fullOrganizationName']}
|
||||
// {$customizationConfig['supportEmailAddress']}
|
||||
$translations['home']['menu']['manageTimerLabel'] = "Manage timer";
|
||||
$translations['home']['menu']['changePasswordLabel'] = "Change password";
|
||||
$translations['home']['menu']['openTimerLabel'] = "OpenTimer";
|
||||
$translations['home']['menu']['logoutLabel'] = "Logout";
|
||||
|
||||
$translations['home']['hello'] = "Hallo";
|
||||
$translations['home']['welcomeMessage'] = "Wilkommen bei deinem {$customizationConfig['organizationName']}-Account - Ein Login für alles";
|
||||
$translations['home']['menu']['linksLabel'] = "{$customizationConfig['organizationName']} Dienste";
|
||||
$translations['home']['menu']['changePasswordLabel'] = "Passwort ändern";
|
||||
$translations['home']['menu']['changeEmailLabel'] = "E-Mail-Adresse ändern";
|
||||
$translations['home']['menu']['generateJitsiLinkLabel'] = "Jitsi Link generieren";
|
||||
$translations['home']['menu']['logoutLabel'] = "Abmelden";
|
||||
$translations['home']['menu']['loginLabel'] = "Anmelden";
|
||||
$translations['currentTimer'] = "Current timer";
|
||||
$translations['manageTimer'] = "Manage timer";
|
||||
$translations['header'] = "Header";
|
||||
$translations['time'] = "Time";
|
||||
$translations['startTimer'] = "Start timer";
|
||||
$translations['loading'] = "Loading...";
|
||||
|
||||
// These rules are currently hard coded!
|
||||
$translations['passwordRules'][0] = "Das Passwort muss mindestens 7 Zeichen lang sein.";
|
||||
$translations['passwordRules'][1] = "Das Passwort muss mindestens eine Zahl oder ein Sonderzeichen enthalten.";
|
||||
$translations['passwordRules'][2] = "Das Passwort muss mindestens einen Klein- und einen Großbuchstaben enthalten.";
|
||||
|
||||
$translations['results']['internalError'] = "Interner Fehler. Falls das Problem bestehen bleibt, kontaktieren sie bitte <a href=\"mailto:{$customizationConfig['supportEmailAddress']}?body=Fehlercode: %ERR%; URI: {$_SERVER['REQUEST_URI']}\">{$customizationConfig['supportEmailAddress']}</a> (%ERR%)";
|
||||
$translations['results']['permissionDenied'] = "Zugriff verweigert";
|
||||
$translations['results']['noPermissionToAnyPage'] = str_replace("%ERR%", "0005", $translations['results']['internalError']);
|
||||
$translations['results']['loginSuccess'] = "Erfolgreich angemeldet";
|
||||
$translations['results']['loginFailed'] = "Ungültige Zugangsdaten";
|
||||
$translations['results']['loginRequired'] = "Bitte zuerst anmelden!";
|
||||
$translations['results']['oldPasswordIsWrong'] = "Das aktulle Passwort ist falsch";
|
||||
$translations['results']['newPasswordMustNotBeEqualToOldPassword'] = "Das neue Passwort darf nicht mit dem Alten übereinstimmen";
|
||||
$translations['results']['newPasswordAndRepeatDidNotMatch'] = "Die Passwörter stimmen nicht überein";
|
||||
$translations['results']['passwordIsTooShort'] = $translations['passwordRules'][0];
|
||||
$translations['results']['newPasswordMustNotBeOldPassword'] = "Das neue Passwort darf nicht mit dem Alten übereinstimmen.";
|
||||
$translations['results']['passwordChangedSuccessfully'] = "Dein Passwort wurde erfolgreich geändert.";
|
||||
$translations['results']['timerSetSuccessfully'] = "The timer was started successfully";
|
||||
$translations['results']['permissionDenied'] = "Access denied";
|
||||
$translations['results']['loginFailed'] = "Invalid credentials";
|
||||
$translations['results']['loginRequired'] = "Please sign in first!";
|
||||
$translations['results']['oldPasswordIsWrong'] = "The current password is wrong!";
|
||||
$translations['results']['newPasswordAndRepeatDidNotMatch'] = "The passwords are not equal.";
|
||||
$translations['results']['newPasswordMustNotBeOldPassword'] = "The new password must not be the old password.";
|
||||
$translations['results']['passwordChangedSuccessfully'] = "Your password was successfully changed.";
|
||||
$translations['results']['timerSetSuccessfully'] = "The timer was started successfully.";
|
||||
|
||||
$translations['globals']['title'] = "{$customizationConfig['organizationName']} Account";
|
||||
$translations['globals']['usernameLabel'] = "Benutzername";
|
||||
$translations['globals']['passwordLabel'] = "Passwort";
|
||||
$translations['globals']['emailAddress'] = "E-Mail-Adresse";
|
||||
$translations['globals']['title'] = "Itsblue synced timer";
|
||||
$translations['globals']['usernameLabel'] = "Username";
|
||||
$translations['globals']['passwordLabel'] = "Password";
|
||||
$translations['globals']['emailAddress'] = "E-Mail-Address";
|
||||
|
||||
$translations['login']['title'] = "Bitte anmelden";
|
||||
$translations['login']['submitLabel'] = "Anmelden";
|
||||
$translations['login']['footnote'] = "Login für Mitglieder des {$customizationConfig['fullOrganizationName']}";
|
||||
$translations['login']['title'] = "Please sign in";
|
||||
$translations['login']['submitLabel'] = "Sign in";
|
||||
$translations['login']['footnote'] = "Login for the itsblue synced timer. <a href=\"https://itsblue.de\">itsblue.de</a>";
|
||||
|
||||
$translations['changePassword']['passwordRulesHeader'] = "Regeln für Passwörter:";
|
||||
$translations['changePassword']['currentPasswordLabel'] = "Aktuelles Passwort";
|
||||
$translations['changePassword']['newPasswordLabel'] = "Neues Passwort";
|
||||
$translations['changePassword']['repeatNewPasswordLabel'] = "Neues Password Wiederholen";
|
||||
$translations['changePassword']['submitLabel'] = "Passwort ändern";
|
||||
$translations['changePassword']['currentPasswordLabel'] = "Current password";
|
||||
$translations['changePassword']['newPasswordLabel'] = "New password";
|
||||
$translations['changePassword']['repeatNewPasswordLabel'] = "Repeat new password";
|
||||
$translations['changePassword']['submitLabel'] = "Change password";
|
57
theme.php
57
theme.php
|
@ -146,55 +146,68 @@ class LandingpageTheme
|
|||
$this->_printHeader();
|
||||
?>
|
||||
<style>
|
||||
.flex-equal>* {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.flex-md-equal>* {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">Itsblue synced timer</a>
|
||||
<a class="navbar-brand" href="#"><?= $this->_trId("globals.title") ?></a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
|
||||
<ul class="navbar-nav nav-pills me-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="#">Home</a>
|
||||
<a class="nav-link active" aria-current="page" href="#"><?= $this->_trId("home.menu.manageTimerLabel") ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" aria-current="page" target="blank" href="<?= $this->_globalConfig["basePath"] ?>/t/<?= $_SESSION["auth"]["username"] ?>">Open timer</a>
|
||||
<a class="nav-link" aria-current="page" target="blank" href="<?= $this->_globalConfig["basePath"] ?>/t/<?= $_SESSION["auth"]["username"] ?>"><?= $this->_trId("home.menu.openTimerLabel") ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<form action="logout/submit" method="post" class="d-felx">
|
||||
<input type="submit" value="logout" class="btn btn-secondary">
|
||||
<input type="submit" value="<?= $this->_trId("home.menu.logoutLabel") ?>" class="btn btn-secondary">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container" style="margin-top: 20px;">
|
||||
<h1>Curent timer</h1>
|
||||
<h4 id="header">Loading ...</h4>
|
||||
<h4 id="timer">00:00:00</h4>
|
||||
<h1>Manage timer</h1>
|
||||
<div class="container mt-3">
|
||||
<div class="card text-white bg-dark mb-3">
|
||||
<div class="card-header"><?= $this->_trId("currentTimer") ?></div>
|
||||
<div class="card-body">
|
||||
<h3 id="header"><?= $this->_trId("loading") ?></h3>
|
||||
<h1 class="card-title" id="timer">00:00:00</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card text-dark bg-light mb-3">
|
||||
<div class="card-header w-100"><?= $this->_trId("manageTimer") ?></div>
|
||||
<div class="card-body w-100" style="text-align: left;">
|
||||
<?php $this->_printResultAlert(); ?>
|
||||
<form method="post" action="manage/submit">
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
<input name="cat" type="hidden" value="5-6">
|
||||
<div class="mb-3">
|
||||
<label for="header">Header</label>
|
||||
<label for="header"><?= $this->_trId("header") ?></label>
|
||||
<textarea class="form-control" name="header" rows="3" required><?= $userData["header"] ?></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="time">Time</label>
|
||||
<label for="time"><?= $this->_trId("time") ?></label>
|
||||
<input type="number" name="time" class="form-control" value="<?= $userData["time"] ?>" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Start timer</button>
|
||||
<button type="submit" class="btn btn-primary"><?= $this->_trId("startTimer") ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
<?php
|
||||
|
@ -247,8 +260,8 @@ class LandingpageTheme
|
|||
|
||||
<div class="d-flex w-100 h-100 p-3 mx-auto flex-column">
|
||||
<main class="px-3 h-100 mt-auto w-100">
|
||||
<h4 id="header">Loading ...</h4>
|
||||
<div style="justify-content:center; align-items:center; display:flex;">
|
||||
<h4 id="header"><?= $this->_trId("loading") ?></h4>
|
||||
<div class="h-80" style="justify-content:center; align-items:center; display:flex;">
|
||||
<h4 id="timer">00:00:00</h4>
|
||||
</div>
|
||||
</main>
|
||||
|
@ -270,10 +283,11 @@ class LandingpageTheme
|
|||
for (var i = 0; 3 > i; i++) { // Iterate for better better convergence
|
||||
curFontSize *= targetWidth / (textElem.offsetWidth / textElem.parentNode.offsetWidth);
|
||||
textElem.style.fontSize = curFontSize + "pt";
|
||||
headerTextElem.fontSize = curFontSize / 2 + "pt"
|
||||
headerTextElem.style.fontSize = curFontSize * 0.3 + "pt"
|
||||
}
|
||||
}
|
||||
updateTextSize();
|
||||
window.onresize = updateTextSize;
|
||||
</script>
|
||||
</footer>
|
||||
|
||||
|
@ -302,10 +316,9 @@ class LandingpageTheme
|
|||
var processData = function() {
|
||||
if (this.readyState === 4 && this.status === 200) {
|
||||
currentData = JSON.parse(this.responseText);
|
||||
if(currentData["status"] === 200) {
|
||||
if (currentData["status"] === 200) {
|
||||
currentData = currentData["data"]
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
document.getElementById("timer").innerHTML = "error: " + this.status
|
||||
}
|
||||
} else if (this.readyState === 4 && this.status !== 0) {
|
||||
|
|
Loading…
Reference in a new issue