From fcb6d0caa09ab32af4b0947c2075639a0053c4fe Mon Sep 17 00:00:00 2001 From: Herwin Date: Tue, 9 Jan 2024 00:24:55 +0100 Subject: [PATCH] Improved debug page, Added snowflake easter-egg, Added more ARM & ARM64 variants to the strings Update footer.php, head.php, and 14 more files... --- commons/DOM/footer.php | 22 +- commons/DOM/head.php | 3 + commons/strings/en/common.json | 4 +- commons/strings/en/content.json | 8 +- commons/strings/en/debug.json | 8 +- commons/strings/fr/common.json | 4 +- commons/strings/fr/content.json | 7 +- commons/strings/fr/debug.json | 8 +- compile-sass.cmd | 2 + content/items/lscom-cli-dotnet.json | 2 +- debug/index.php | 207 +++++++++++------- readme.md | 3 + .../NibblePoker/css/LICENSE-snowflakes.txt | 21 ++ resources/NibblePoker/js/nibblepoker.js | 34 +-- resources/NibblePoker/scss/snowflakes.scss | 160 ++++++++++++++ resources/NibblePoker/scss/waffle-day.scss | 13 -- 16 files changed, 380 insertions(+), 126 deletions(-) create mode 100644 resources/NibblePoker/css/LICENSE-snowflakes.txt create mode 100644 resources/NibblePoker/scss/snowflakes.scss delete mode 100644 resources/NibblePoker/scss/waffle-day.scss diff --git a/commons/DOM/footer.php b/commons/DOM/footer.php index 0b28482..baa7c96 100644 --- a/commons/DOM/footer.php +++ b/commons/DOM/footer.php @@ -20,4 +20,24 @@ include_once 'commons/langs.php'; <?php echo(localize(" draggable="false"> - \ No newline at end of file + +'); + for($i_waffle = 0; $i_waffle < 12; $i_waffle++) { + echo('
' . ($emojis)[$i_waffle % 3] . '
'); + } + echo(''); +} +if($enable_bouneschlupp_mode) { + +} + +// TODO: Implement those +//if($enable_gallery) { +// echo(''); +// echo(''); +//} +?> \ No newline at end of file diff --git a/commons/DOM/head.php b/commons/DOM/head.php index 681dc04..d7ae1b6 100644 --- a/commons/DOM/head.php +++ b/commons/DOM/head.php @@ -22,4 +22,7 @@ if($enable_code_highlight) { if($enable_gallery) { echo(''); } +if($enable_waffle_iron) { + echo(''); +} ?> diff --git a/commons/strings/en/common.json b/commons/strings/en/common.json index 0b3b850..3f984cf 100644 --- a/commons/strings/en/common.json +++ b/commons/strings/en/common.json @@ -6,5 +6,7 @@ "common.na": "N/A", "common.yes": "Yes", - "common.no": "No" + "common.no": "No", + + "common.user-agent": "User-Agent" } \ No newline at end of file diff --git a/commons/strings/en/content.json b/commons/strings/en/content.json index c0d3a3a..d1ccf49 100644 --- a/commons/strings/en/content.json +++ b/commons/strings/en/content.json @@ -56,13 +56,15 @@ "content.commons.version.old.single": "Old version", "content.commons.version.old.multiple": "Old versions", "content.commons.version.source": "Source code", - "content.commons.cpu": "CPU Architecture", + "content.commons.cpu": "CPU Architecture", "content.commons.cpu.responsive": "CPU Architecture", "content.commons.cpu.any": "Any architecture", "content.commons.cpu.x64": "x64", + "_content.commons.cpu.x64": "

x64
AMD64

", "content.commons.cpu.x86": "x86", - "content.commons.cpu.arm": "arm", - "content.commons.cpu.arm64": "arm64", + "content.commons.cpu.arm32": "

ARM32
ARMv7
AArch32

", + "content.commons.cpu.arm64": "

ARM64
ARMv8
AArch64

", + "content.commons.cpu.risc-v": "risc-v", "content.commons.na.italic": "N/A", "content.commons.na": "N/A", "content.commons.lang": "Language", diff --git a/commons/strings/en/debug.json b/commons/strings/en/debug.json index bfbcab6..ee9bccc 100644 --- a/commons/strings/en/debug.json +++ b/commons/strings/en/debug.json @@ -1,8 +1,8 @@ { "debug.head.title": "Debugger - NibblePoker", - "debug.head.description": "TODO: description", + "debug.head.description": "Debugging page used to analyse the behaviour of various mechanisms used by the website.", "debug.og.title": "NibblePoker - Debugger", - "debug.og.description": "TODO: description", + "debug.og.description": "Debugging page used to analyse the behaviour of various mechanisms used by the website.", "debug.header.title": "Debugger", "debug.tables.field": "Field", @@ -21,5 +21,7 @@ "debug.lang.default": "Default language", "debug.lang.user": "Active language", "debug.lang.header.raw": "Raw HTTP header", - "debug.lang.header.processed": "Processed HTTP header" + "debug.lang.header.processed": "Processed HTTP header", + + "debug.client.title": "Client Information" } \ No newline at end of file diff --git a/commons/strings/fr/common.json b/commons/strings/fr/common.json index af7cef4..9ed77b2 100644 --- a/commons/strings/fr/common.json +++ b/commons/strings/fr/common.json @@ -6,5 +6,7 @@ "common.na": "Non-applicable", "common.yes": "Oui", - "common.no": "Non" + "common.no": "Non", + + "common.user-agent": "User-Agent" } \ No newline at end of file diff --git a/commons/strings/fr/content.json b/commons/strings/fr/content.json index 5a22e77..8c2d9b5 100644 --- a/commons/strings/fr/content.json +++ b/commons/strings/fr/content.json @@ -50,11 +50,14 @@ "content.commons.version.old.multiple": "Anciennes versions", "content.commons.version.source": "Code source", "content.commons.cpu": "Architecture de CPU", + "content.commons.cpu.responsive": "Architecture de CPU", "content.commons.cpu.any": "Indépendante", "content.commons.cpu.x64": "x64", + "_content.commons.cpu.x64": "

x64
AMD64

", "content.commons.cpu.x86": "x86", - "content.commons.cpu.arm": "arm", - "content.commons.cpu.arm64": "arm64", + "content.commons.cpu.arm32": "

ARM32
ARMv7
AArch32

", + "content.commons.cpu.arm64": "

ARM64
ARMv8
AArch64

", + "content.commons.cpu.risc-v": "risc-v", "content.commons.na.italic": "N/A", "content.commons.na": "N/A", "content.commons.lang": "Langue", diff --git a/commons/strings/fr/debug.json b/commons/strings/fr/debug.json index 11aea77..da68b83 100644 --- a/commons/strings/fr/debug.json +++ b/commons/strings/fr/debug.json @@ -1,8 +1,8 @@ { "debug.head.title": "DĂ©bogueur - NibblePoker", - "debug.head.description": "TODO: description", + "debug.head.description": "Page de dĂ©bogage utilisĂ©e pour analyser le comportement des diffĂ©rents mĂ©canismes utilisĂ©s par ce site web.", "debug.og.title": "NibblePoker - DĂ©bogueur", - "debug.og.description": "TODO: description", + "debug.og.description": "Page de dĂ©bogage utilisĂ©e pour analyser le comportement des diffĂ©rents mĂ©canismes utilisĂ©s par ce site web.", "debug.header.title": "DĂ©bogueur", "debug.tables.field": "Champ", @@ -21,5 +21,7 @@ "debug.lang.default": "Langue par dĂ©faut", "debug.lang.user": "Langue active", "debug.lang.header.raw": "En-tĂȘte HTTP brut", - "debug.lang.header.processed": "En-tĂȘte HTTP traitĂ©" + "debug.lang.header.processed": "En-tĂȘte HTTP traitĂ©", + + "debug.client.title": "Informations du client" } \ No newline at end of file diff --git a/compile-sass.cmd b/compile-sass.cmd index 4ed3651..e828946 100644 --- a/compile-sass.cmd +++ b/compile-sass.cmd @@ -16,6 +16,8 @@ pushd %CD% cd %~dp0\resources\NibblePoker\scss\ call "%~dp0node_modules\.bin\sass" nibblepoker.scss:../css/nibblepoker.css -q call "%~dp0node_modules\.bin\sass" nibblepoker.scss:../css/nibblepoker.min.css -q --style compressed +call "%~dp0node_modules\.bin\sass" snowflakes.scss:../css/snowflakes.css -q +call "%~dp0node_modules\.bin\sass" snowflakes.scss:../css/snowflakes.min.css -q --style compressed popd pushd %CD% cd %~dp0\wiki\scss\ diff --git a/content/items/lscom-cli-dotnet.json b/content/items/lscom-cli-dotnet.json index acf4d86..6e7e142 100644 --- a/content/items/lscom-cli-dotnet.json +++ b/content/items/lscom-cli-dotnet.json @@ -371,7 +371,7 @@ }] } ],[ - {"type": "raw", "content": "content.commons.cpu.arm", "rowspan": 2}, + {"type": "raw", "content": "content.commons.cpu.arm32", "rowspan": 2}, {"type": "raw", "content": "requirements.text.dotnet"}, { "type": "raw", diff --git a/debug/index.php b/debug/index.php index dc28c3f..90c0ad4 100644 --- a/debug/index.php +++ b/debug/index.php @@ -26,102 +26,139 @@ include 'commons/DOM/sidebar.php'; ?>

- +

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + +
' . htmlspecialchars($_SERVER['HTTP_ACCEPT_LANGUAGE']) . ''); - } else { - echo('' . localize("common.undefined") . ''); - } - ?>
0 ? ' class="mt-xs"' : '') . '>'); - echo('' . htmlspecialchars($_client_language[0]) . ''); - echo(' ➜ '); - echo('' . htmlspecialchars($_client_language[1]) . ''); - echo('

'); - $_i_client_language++; +
+ + + + + + + + + + + + + + + + + + + + + + + - - -
' . htmlspecialchars($_SERVER['HTTP_ACCEPT_LANGUAGE']) . ''); + } else { + echo('' . localize("common.undefined") . ''); } - } else { - echo('' . localize("common.na") . ''); - } - ?>
+ ?>
0 ? ' class="mt-xs"' : '') . '>'); + echo('' . htmlspecialchars($_client_language[0]) . ''); + echo(' ➜ '); + echo('' . htmlspecialchars($_client_language[1]) . ''); + echo('

'); + $_i_client_language++; + } + } else { + echo('' . localize("common.na") . ''); + } + ?>
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + +
(PHP)
(JS)
' . htmlspecialchars($_SERVER['HTTP_USER_AGENT']) . ''); + } else { + echo('' . localize("common.undefined") . ''); + }?>
+
{ const eSidebar = document.getElementById("sidebar"); const eMain = document.getElementById("main"); + // TODO: Emit an event to help Splide re-align after the sidebar has changed state. document.getElementById("sidebar-toggle-footer").onclick = function() { if(isSidebarVisible) { eSidebar.classList.add("retracted"); diff --git a/resources/NibblePoker/scss/snowflakes.scss b/resources/NibblePoker/scss/snowflakes.scss new file mode 100644 index 0000000..7e4b68a --- /dev/null +++ b/resources/NibblePoker/scss/snowflakes.scss @@ -0,0 +1,160 @@ +/* + * ----------------------------------------------------------------------------- + * NibblePoker.lu CSS - Snowflake Effect + * Version: 1.0.0 + * ----------------------------------------------------------------------------- + * Source: https://github.com/pajasevi/CSSnowflakes + * License: MIT - Copyright (c) 2014 Pavel Ơevčík + * ----------------------------------------------------------------------------- + */ + +.snowflake { + color: #fff; + font-size: 1em; + font-family: Arial, sans-serif; + text-shadow: 0 0 5px #000; +} + +@keyframes snowflakes-fall { + 0% { + transform: translateY(0vh); + } + + 100% { + transform: translateY(110vh); + } +} + +@keyframes snowflakes-shake { + 0% { + transform: translateX(0px); + } + + 50% { + transform: translateX(80px); + } + + 100% { + transform: translateX(0px); + } +} + +.snowflake { + position: fixed; + top: -10%; + z-index: 9999; + /* still needed for Safari */ + -webkit-user-select: none; + user-select: none; + cursor: default; + + animation-name: snowflakes-shake; + animation-duration: 3s; + animation-timing-function: ease-in-out; + animation-iteration-count: infinite; + animation-play-state: running; +} + +.snowflake .inner { + animation-duration: 10s; + animation-iteration-count: infinite; + animation-name: snowflakes-fall; + animation-play-state: running; + animation-timing-function: linear; +} + +.snowflake:nth-of-type(0) { + left: 1%; + animation-delay: 0s; +} +.snowflake:nth-of-type(0) .inner { + animation-delay: 0s; +} + +.snowflake:nth-of-type(1) { + left: 10%; + animation-delay: 1s; +} +.snowflake:nth-of-type(1) .inner { + animation-delay: 1s; +} + +.snowflake:nth-of-type(2) { + left: 20%; + animation-delay: 0.5s; +} +.snowflake:nth-of-type(2) .inner { + animation-delay: 6s; +} + +.snowflake:nth-of-type(3) { + left: 30%; + animation-delay: 2s; +} +.snowflake:nth-of-type(3) .inner { + animation-delay: 4s; +} + +.snowflake:nth-of-type(4) { + left: 40%; + animation-delay: 2s; +} +.snowflake:nth-of-type(4) .inner { + animation-delay: 2s; +} + +.snowflake:nth-of-type(5) { + left: 50%; + animation-delay: 3s; +} +.snowflake:nth-of-type(5) .inner { + animation-delay: 8s; +} + +.snowflake:nth-of-type(6) { + left: 60%; + animation-delay: 2s; +} +.snowflake:nth-of-type(6) .inner { + animation-delay: 6s; +} + +.snowflake:nth-of-type(7) { + left: 70%; + animation-delay: 1s; +} +.snowflake:nth-of-type(7) .inner { + animation-delay: 2.5s; +} + +.snowflake:nth-of-type(8) { + left: 80%; + animation-delay: 0s; +} +.snowflake:nth-of-type(8) .inner { + animation-delay: 1s; +} + +.snowflake:nth-of-type(9) { + left: 90%; + animation-delay: 1.5s; +} +.snowflake:nth-of-type(9) .inner { + animation-delay: 3s; +} + +.snowflake:nth-of-type(10) { + left: 25%; + animation-delay: 0s; +} +.snowflake:nth-of-type(10) .inner { + animation-delay: 2s; +} + +.snowflake:nth-of-type(11) { + left: 65%; + animation-delay: 2.5s; +} +.snowflake:nth-of-type(11) .inner { + animation-delay: 4s; +} diff --git a/resources/NibblePoker/scss/waffle-day.scss b/resources/NibblePoker/scss/waffle-day.scss deleted file mode 100644 index 761fd5d..0000000 --- a/resources/NibblePoker/scss/waffle-day.scss +++ /dev/null @@ -1,13 +0,0 @@ -/* - * ----------------------------------------------------------------------------- - * NibblePoker.lu CSS - Belgium Independence Day Extra - * Version: 0.0.3 - * Copyright, 2023 Bozet Herwin - * ----------------------------------------------------------------------------- - * Source: https://github.com/aziascreations/Web-NibblePoker - * ----------------------------------------------------------------------------- - */ - -.test-123-456 { - background-color: red; -}