');
- echo('
');
+ echo('');
echo(' '.localize($title).'
');
- echo('
'.$subTitle.'
');
+ echo('
'.$subTitle.'
');
echo('
');
}
diff --git a/commons/strings.json b/commons/strings.json
index 6332c68..430ba20 100644
--- a/commons/strings.json
+++ b/commons/strings.json
@@ -105,11 +105,15 @@
"error.content.tags.length": "The \"tags\" URL parameter is too long.",
"error.content.tags.alphanumeric": "One of the tags given in the \"tags\" URL parameter is not a valid alphanumeric string.",
"error.content.detect.type": "The type of requested content couldn't be determined.",
+ "error.content.id.alphanumeric": "The requested resource's ID isn't valid.",
+ "error.content.data.not.exist": "The requested resource's doesn't have an associated item file.",
+ "error.content.data.no.title": "No title found !",
- "content.title.error": "$content.title.error",
- "content.title.search": "Projects search",
- "content.title.article": "$content.title.article",
- "content.title.application": "$content.title.application",
+ "content.title.error": "Error",
+ "content.title.content": "Content",
+ "content.title.search": "Search",
+ "content.title.search.card.single": "Search result",
+ "content.title.search.card.multiple": "Search results",
"content.tags.requested": "Requested tags",
"content.search.count.single": "result",
"content.search.count.multiple": "results",
@@ -219,7 +223,7 @@
"error.404.title": "Erreur 404",
"error.404.description": "La ressource demandée est introuvable sur le serveur !",
- "error.content.title.generic": "Erreur de contenu",
+ "error.content.title.generic": "Erreur",
"error.content.title.empty": "Aucun contenu trouvé",
"error.content.none": "Aucune erreur n'a été détectée.",
"error.content.detect.category": "Impossibilité de détecter la catégorie de contenu demandée.",
@@ -230,11 +234,15 @@
"error.content.tags.length": "Le paramètre d'URL \"tags\" est trop long.",
"error.content.tags.alphanumeric": "Un des tags donné dans le paramètre d'URL \"tags\" n'est pas une chaîne de texte alphanumérique valide.",
"error.content.detect.type": "Le type de contenu désiré n'as pas pu être détecté.",
+ "error.content.id.alphanumeric": "L'ID de la ressource demandée n'est pas valide.",
+ "error.content.data.not.exist": "La ressource demandée n'a pas de fichier de données associé.",
+ "error.content.data.no.title": "Aucun titre trouvé !",
- "content.title.error": "$content.title.error",
- "content.title.search": "Recherche de projets",
- "content.title.article": "$content.title.article",
- "content.title.application": "$content.title.application",
+ "content.title.error": "Erreur de contenu",
+ "content.title.content": "Content",
+ "content.title.search": "Recherche de contenu",
+ "content.title.search.card.single": "Résultat de recherche",
+ "content.title.search.card.multiple": "Résultats de recherche",
"content.tags.requested": "Tags demandés",
"content.search.count.single": "résultat",
"content.search.count.multiple": "résultats",
diff --git a/content/blog-listing.php b/content/blog-listing.php
deleted file mode 100644
index 434fd9f..0000000
--- a/content/blog-listing.php
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
- '.$title.'
');
-
- echo('
-

-
');
-
- if(!empty($previewPreface)) {
- echo('
'.$previewPreface.'
');
- }
-
- if(!empty($previewText)) {
- echo('
'.$previewText.'
Click here
');
- } else {
- echo('
Click here
');
- }
-
- echo('
');
-
- echo('
');
- foreach($tags as &$tagValue) {
- echo(' #'.$tagValue.'');
- }
- echo('
');
-}
-
-/* Defining globals and constants */
-const BLOG_ACTION_NONE = "n";
-const BLOG_ACTION_SEARCH_TAGS = "t";
-const BLOG_ACTION_SEARCH_AUTHOR = "a";
-const BLOG_ACTION_SEARCH_DATE = "d";
-//const BLOG_ACTION_ERROR_SEARCH_TYPE_INVALID = "e";
-
-const BLOG_PARAM_ACTION = "c";
-const BLOG_PARAM_ARTICLE_PER_PAGE = "c";
-const BLOG_PARAM_PAGE = "p";
-const BLOG_PARAM_SEARCH_PARAM = "s";
-
-$blog_action = BLOG_ACTION_NONE;
-$blog_search_parameter = "";
-$current_page = 0;
-$article_per_page = 10;
-
-/* Parsing and verifying arguments */
-if(count($_GET) > 0) {
- if(array_key_exists(BLOG_PARAM_ACTION, $_GET)) {
- $blog_action = $_GET[BLOG_PARAM_ACTION];
- }
- if(array_key_exists(BLOG_PARAM_ARTICLE_PER_PAGE, $_GET)) {
- $article_per_page = $_GET[BLOG_PARAM_ARTICLE_PER_PAGE];
- }
- if(array_key_exists(BLOG_PARAM_PAGE, $_GET)) {
- $current_page = $_GET[BLOG_PARAM_PAGE];
- }
- if(array_key_exists(BLOG_PARAM_SEARCH_PARAM, $_GET)) {
- $blog_search_parameter = $_GET[BLOG_PARAM_SEARCH_PARAM];
- }
-}
-
-if(!($blog_action == BLOG_ACTION_NONE || $blog_action == BLOG_ACTION_SEARCH_TAGS ||
- $blog_action == BLOG_ACTION_SEARCH_AUTHOR || $blog_action == BLOG_ACTION_SEARCH_DATE)) {
- $blog_action = BLOG_ACTION_NONE;
-}
-
-if(!is_numeric($article_per_page)) {
- $article_per_page = 10;
-}
-
-if(!is_numeric($current_page)) {
- $current_page = 0;
-}
-
-/* Loading blog entries */
-$jsonArticles = null;
-
-try {
- $jsonArticles = file_get_contents("articles.json");
- $jsonArticles = json_decode($jsonArticles, true);
-} catch (Exception $e) {
- echo 'Caught exception: ', $e->getMessage(), "\n";
- $jsonArticles = null;
-}
-
-if($jsonArticles == null) {
- exit("An error occured during the JSON parsing process...");
-}
-
-/* Printing the articles... */
-$currentArticleId = 0;
-$articlesLeft = $article_per_page;
-
-//TODO: Max value is not right or checked yet !
-for($currentArticleId = ($article_per_page * $current_page); $currentArticleId < count($jsonArticles); $currentArticleId++) {
- //echo($jsonArticles[$currentArticleId]["id"]."
");
- printBlogPreviewCard(
- $jsonArticles[$currentArticleId]["id"],
- $jsonArticles[$currentArticleId]["title"],
- $jsonArticles[$currentArticleId]["preview"]["preface"],
- $jsonArticles[$currentArticleId]["preview"]["text"],
- $jsonArticles[$currentArticleId]["preview"]["image"],
- $jsonArticles[$currentArticleId]["preview"]["imageAlt"],
- $jsonArticles[$currentArticleId]["tags"],
- $jsonArticles[$currentArticleId]["preview"]["icon"]);
-}
-?>
diff --git a/content/index.json b/content/index.json
index 5fd53f1..c369813 100644
--- a/content/index.json
+++ b/content/index.json
@@ -41,7 +41,7 @@
},
"image": "/resources/Azias/imgs/lscom-v2-text-01-bkgd-cli.png",
"tags": [
- "application", "lscom", "purebasic"
+ "application", "lscom", "purebasic", "windows"
]
}
-]
\ No newline at end of file
+]
diff --git a/content/index.php b/content/index.php
index a3dbc12..a43ccc3 100644
--- a/content/index.php
+++ b/content/index.php
@@ -44,12 +44,35 @@ if($content_has_error) {
- ${TODO}
+ '.localize("content.title.content").'');
+ } else {
+ //echo(''.localize("content.title.content").'');
+ echo(localize("content.title.content"));
+ }
+ echo('❱'.localize("content.title.error"));
+ } elseif($requested_content_display_type == ContentDisplayType::SEARCH) {
+ echo(localize("content.title.content").'❱'.localize("content.title.search"));
+ } elseif($requested_content_display_type == ContentDisplayType::CONTENT) {
+ echo(localize("content.title.content").'❱$TODO');
+ }
+ ?>
');
+ echo('
');
+ echo('
');
+ echo('15/04/2021 - This section is under construction...
');
+ echo('');
+ echo('
');
+ endMainCard();
+
if($SHOW_CONTENT_DEBUG_CARD) {
echo('
@@ -74,6 +97,12 @@ if($content_has_error) {
print_r($filtered_content_index_data);
echo('');
echo('
$content_requested_url_part: '.$content_requested_url_part.'
');
+ if($requested_content_display_type == ContentDisplayType::CONTENT) {
+ echo('
');
+ echo('
$requested_item_data: ');
+ print_r($requested_item_data);
+ echo('
');
+ }
echo('
');
}
@@ -139,10 +168,36 @@ if($content_has_error) {
'
');
endMainCard();
} elseif($requested_content_display_type == ContentDisplayType::CONTENT) {
- startMainCard("fad fa-file-alt", localize("content.title.content"), "subtitle");
- endMainCard();
+ $_title_icon = "fad fa-question";
+ $_title_text = '
' . localize("error.content.data.no.title") . '';
+
+ if (array_key_exists("title", $requested_item_data)) {
+ if (array_key_exists("icon", $requested_item_data["title"])) {
+ $_title_icon = $requested_item_data["title"]["icon"];
+ }
+
+ if (array_key_exists($user_language, $requested_item_data["title"])) {
+ $_title_text = $requested_item_data["title"][$user_language];
+ } elseif (array_key_exists($default_language, $requested_item_data["title"])) {
+ $_title_text = $requested_item_data["title"][$user_language];
+ }
+ }
+
+ startMainCard($_title_icon, $_title_text, "");
+
+ echo('
');
+ echo('
');
+ echo('
Text will go here...
');
+ echo('
');
+ echo('
');
+
+ echo('
' .
+ '
' .
+ 'Card footer here.' .
+ '
');
+ endMainCard();
}
-
+
content_printing_end:
?>
diff --git a/content/items/lscom-cli.json b/content/items/lscom-cli.json
index 8143cec..18f1aba 100644
--- a/content/items/lscom-cli.json
+++ b/content/items/lscom-cli.json
@@ -1,9 +1,13 @@
{
"title": {
+ "icon": "fad fa-terminal",
"en": "PB-ListComPort - CLI COM port enumerator",
"fr": "PB-ListComPort - Enumérateur de port COM pour invité de commande"
},
"tags": [
"programming", "lscom"
- ]
+ ],
+ "toggles": {
+ "downloads": true
+ }
}
diff --git a/content/items/test01.json b/content/items/test01.json
deleted file mode 100644
index 5b1f285..0000000
--- a/content/items/test01.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "_": "Is this file used anywhere ? - Referenced as the id in the article index"
-}
\ No newline at end of file
diff --git a/notes.txt b/notes.txt
deleted file mode 100644
index e026c2a..0000000
--- a/notes.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-* Add bottom margin to the last container in the content container for small screens
- * Maybe for big ones too ?
- * Does not happen on the privacy one, probably because all of them are shown.
- * Small is done !
diff --git a/resources/Azias/js/nibblepoker.lu.js b/resources/Azias/js/nibblepoker.lu.js
index a03bfdc..f9a5ac2 100644
--- a/resources/Azias/js/nibblepoker.lu.js
+++ b/resources/Azias/js/nibblepoker.lu.js
@@ -3,6 +3,14 @@ document.getElementById('button-sidebar').addEventListener("click", () => {
halfmoon.toggleSidebar();
});
+// Adding the last URL to every a element with the 'js-set-previous-url' class.
+/*document.querySelectorAll("a.js-set-previous-url").forEach(element => {
+ element.href = document.referrer;
+ element.addEventListener('click', function(e) {
+ window.history.go(-2);
+ });
+});*/
+
// TOX ID copiers. (Contact page)
if(document.getElementById('button-copy-tox-id-main') != null) {
document.getElementById('button-copy-tox-id-main').addEventListener("click", () => {
diff --git a/sitemap.txt b/sitemap.txt
index b9b7765..3e63bac 100644
--- a/sitemap.txt
+++ b/sitemap.txt
@@ -1,41 +1,17 @@
https://nibblepoker.lu/
-https://nibblepoker.lu/blog/
-https://nibblepoker.lu/programming/
-https://nibblepoker.lu/programming/applications/
-https://nibblepoker.lu/programming/tutorials/
-https://nibblepoker.lu/programming/tools/
-https://nibblepoker.lu/programming/purebasic/
-https://nibblepoker.lu/programming/python/
-https://nibblepoker.lu/programming/docker/
-https://nibblepoker.lu/programming/java/
+https://nibblepoker.lu/content/
https://nibblepoker.lu/links/
https://nibblepoker.lu/about/
https://nibblepoker.lu/contact/
https://nibblepoker.lu/privacy/
https://nibblepoker.lu/en/
-https://nibblepoker.lu/en/blog/
-https://nibblepoker.lu/en/programming/
-https://nibblepoker.lu/en/programming/applications/
-https://nibblepoker.lu/en/programming/tutorials/
-https://nibblepoker.lu/en/programming/tools/
-https://nibblepoker.lu/en/programming/purebasic/
-https://nibblepoker.lu/en/programming/python/
-https://nibblepoker.lu/en/programming/docker/
-https://nibblepoker.lu/en/programming/java/
+https://nibblepoker.lu/en/content/
https://nibblepoker.lu/en/links/
https://nibblepoker.lu/en/about/
https://nibblepoker.lu/en/contact/
https://nibblepoker.lu/en/privacy/
https://nibblepoker.lu/fr/
-https://nibblepoker.lu/fr/blog/
-https://nibblepoker.lu/fr/programming/
-https://nibblepoker.lu/fr/programming/applications/
-https://nibblepoker.lu/fr/programming/tutorials/
-https://nibblepoker.lu/fr/programming/tools/
-https://nibblepoker.lu/fr/programming/purebasic/
-https://nibblepoker.lu/fr/programming/python/
-https://nibblepoker.lu/fr/programming/docker/
-https://nibblepoker.lu/fr/programming/java/
+https://nibblepoker.lu/fr/content/
https://nibblepoker.lu/fr/links/
https://nibblepoker.lu/fr/about/
https://nibblepoker.lu/fr/contact/
diff --git a/test/.env b/test/.env
deleted file mode 100644
index 8f214dd..0000000
--- a/test/.env
+++ /dev/null
@@ -1 +0,0 @@
-Test123