Text will go here...
'); - echo(''); - - /*
lscom_fra_x86.exe
- - -diff --git a/commons/content.php b/commons/content.php index f08189e..788986f 100644 --- a/commons/content.php +++ b/commons/content.php @@ -165,6 +165,18 @@ function printErrorTextElement(string $text) : void { } } +function processStandardContentSubNode(mixed $elementNode) : void { + if(array_key_exists("content", $elementNode)) { + if (array_key_exists("parts", $elementNode["content"])) { + for ($iPart = 0; $iPart < count($elementNode["content"]["parts"]); $iPart++) { + createElementNode($elementNode["content"]["parts"][$iPart]); + } + } else { + echo(getContentItemText($elementNode["content"], false, true)); + } + } +} + function createElementNode(mixed $elementNode) : void { // Checking if we actually have a JSON object. if(!is_array($elementNode)) { @@ -177,6 +189,92 @@ function createElementNode(mixed $elementNode) : void { } switch($elementNode["type"]) { + case "spacer": + // Defining the font size. + $_spacerSize = 1; + if(array_key_exists("size", $elementNode)) { + $_spacerSize = $elementNode["size"]; + } + + // Adding element. + echo('
'); + + break; + case "h1": + case "h2": + case "h3": + // Defining the font size. + $_headingFontSize = ($elementNode["type"] == "h3" ? '18' : (($elementNode["type"] == "h2" ? '20' : '22'))); + + // Opening heading. + echo('<'.$elementNode["type"].' class="font-weight-semi-bold font-size-'.$_headingFontSize.' m-0">'); + + // Adding content. + processStandardContentSubNode($elementNode); + + // Closing heading. + echo(''.$elementNode["type"].'>'); + + break; + case "paragraph": + // Parsing properties. + $_indentLevel = 0; + if(array_key_exists("indent", $elementNode)) { + $_indentLevel = $elementNode["indent"]; + } + + // Opening paragraph. + echo(''); + + // Adding content. + processStandardContentSubNode($elementNode); + + // Closing paragraph. + echo('
'); + + break; + case "code": + // Parsing properties. + $_indentLevel = 0; + if(array_key_exists("indent", $elementNode)) { + $_indentLevel = $elementNode["indent"]; + } + + // Reading and processing the modifiers. + $_modNoTopMargin = false; + $_modFullWidth = false; + $_modHorizontalScroll = false; + if(array_key_exists("modifiers", $elementNode)) { + for ($i = 0; $i < count($elementNode["modifiers"]); $i++) { + switch($elementNode["modifiers"][$i]) { + case "no-top-margin": + $_modNoTopMargin = true; + break; + case "full-width": + $_modFullWidth = true; + break; + case "horizontal-scroll": + $_modHorizontalScroll = true; + break; + } + } + } + + // Opening code element. + echo(' '); + + break; case "container": // Grabbing the global padding. $_containerPadding = "10"; @@ -187,6 +285,7 @@ function createElementNode(mixed $elementNode) : void { // Reading and processing the modifiers. $_modNoTopMargin = false; $_modNoTopPadding = false; + $_modNoBottomPadding = false; $_modNoSizePadding = false; if(array_key_exists("modifiers", $elementNode)) { for ($i = 0; $i < count($elementNode["modifiers"]); $i++) { @@ -197,6 +296,9 @@ function createElementNode(mixed $elementNode) : void { case "no-top-padding": $_modNoTopPadding = true; break; + case "no-bottom-padding": + $_modNoBottomPadding = true; + break; case "no-side-padding": $_modNoSizePadding = true; break; @@ -206,18 +308,10 @@ function createElementNode(mixed $elementNode) : void { // Opening container. echo('REQUEST_URI: '.$_SERVER['REQUEST_URI'].'
'); echo('$requested_content_display_type: '.$requested_content_display_type.'
'); echo('$requested_tags: ['.implode(", ", $requested_tags).']
'); @@ -213,7 +212,7 @@ if($content_has_error) { startMainCard($_title_icon, $_title_text_main, (is_null($_title_text_sub) ? "" : $_title_text_sub)); // Opening the content container. - echo('Text will go here...
'); - echo('lscom_fra_x86.exe
- - -mode
command, and the Device Manager to find a newly plugged-in device that provides a COM port."
+ }
+ },
+ {
+ "type": "paragraph",
+ "indent": 2,
+ "content": {
+ "en": "The earliest version of Windows that can be used is Windows XP x64 or Windows Vista due to the fact that RegGetValueW is not available on older versions of Windows."
+ }
+ }
+ ]
}
},
+
+ {
+ "type": "container",
+ "padding": 20,
+ "modifiers": [
+ "no-top-padding",
+ "no-bottom-padding"
+ ],
+ "content": {
+ "parts": [
+ {
+ "type": "h1",
+ "content": {
+ "en": "Usage",
+ "fr": "Utilisation"
+ }
+ },
+ {
+ "type": "code",
+ "indent": 2,
+ "modifiers": [
+ "full-width",
+ "horizontal-scroll"
+ ],
+ "code": [
+ "lscom.exe [-a|--show-all] [-d|--show-device] [-D