From ec50558e9c1a0ccbbb0f1dfd466a12da2e9e2381 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Sun, 11 Jul 2021 10:34:02 +0200 Subject: [PATCH] - Add dynamic string - Make header biger --- strings.php | 70 ++++++++++++++++++++++------------------------------ theme.php | 71 +++++++++++++++++++++++++++++++---------------------- 2 files changed, 71 insertions(+), 70 deletions(-) diff --git a/strings.php b/strings.php index 3095344..b76837e 100644 --- a/strings.php +++ b/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 {$customizationConfig['supportEmailAddress']} (%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. itsblue.de"; -$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"; \ No newline at end of file +$translations['changePassword']['currentPasswordLabel'] = "Current password"; +$translations['changePassword']['newPasswordLabel'] = "New password"; +$translations['changePassword']['repeatNewPasswordLabel'] = "Repeat new password"; +$translations['changePassword']['submitLabel'] = "Change password"; \ No newline at end of file diff --git a/theme.php b/theme.php index f2d77b2..0e2cd93 100644 --- a/theme.php +++ b/theme.php @@ -146,54 +146,67 @@ class LandingpageTheme $this->_printHeader(); ?>
-
-

Curent timer

- -

00:00:00

-

Manage timer

- _printResultAlert(); ?> -
-
+
+
+
_trId("currentTimer") ?>
+
+ +

00:00:00

+
+
+
+
_trId("manageTimer") ?>
+
+ _printResultAlert(); ?> + +
+ + +
+
+ + " required> +
+ +
- -
- - -
-
- - " required> -
- - +
@@ -247,8 +260,8 @@ class LandingpageTheme
- -
+ +

00:00:00

@@ -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; @@ -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) {