Fixed download links, Added rules for scrollbars aimed at mobile

Update content.php, index.php, and 2 more files...
This commit is contained in:
2022-04-15 23:07:19 +02:00
parent 3ba082323e
commit 49e4b7154c
4 changed files with 23 additions and 10 deletions

View File

@@ -380,6 +380,7 @@ function createElementNode(mixed $elementNode) : void {
$_modNoContentPadding = false; $_modNoContentPadding = false;
$_modNoTopMargin = false; $_modNoTopMargin = false;
$_modIsClosed = false; $_modIsClosed = false;
$_modHorizontalScroll = false;
if(array_key_exists("modifiers", $elementNode)) { if(array_key_exists("modifiers", $elementNode)) {
for ($i = 0; $i < count($elementNode["modifiers"]); $i++) { for ($i = 0; $i < count($elementNode["modifiers"]); $i++) {
switch($elementNode["modifiers"][$i]) { switch($elementNode["modifiers"][$i]) {
@@ -399,6 +400,9 @@ function createElementNode(mixed $elementNode) : void {
// Close the collapse by default. // Close the collapse by default.
$_modIsClosed = true; $_modIsClosed = true;
break; break;
case "horizontal-scroll":
$_modHorizontalScroll = true;
break;
} }
} }
} }
@@ -409,7 +413,8 @@ function createElementNode(mixed $elementNode) : void {
echo('<h4 class="font-size-16 m-0 align-middle no-select"><i class="fad fa-angle-down hidden-collapse-closed font-size-24"></i>'); echo('<h4 class="font-size-16 m-0 align-middle no-select"><i class="fad fa-angle-down hidden-collapse-closed font-size-24"></i>');
echo('<i class="fad fa-angle-up hidden-collapse-open font-size-24"></i>'); echo('<i class="fad fa-angle-up hidden-collapse-open font-size-24"></i>');
echo('<span class="font-weight-semi-bold align-top">&nbsp;&nbsp;'.$_title.'<span class="ml-20 text-muted">'.$_subtitle.'</span></span>'); echo('<span class="font-weight-semi-bold align-top">&nbsp;&nbsp;'.$_title.'<span class="ml-20 text-muted">'.$_subtitle.'</span></span>');
echo('</h4></summary><div class="collapse-content'.($_modNoContentPadding?" p-0 py-01":"").($_modNoRounding?" rounded-0":"").' border-0 border-bottom">'); echo('</h4></summary><div class="collapse-content'.($_modHorizontalScroll?' overflow-x-scroll hide-scrollbar':'').
($_modNoContentPadding?" p-0 py-01":"").($_modNoRounding?" rounded-0":"").' border-0 border-bottom">');
// Rendering sub-elements. // Rendering sub-elements.
if(array_key_exists("parts", $elementNode)) { if(array_key_exists("parts", $elementNode)) {

View File

@@ -213,7 +213,7 @@ if($content_has_error) {
startMainCard($_title_icon, $_title_text_main, (is_null($_title_text_sub) ? "" : $_title_text_sub)); startMainCard($_title_icon, $_title_text_main, (is_null($_title_text_sub) ? "" : $_title_text_sub));
// Opening the content container. // Opening the content container.
echo('<div class="py-01 pb-0 bg-light-lm rounded-bottom px-0 bg-very-dark title-bkgd">'); echo('<div id="content-item-container" class="py-01 pb-0 bg-light-lm rounded-bottom px-0 bg-very-dark title-bkgd">');
// Adding elements defined in the JSON file. // Adding elements defined in the JSON file.
if(array_key_exists("parts", $requested_item_data)) { if(array_key_exists("parts", $requested_item_data)) {

View File

@@ -30,12 +30,12 @@
"key": "content.commons.version.current" "key": "content.commons.version.current"
}, },
"subtitle": { "subtitle": {
"en": "v2.1.0", "en": "v2.1.0"
"fr": "v2.1.0"
}, },
"modifiers": [ "modifiers": [
"no-rounding", "no-rounding",
"no-padding-content" "no-padding-content",
"horizontal-scroll"
], ],
"parts": [ "parts": [
{ {
@@ -110,12 +110,12 @@
"parts": [ "parts": [
{ {
"type": "button", "type": "button",
"link": "https://files.nibblepoker.lu/downloads/PB-ListComPort/2.1.0/lscom_fra_x86.exe", "link": "https://files.nibblepoker.lu/downloads/PB-ListComPort/2.1.0/lscom_eng_x86.exe",
"modifiers": [ "modifiers": [
"thin" "thin"
], ],
"content": { "content": {
"en": "<span class=\"text-monospace\">lscom_fra_x86.exe</span><i class=\"fas fa-download ml-10\"></i>" "en": "<span class=\"text-monospace\">lscom_eng_x86.exe</span><i class=\"fas fa-download ml-10\"></i>"
} }
} }
] ]
@@ -153,7 +153,8 @@
"no-rounding", "no-rounding",
"no-padding-content", "no-padding-content",
"no-top-margin", "no-top-margin",
"closed" "closed",
"horizontal-scroll"
], ],
"parts": [ "parts": [
{ {
@@ -235,12 +236,12 @@
"parts": [ "parts": [
{ {
"type": "button", "type": "button",
"link": "https://files.nibblepoker.lu/downloads/PB-ListComPort/2.0.0/lscom_fra_x86.exe", "link": "https://files.nibblepoker.lu/downloads/PB-ListComPort/2.0.0/lscom_eng_x86.exe",
"modifiers": [ "modifiers": [
"thin" "thin"
], ],
"content": { "content": {
"en": "<span class=\"text-monospace\">lscom_fra_x86.exe</span><i class=\"fas fa-download ml-10\"></i>" "en": "<span class=\"text-monospace\">lscom_eng_x86.exe</span><i class=\"fas fa-download ml-10\"></i>"
} }
} }
] ]

View File

@@ -64,6 +64,13 @@ img.no-save {
padding-top: 0.01rem; padding-top: 0.01rem;
padding-bottom: 0.01rem; padding-bottom: 0.01rem;
} }
.hide-scrollbar::-webkit-scrollbar {
display: none;
}
.hide-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}
/* Unique rules */ /* Unique rules */
#copyright-text { #copyright-text {