Added data classes bases, Trivial modifications to many files
Update .gitignore, .htaccess, and 19 more files...
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -36,6 +36,7 @@ tools/items/mc-art-viewer/nbt.js
|
|||||||
*.url
|
*.url
|
||||||
*.env
|
*.env
|
||||||
*.sqlite
|
*.sqlite
|
||||||
|
*.conf
|
||||||
|
|
||||||
# Temporary
|
# Temporary
|
||||||
articles/*.txt
|
articles/*.txt
|
||||||
|
@@ -3,6 +3,11 @@
|
|||||||
Require all denied
|
Require all denied
|
||||||
</Files>
|
</Files>
|
||||||
|
|
||||||
|
# Preventing access to wrongly copied .conf files
|
||||||
|
<Files ~ "^.*\.conf">
|
||||||
|
Require all denied
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
|
||||||
# Redirecting HTTP traffic to HTTPS. (Keep commented on localhost !)
|
# 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.
|
# This is handled by reverse-proxies, but it should still be enabled in production just to be safe.
|
||||||
|
@@ -11,7 +11,7 @@ if(basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) {
|
|||||||
<meta name="viewport" content="width=device-width"/>
|
<meta name="viewport" content="width=device-width"/>
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||||
<link rel="alternate icon" href="/favicon.ico">
|
<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">
|
<link rel="stylesheet" href="/resources/NibblePoker/css/nibblepoker.min.css?v=1">
|
||||||
<?php
|
<?php
|
||||||
if($enable_code_highlight) {
|
if($enable_code_highlight) {
|
||||||
|
@@ -35,10 +35,10 @@ function printSidebarEntry($url, $title, $icon, $activeId) {
|
|||||||
?>
|
?>
|
||||||
<hr class="subtle">
|
<hr class="subtle">
|
||||||
<?php
|
<?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=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=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
|
<?php
|
||||||
//<hr class="subtle">
|
//<hr class="subtle">
|
||||||
@@ -48,7 +48,7 @@ function printSidebarEntry($url, $title, $icon, $activeId) {
|
|||||||
<?php
|
<?php
|
||||||
printSidebarEntry(l10n_url_abs('/links/'), localize("sidebar.text.links"), "fad fa-link", "links");
|
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://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", "");
|
//printSidebarEntry("https://wiki.nibblepoker.lu/", localize("sidebar.text.wiki"), "fad fa-books", "");
|
||||||
?>
|
?>
|
||||||
<hr class="subtle">
|
<hr class="subtle">
|
||||||
|
@@ -38,6 +38,9 @@ $enable_kitty_and_doggo_sounds = false;
|
|||||||
// > Belgium's independence day.
|
// > Belgium's independence day.
|
||||||
$enable_waffle_iron = date('m-d') === '07-21';
|
$enable_waffle_iron = date('m-d') === '07-21';
|
||||||
|
|
||||||
|
// > Luxembourg's national day.
|
||||||
|
$enable_bouneschlupp_mode = date('m-d') === '06-23';
|
||||||
|
|
||||||
// Debugging stuff
|
// Debugging stuff
|
||||||
$print_execution_timer = true;
|
$print_execution_timer = true;
|
||||||
?>
|
?>
|
@@ -198,4 +198,4 @@ function getContentManager(string $contentRootPath): ContentManager {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
3
commons/content/article.php
Normal file
3
commons/content/article.php
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
?>
|
3
commons/content/content.php
Normal file
3
commons/content/content.php
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
?>
|
19
commons/content/data/metadata.php
Normal file
19
commons/content/data/metadata.php
Normal 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 {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@@ -49,4 +49,4 @@ class OpenGraphData {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
20
commons/content/data/twitter_card.php
Normal file
20
commons/content/data/twitter_card.php
Normal 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;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
?>
|
@@ -92,7 +92,7 @@ function localize_private(string $string_key, array $private_lang_data, bool $fa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($fallback_to_common) {
|
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);
|
return localize_private($fallback_prefix . $string_key, $lang_data, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,4 +128,4 @@ function l10n_url_switch($lang) : string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@@ -66,4 +66,4 @@ function getDirectoryContent(string $dirPath, array $filteringRegexes, int $recu
|
|||||||
return $returnedData;
|
return $returnedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@@ -30,4 +30,4 @@ function add_code_modal(string $id, string $title, string $text) {
|
|||||||
</div>');
|
</div>');
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@@ -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% "links/"
|
||||||
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "privacy/"
|
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/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/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/css/"
|
||||||
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*.png"
|
set NP_ZIP_CONTENT=%NP_ZIP_CONTENT% "resources/NibblePoker/images/*.png"
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// Common setup
|
||||||
$start_time = microtime(true);
|
$start_time = microtime(true);
|
||||||
set_include_path('./');
|
set_include_path('./');
|
||||||
include_once 'commons/config.php';
|
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 |
@@ -15,6 +15,8 @@ switch($_SERVER['SERVER_NAME']) {
|
|||||||
http_response_code(400);
|
http_response_code(400);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
http_response_code(200);
|
|
||||||
|
// Finishing the response.
|
||||||
|
//http_response_code(200);
|
||||||
exit(0);
|
exit(0);
|
||||||
?>
|
?>
|
||||||
|
@@ -40,6 +40,6 @@ foreach(SITEMAP_LANGUAGES as $language_key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Finishing the response.
|
// Finishing the response.
|
||||||
http_response_code(200);
|
//http_response_code(200);
|
||||||
exit(0);
|
exit(0);
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user