tachtler:haproxy_archlinux
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
tachtler:haproxy_archlinux [2023/01/31 13:29] – [Maintenance-Konfiguration: /etc/haproxy/maintenance.htm] klaus | tachtler:haproxy_archlinux [2023/12/28 15:21] (aktuell) – [Maintenance-Konfiguration: /etc/haproxy/maintenance.htm] klaus | ||
---|---|---|---|
Zeile 1499: | Zeile 1499: | ||
<meta name=" | <meta name=" | ||
<title data-i18n-key=" | <title data-i18n-key=" | ||
+ | < | ||
+ | html, body { padding: 0; margin: 0; width: 100%; height: 100%; } | ||
+ | * {box-sizing: | ||
+ | body { text-align: center; padding: 0; background: #d6433b; color: #fff; font-family: | ||
+ | h1 { font-size: 24px; font-weight: | ||
+ | body { font-family: | ||
+ | article { display: block; width: 700px; padding: 50px; margin: 0 auto; } | ||
+ | b { color: #fff; font-weight: | ||
+ | svg { width: 75px; margin-top: 1em; } | ||
+ | </ | ||
</ | </ | ||
- | </ | ||
- | < | ||
- | html, body { padding: 0; margin: 0; width: 100%; height: 100%; } | ||
- | * {box-sizing: | ||
- | body { text-align: center; padding: 0; background: #d6433b; color: #fff; font-family: | ||
- | h1 { font-size: 24px; font-weight: | ||
- | body { font-family: | ||
- | article { display: block; width: 700px; padding: 50px; margin: 0 auto; } | ||
- | b { color: #fff; font-weight: | ||
- | svg { width: 75px; margin-top: 1em; } | ||
- | </ | ||
< | < | ||
< | < | ||
Zeile 1516: | Zeile 1515: | ||
<svg xmlns=" | <svg xmlns=" | ||
<h1 data-i18n-key=" | <h1 data-i18n-key=" | ||
- | <p data-i18n-key=" | + | <p data-i18n-key=" |
</ | </ | ||
</ | </ | ||
+ | < | ||
+ | // The locale our app first shows | ||
+ | const defaultLocale = " | ||
+ | const supportedLocales = [" | ||
+ | // Check if locale ist supported | ||
+ | function isSupported(locale) { | ||
+ | return supportedLocales.indexOf(locale) > -1; | ||
+ | } | ||
+ | // Retrieve the first locale we support from the given | ||
+ | // array, or return our default locale | ||
+ | function supportedOrDefault(locales) { | ||
+ | return locales.find(isSupported) || defaultLocale; | ||
+ | } | ||
+ | // Detect browser locale | ||
+ | function browserLocales(languageCodeOnly = false) { | ||
+ | return navigator.languages.map((locale) => | ||
+ | languageCodeOnly ? locale.split(" | ||
+ | ); | ||
+ | } | ||
+ | // Translations | ||
+ | const translations = { | ||
+ | // German translations | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | // English translations | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | }; | ||
+ | // When the page content is ready | ||
+ | document.addEventListener(" | ||
+ | document | ||
+ | // Find all elements that have the key attribute | ||
+ | .querySelectorAll(" | ||
+ | .forEach(translateElement); | ||
+ | }); | ||
+ | // Replace the inner text of the given HTML element | ||
+ | // with the translation in the active locale, | ||
+ | // corresponding to the element' | ||
+ | function translateElement(element) { | ||
+ | const key = element.getAttribute(" | ||
+ | const initialLocale = supportedOrDefault(browserLocales(true)); | ||
+ | const translation = translations[initialLocale][key]; | ||
+ | element.innerHTML = translation; | ||
+ | } | ||
+ | </ | ||
</ | </ | ||
- | < | ||
- | // The locale our app first shows | ||
- | const defaultLocale = " | ||
- | const supportedLocales = [" | ||
- | // Check if locale ist supported | ||
- | function isSupported(locale) { | ||
- | return supportedLocales.indexOf(locale) > -1; | ||
- | } | ||
- | // Retrieve the first locale we support from the given | ||
- | // array, or return our default locale | ||
- | function supportedOrDefault(locales) { | ||
- | return locales.find(isSupported) || defaultLocale; | ||
- | } | ||
- | // Detect browser locale | ||
- | function browserLocales(languageCodeOnly = false) { | ||
- | return navigator.languages.map((locale) => | ||
- | languageCodeOnly ? locale.split(" | ||
- | ); | ||
- | } | ||
- | // Translations | ||
- | const translations = { | ||
- | // German translations | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | // English translations | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | }, | ||
- | }; | ||
- | // When the page content is ready | ||
- | document.addEventListener(" | ||
- | document | ||
- | // Find all elements that have the key attribute | ||
- | .querySelectorAll(" | ||
- | .forEach(translateElement); | ||
- | }); | ||
- | // Replace the inner text of the given HTML element | ||
- | // with the translation in the active locale, | ||
- | // corresponding to the element' | ||
- | function translateElement(element) { | ||
- | const key = element.getAttribute(" | ||
- | const initialLocale = supportedOrDefault(browserLocales(true)); | ||
- | const translation = translations[initialLocale][key]; | ||
- | element.innerHTML = translation; | ||
- | } | ||
- | </ | ||
</ | </ | ||
</ | </ |
tachtler/haproxy_archlinux.1675168167.txt.gz · Zuletzt geändert: 2023/01/31 13:29 von klaus