Added data classes bases, Trivial modifications to many files

Update .gitignore, .htaccess, and 19 more files...
This commit is contained in:
2024-01-07 07:34:50 +01:00
parent fac33dd5e2
commit 3891ec5859
20 changed files with 70 additions and 12 deletions

1
.gitignore vendored
View File

@@ -36,6 +36,7 @@ tools/items/mc-art-viewer/nbt.js
*.url
*.env
*.sqlite
*.conf
# Temporary
articles/*.txt

View File

@@ -3,6 +3,11 @@
Require all denied
</Files>
# Preventing access to wrongly copied .conf files
<Files ~ "^.*\.conf">
Require all denied
</Files>
# Redirecting HTTP traffic to HTTPS. (Keep commented on localhost !)
# This is handled by reverse-proxies, but it should still be enabled in production just to be safe.

View File

@@ -11,7 +11,7 @@ if(basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) {
<meta name="viewport" content="width=device-width"/>
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="alternate icon" href="/favicon.ico">
<link rel="stylesheet" href="/resources/FontAwesomePro/5.15.3/css/all.min.css">
<link rel="stylesheet" href="/resources/FontAwesomePro/6.5.1/css/all.min.css">
<link rel="stylesheet" href="/resources/NibblePoker/css/nibblepoker.min.css?v=1">
<?php
if($enable_code_highlight) {

View File

@@ -35,10 +35,10 @@ function printSidebarEntry($url, $title, $icon, $activeId) {
?>
<hr class="subtle">
<?php
//printSidebarEntry(l10n_url_abs('/content/'), localize("sidebar.text.projects"), "fad fa-briefcase", "content");
printSidebarEntry(l10n_url_abs('/content/?tags=application;web'), localize("sidebar.text.applications"), "fad fa-browser", "application");
printSidebarEntry(l10n_url_abs('/content/?tags=library'), localize("sidebar.text.libraries"), "fad fa-puzzle-piece", "library");
//printSidebarEntry(l10n_url_abs('/content/?tags=electronic'), localize("sidebar.text.electronics"), "fad fa-microchip", "electronic");
//printSidebarEntry(l10n_url_abs('/content/?tags=library'), localize("sidebar.text.libraries"), "fad fa-chart-scatter-3d", "library");
printSidebarEntry(l10n_url_abs('/content/?tags=electronic'), localize("sidebar.text.electronics"), "fad fa-microchip", "electronic");
?>
<?php
//<hr class="subtle">
@@ -48,7 +48,7 @@ function printSidebarEntry($url, $title, $icon, $activeId) {
<?php
printSidebarEntry(l10n_url_abs('/links/'), localize("sidebar.text.links"), "fad fa-link", "links");
printSidebarEntry("https://files.nibblepoker.lu/", localize("sidebar.text.downloads"), "fad fa-download", "");
printSidebarEntry("https://git.nibblepoker.lu/", localize("sidebar.text.gitea"), "fad fa-code", "");
//printSidebarEntry("https://git.nibblepoker.lu/", localize("sidebar.text.gitea"), "fad fa-code", "");
//printSidebarEntry("https://wiki.nibblepoker.lu/", localize("sidebar.text.wiki"), "fad fa-books", "");
?>
<hr class="subtle">

View File

@@ -38,6 +38,9 @@ $enable_kitty_and_doggo_sounds = false;
// > Belgium's independence day.
$enable_waffle_iron = date('m-d') === '07-21';
// > Luxembourg's national day.
$enable_bouneschlupp_mode = date('m-d') === '06-23';
// Debugging stuff
$print_execution_timer = true;
?>

View File

@@ -198,4 +198,4 @@ function getContentManager(string $contentRootPath): ContentManager {
);
}
?>
?>

View File

@@ -0,0 +1,3 @@
<?php
?>

View File

@@ -0,0 +1,3 @@
<?php
?>

View File

@@ -0,0 +1,19 @@
<?php
// Making sure the file is included and not accessed directly.
if(basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) {
header('HTTP/1.1 403 Forbidden');
die();
}
// Including required helpers.
include_once 'commons/langs.php';
// Including subclasses.
include_once 'commons/content/data/opengraph.php';
include_once 'commons/content/data/twitter_card.php';
class ContentMetadata {
}
?>

View File

@@ -49,4 +49,4 @@ class OpenGraphData {
);
}
}
?>
?>

View File

@@ -0,0 +1,20 @@
<?php
/*enum Suit {
case Hearts;
case Diamonds;
case Clubs;
case Spades;
}*/
// See: https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup
/*class ContentTwitterMetadata {
public string $title;
public string $description;
public string $type;
public string $url;
public string $image;
public string $image_type;
}*/
?>

View File

@@ -92,7 +92,7 @@ function localize_private(string $string_key, array $private_lang_data, bool $fa
}
}
if($fallback_to_common) {
// If we can attempt to fallback on the common lang file.
// If we can attempt to fall back on the common lang file.
return localize_private($fallback_prefix . $string_key, $lang_data, false);
}
@@ -128,4 +128,4 @@ function l10n_url_switch($lang) : string {
}
}
?>
?>

View File

@@ -66,4 +66,4 @@ function getDirectoryContent(string $dirPath, array $filteringRegexes, int $recu
return $returnedData;
}
?>
?>

View File

@@ -30,4 +30,4 @@ function add_code_modal(string $id, string $title, string $text) {
</div>');
}
?>
?>

View File

@@ -32,6 +32,7 @@ set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "contributors/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "links/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "privacy/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/FontAwesomePro/5.15.3/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/FontAwesomePro/6.5.1/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/HighlightJS/highlight.min.js" "resources/HighlightJS/src/styles/atom-one-dark.min.css"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/css/"
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*.png"

View File

@@ -1,4 +1,5 @@
<?php
// Common setup
$start_time = microtime(true);
set_include_path('./');
include_once 'commons/config.php';

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@@ -15,6 +15,8 @@ switch($_SERVER['SERVER_NAME']) {
http_response_code(400);
exit(1);
}
http_response_code(200);
// Finishing the response.
//http_response_code(200);
exit(0);
?>

View File

@@ -40,6 +40,6 @@ foreach(SITEMAP_LANGUAGES as $language_key) {
}
// Finishing the response.
http_response_code(200);
//http_response_code(200);
exit(0);
?>