Added contributors base page, Improved home page, Added grids

Update .gitignore, head-preloads.php, and 22 more files...
This commit is contained in:
2023-11-11 13:39:02 +01:00
parent 1d6e65c1e0
commit 2e413d24fd
24 changed files with 232 additions and 24 deletions

View File

@@ -0,0 +1,6 @@
<?php
if($enable_kitty_and_doggo_sounds) {
echo('<link rel="prefetch" as="audio" href="/resources/NibblePoker/sounds/meow-test-01.ogg">');
echo('<link rel="prefetch" as="audio" href="/resources/NibblePoker/sounds/meow-test-02.ogg">');
}
?>

View File

@@ -23,4 +23,7 @@ if($enable_glider) {
if($enable_code_highlight) {
echo('<script src="/resources/NibblePoker/js/nibblepoker-code.min.js"></script>');
}
if($enable_kitty_and_doggo_sounds) {
echo('<script src="/resources/NibblePoker/js/nibblepoker-contributors.min.js"></script>');
}
?>

View File

@@ -62,6 +62,7 @@ function printSidebarEntry($url, $title, $icon, $activeId) {
<hr class="subtle">
<?php
printSidebarEntry(l10n_url_abs('/about/'), localize("sidebar.text.about"), "fad fa-user", "about");
//printSidebarEntry(l10n_url_abs('/contributors/'), localize("sidebar.text.contributors"), "fad fa-users", "contributors");
printSidebarEntry(l10n_url_abs('/contact/'), localize("sidebar.text.contact"), "fad fa-mailbox", "contact");
?>
</nav>

View File

@@ -6,14 +6,17 @@ if(basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) {
// Used for opengraph head tags.
switch($_SERVER['SERVER_NAME']) {
case "192.168.1.85":
case "localhost":
case "nibblepoker.lu":
$host = "nibblepoker.lu";
$host_uri = "https://nibblepoker.lu";
$host_tld = "lu";
break;
case "nibblepoker.com":
$host = "nibblepoker.com";
$host_uri = "https://nibblepoker.com";
$host_tld = "com";
break;
default:
http_response_code(400);
@@ -29,6 +32,7 @@ $config_dir_tools = realpath($dir_commons . "/../" . "tools/");
$enable_grids = false;
$enable_code_highlight = false;
$enable_glider = false;
$enable_kitty_and_doggo_sounds = false;
// Easter-egg optional features
// > Belgium's independence day.

View File

@@ -100,9 +100,19 @@ function localize_private(string $string_key, array $private_lang_data, bool $fa
return $string_key;
}
function localize($string_key) : string {
function localize($string_key, ?array $param_values = null) : string {
global $lang_data;
return localize_private($string_key, $lang_data, false);
if(is_null($param_values)) {
return localize_private($string_key, $lang_data, false);
} else {
$localized_string = localize_private($string_key, $lang_data, false);
for($iStrParam = 0; $iStrParam < sizeof($param_values); $iStrParam++) {
$localized_string = str_replace("%" . $iStrParam, $param_values[$iStrParam], $localized_string);
}
return $localized_string;
}
}
function l10n_url_abs($url) : string {

View File

@@ -0,0 +1,12 @@
{
"contributors.head.title": "Contributors - NibblePoker",
"contributors.head.description": "TODO: description",
"contributors.og.title": "NibblePoker - Contributors",
"contributors.og.description": "TODO: description",
"contributors.header.title": "Contributors",
"contributors.intro.title": "???",
"contributors.sponsors.title": "Sponsors",
"contributors.code.title": "???",
"contributors.spiritualis.title": "Spiritual support"
}

View File

@@ -6,9 +6,9 @@
"home.header.title": "Homepage",
"home.intro.title": "",
"home.intro.text.1": "",
"home.intro.text.2": "",
"home.intro.title": "Welcome to %0",
"home.intro.text.1": "This website contains a collection of my personal work through blog posts, software releases and other forms of media, all of which is accessible for free and under open-source friendly licenses.",
"home.intro.text.2": "If you wish to contact me, you can do so through the contact form linked in the sidebar or via the email address present on that page.",
"home.showcase.title": "Showcase",

View File

@@ -13,5 +13,6 @@
"sidebar.text.gitea": "Git Repos.",
"sidebar.text.wiki": "Wiki",
"sidebar.text.about": "About",
"sidebar.text.contributors": "Contributors",
"sidebar.text.contact": "Contact"
}

View File

@@ -0,0 +1,12 @@
{
"contributors.head.title": "Contributeurs - NibblePoker",
"contributors.head.description": "TODO: description",
"contributors.og.title": "NibblePoker - Contributeurs",
"contributors.og.description": "TODO: description",
"contributors.header.title": "Contributeurs",
"contributors.intro.title": "???",
"contributors.sponsors.title": "Sponsors",
"contributors.code.title": "???",
"contributors.spiritualis.title": "Support spirituel"
}

View File

@@ -6,9 +6,10 @@
"home.header.title": "Page d'accueil",
"home.intro.title": "",
"home.intro.text.1": "",
"home.intro.text.2": "",
"_home.intro.title": "Bienvenue sur '<i>%0</i>'",
"home.intro.title": "Bienvenue sur %0",
"home.intro.text.1": "Ce site web contient une collection de mes travaux personnels tels que des articles de blog, des logiciels utilitaires ou d'autres formes de médias.<br>Tout est accessible gratuitement et sous des licences à l'open source.",
"home.intro.text.2": "Si vous souhaitez me contacter, vous pouvez le faire via la page de contact lié dans la barre de navigation latérale.",
"home.showcase.title": "Vitrine",
@@ -19,7 +20,7 @@
"home.updates.text.privacy": "●&nbsp;&nbsp;Mise-à-jour de notre politique de confidentialité.",
"home.updates.3.date": "12 novembre 2023",
"home.updates.3.text.1": "●&nbsp;&nbsp;Les services annexes sont complètement disponibles.",
"home.updates.3.text.1": "●&nbsp;&nbsp;Les services annexes sont disponibles.",
"home.updates.3.text.2": "●&nbsp;&nbsp;Changement d'hébergeur vers <a href=\"https://www.ionos.fr/\">IONOS</a>.",
"home.updates.3.text.3": "●&nbsp;&nbsp;Finition des pages annexes.",

View File

@@ -13,5 +13,6 @@
"sidebar.text.gitea": "Dépôts Git",
"sidebar.text.wiki": "Wiki",
"sidebar.text.about": "À-propos",
"sidebar.text.contributors": "Contributeurs",
"sidebar.text.contact": "Contact"
}