Updated contact page's text, Added yaa and mc mod items, Updated some code in the composer and other pages

Update composer.php, sidebar.php, and 7 more files...
This commit is contained in:
2022-09-12 20:50:48 +02:00
parent b3f50e1357
commit 4188ed4767
9 changed files with 457 additions and 23 deletions

View File

@@ -619,12 +619,25 @@ class ComposerElement {
// Defining the text's indent level.
$_paragraph_ident_level = is_null($this->indent) ? 0 : $this->indent;
// Calculating the vertical margin modifiers
$_paragraph_no_margin_top = ComposerElementModifiers::is_modifier_in_modifiers(
ComposerElementModifiers::GENERIC_MARGIN_NO_TOP, $this->modifiers);
$_paragraph_no_margin_bottom = ComposerElementModifiers::is_modifier_in_modifiers(
ComposerElementModifiers::GENERIC_MARGIN_NO_BOTTOM, $this->modifiers);
if($_paragraph_no_margin_top && $_paragraph_no_margin_bottom) {
$_paragraph_margin_modifier = 'my-0';
} else if($_paragraph_no_margin_top) {
$_paragraph_margin_modifier = 'mt-0 mb-10';
} else if($_paragraph_no_margin_bottom) {
$_paragraph_margin_modifier = 'mt-10 mb-0';
} else {
$_paragraph_margin_modifier = 'my-10';
}
// Composing the paragraph
$htmlCode .= '<p class="' .
(ComposerElementModifiers::is_modifier_in_modifiers(
ComposerElementModifiers::GENERIC_MARGIN_NO_TOP, $this->modifiers)
? 'mt-0 mb-10' : 'my-10') . ' ml-md-' . ($_paragraph_ident_level * 5) . '">' .
$this->get_inner_html($content_root) . '</p>';
$htmlCode .= '<p class="' . $_paragraph_margin_modifier. ' ml-md-' . ($_paragraph_ident_level * 5) .
'">' . $this->get_inner_html($content_root) . '</p>';
break;
@@ -834,8 +847,10 @@ function get_content_file_path(string $content_id) : ?string {
}
function load_content_by_file_path(string $file_path) : ?ComposerContent {
// FIXME: Add handling for JSON errors !
$content_json_data = json_decode(file_get_contents($file_path), true);
if(is_null($content_json_data)) {
return null;
}
return ComposerContent::from_json($content_json_data);
}

View File

@@ -32,10 +32,14 @@ if(!isset($SIDEBAR_ID)) {
<span class="sidebar-icon"><i class="fad fa-browser"></i></span>
<?php print(localize("programming.apps.title")); ?>
</a>
<a id="sbl-projects-tutorials" href="<?php print(l10n_url_abs('/content/?tags=tutorial')); ?>" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon"><i class="fad fa-books"></i></span>
<a id="sbl-projects-tutorials" href="<?php print(l10n_url_abs('/content/?tags=game')); ?>" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon"><i class="fad fa-gamepad-alt"></i></span>
<?php print(localize("programming.games.title")); ?>
</a>
<!--<a id="sbl-projects-tutorials" href="<?php print(l10n_url_abs('/content/?tags=tutorial')); ?>" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon"><i class="fad fa-books"></i></span>
<?php print(localize("programming.tutorials.title")); ?>
</a>
</a>-->
<a id="sbl-projects-tools" href="<?php print(l10n_url_abs('/content/?tags=tool')); ?>" class="sidebar-link sidebar-link-with-icon">
<span class="sidebar-icon"><i class="fad fa-tools"></i></span>
<?php print(localize("programming.tools.title")); ?>

View File

@@ -175,7 +175,16 @@
"downloads.title": "Downloads",
"downloads.description": "$downloads.description",
"downloads.title.header": "Downloads",
"downloads.intro.title": "Directory listing of: <i>/files/</i>"
"downloads.intro.title": "Directory listing of: <i>/files/</i>",
"contact.email.title": "Email",
"contact.email.name": "Sender's Name",
"contact.email.message": "Message",
"contact.twitter.button": "Compose DM to @NibblePoker on Twitter",
"contact.tox.main": "Main account:",
"contact.tox.secondary": "Backup account:",
"contact.tox.button.open": "Open in Tox Client",
"contact.tox.button.copy": "Copy to clipboard"
},
"fr": {
"home.title.nav": "Accueil",
@@ -340,7 +349,16 @@
"about.philosophy.title": "Philosophie des projets",
"about.skills.title": "Compétences",
"about.work.title": "Parcours professionnel",
"about.education.title": "Éducation"
"about.education.title": "Éducation",
"contact.email.title": "Courriel",
"contact.email.name": "Nom de l'envoyeur",
"contact.email.message": "Message",
"contact.twitter.button": "Composer un message privé pour @NibblePoker sur Twitter",
"contact.tox.main": "Compte principal:",
"contact.tox.secondary": "Compte secondaire:",
"contact.tox.button.open": "Ouvrir dans un client Tox",
"contact.tox.button.copy": "Copier dans le presse-papier"
},
"lb": {
"home.title.nav": "Doheem",