Revamped layout, Added lang selection, Added auto lang detection, Removed trash, Other minor improvements

Update .htaccess, body-1.php, and 50 more files...
This commit is contained in:
2023-06-01 17:20:44 +02:00
parent 6e9bf25866
commit 6fb621e550
52 changed files with 1047 additions and 654 deletions

View File

@@ -50,7 +50,7 @@ ErrorDocument 404 /error.php
# # # Setting some headers for security. # # # Setting some headers for security.
# # #Header always set X-Detected-Country "NK" # # #Header always set X-Detected-Country "NK"
# # Header always set X-Frame-Options "deny" # # Header always set X-Frame-Options "deny"
# # Header always set Content-Security-Policy "default-src 'self' files.nibblepoker.lu; object-src 'none'; child-src 'self'; frame-ancestors 'none'; upgrade-insecure-requests; block-all-mixed-content" # # Header always set Content-Security-Policy "default-src 'self' files.nibblepoker.lu; img-src 'self' files.nibblepoker.lu data:; object-src 'none'; child-src 'self'; frame-ancestors 'none'; upgrade-insecure-requests; block-all-mixed-content"
# # Header always set X-XSS-Protection " 1; mode=block" # # Header always set X-XSS-Protection " 1; mode=block"
# # Header always set Referrer-Policy "no-referrer" # # Header always set Referrer-Policy "no-referrer"
# # Header always set X-Content-Type-Options "nosniff" # # Header always set X-Content-Type-Options "nosniff"
@@ -66,7 +66,6 @@ RewriteEngine On
# Languages. (Does not work with a regex) # Languages. (Does not work with a regex)
RewriteRule ^en/(.*)$ /$1 [QSA] RewriteRule ^en/(.*)$ /$1 [QSA]
RewriteRule ^fr/(.*)$ /$1 [QSA] RewriteRule ^fr/(.*)$ /$1 [QSA]
RewriteRule ^lb/(.*)$ /$1 [QSA]
# Honeypots. (Just to fuck with automated scanners, gotta love those unsolicited emails tho...) # Honeypots. (Just to fuck with automated scanners, gotta love those unsolicited emails tho...)

View File

@@ -1,8 +0,0 @@
<?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();
}
?>
<table class="container-root"><tr><td>

View File

@@ -1,8 +0,0 @@
<?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();
}
?>
</td><td class="w-full h-full"><table class="w-full h-full"><tr><td>

View File

@@ -1,8 +0,0 @@
<?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();
}
?>
</td></tr><tr class="h-full"><td class="h-full"><div class="fluid-container">

View File

@@ -1,8 +0,0 @@
<?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();
}
?>
</div></td></tr></table></td></tr><tr><td colspan="2">

View File

@@ -1,8 +0,0 @@
<?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();
}
?>
</td></tr></table>

View File

@@ -1,6 +1,6 @@
<?php <?php
// Making sure the file is included and not accessed directly. // Making sure the file is included and not accessed directly.
if (basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) { if(basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) {
header('HTTP/1.1 403 Forbidden'); header('HTTP/1.1 403 Forbidden');
die(); die();
} }
@@ -18,6 +18,6 @@ include_once 'commons/langs.php';
</p> </p>
<a href="<?php print(l10n_url_abs('/')); ?>"> <a href="<?php print(l10n_url_abs('/')); ?>">
<img id="logo-footer" src="/resources/NibblePoker/images/logos/v2_full_unshaded_original.svg" <img id="logo-footer" src="/resources/NibblePoker/images/logos/v2_full_unshaded_original.svg"
alt="<?php echo(localize("footer.alt.logo")); ?>" draggable="false"> alt="<?php echo(localize("footer.alt.logo")); ?>" draggable="false">
</a> </a>
</footer> </footer>

View File

@@ -5,10 +5,10 @@ if(basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) {
die(); die();
} }
?> ?>
<meta charset="utf-8" /> <meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" /> <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width"/>
<!--<meta content="cache, store" http-equiv="Cache-Control"> <!--<meta content="cache, store" http-equiv="Cache-Control">
<meta content="cache, store" http-equiv="Pragma"> <meta content="cache, store" http-equiv="Pragma">
<meta content="3600" http-equiv="Expires">--> <meta content="3600" http-equiv="Expires">-->
@@ -22,9 +22,9 @@ if($enable_waffle_iron) {
//echo("<link rel=\"stylesheet\" href=\"/resources/NibblePoker/css/waffle-day.min.css\">"); //echo("<link rel=\"stylesheet\" href=\"/resources/NibblePoker/css/waffle-day.min.css\">");
} }
if($enable_code_highlight) { if($enable_code_highlight) {
echo('<link href="/resources/HighlightJS/11.6.0/styles/atom-one-dark.min.css" rel="stylesheet" />'); echo('<link href="/resources/HighlightJS/11.6.0/styles/atom-one-dark.min.css" rel="stylesheet"/>');
} }
if($enable_glider) { if($enable_glider) {
echo('<link href="/resources/GliderJs/1.7.6/glider.min.css" rel="stylesheet" />'); echo('<link href="/resources/GliderJs/1.7.6/glider.min.css" rel="stylesheet"/>');
} }
?> ?>

View File

@@ -0,0 +1,26 @@
<?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();
}
?>
<details id="lang-selector" class="border p-mxs px-s bkgd-blank-dark r-m">
<summary>
<i class="fad fa-language"></i>
<span class="mobile-hide t-w-500">&nbsp;<?php print(localize("lang.menu.title")); ?></span>
&nbsp;<i class="fa fa-angle-down"></i>
</summary>
<div class="p-xs border bkgd-surround r-m t-w-500">
<a href="<?php echo(l10n_url_switch('en')); ?>" class="bland-link">
<p class="mb-s px-xxs"><?php print(localize("lang.english")); ?></p>
</a>
<a href="<?php echo(l10n_url_switch('fr')); ?>" class="bland-link">
<p class="my-s px-xxs"><?php print(localize("lang.french")); ?></p>
</a>
<hr class="subtle m-0">
<a href="<?php echo(l10n_url_switch(NULL)); ?>" class="bland-link">
<p class="mt-xs px-xxs"><?php print(localize("lang.automatic")); ?></p>
</a>
</div>
</details>

View File

@@ -1,63 +1,64 @@
<?php <?php
// Making sure the file is included and not accessed directly. // Making sure the file is included and not accessed directly.
if (basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) { if(basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) {
header('HTTP/1.1 403 Forbidden'); header('HTTP/1.1 403 Forbidden');
die(); die();
} }
include_once 'commons/langs.php'; include_once 'commons/langs.php';
if(!isset($SIDEBAR_ID)) { if(!isset($SIDEBAR_IDS)) {
$SIDEBAR_ID = 'default'; $SIDEBAR_IDS = [];
} }
function printSidebarEntry($url, $title, $icon) { function printSidebarEntry($url, $title, $icon, $activeId) {
echo('<a class="bland-link" href="' . $url . '"><p class="t-size-18 t-w-500 py-xs sidebar-entry">'); global $SIDEBAR_IDS;
echo('<a class="' . (in_array($activeId, $SIDEBAR_IDS) ? 'text-link' : 'bland-link') . '" href="' . $url . '">');
echo('<p class="t-size-18 t-w-500 py-xs sidebar-entry">');
echo('<i class="' . $icon . ' pr-xs t-size-12 t-half-muted"></i><span class="t-size-12">' . $title . '</span></p></a>'); echo('<i class="' . $icon . ' pr-xs t-size-12 t-half-muted"></i><span class="t-size-12">' . $title . '</span></p></a>');
} }
?> ?>
<nav id="sidebar" class="sidebar p-m pt-l"> <nav id="sidebar" class="sidebar p-m pt-l">
<!-- TODO: Active link, and set it from content for projects -->
<a href="<?php print(l10n_url_abs('/')); ?>" class="no-select"> <a href="<?php print(l10n_url_abs('/')); ?>" class="no-select">
<img id="logo-sidebar" src="/resources/NibblePoker/images/logos/v2_full_unshaded_original.svg" <img id="logo-sidebar" src="/resources/NibblePoker/images/logos/v2_full_unshaded_original.svg"
alt="<?php echo(localize("sidebar.alt.logo")); ?>" draggable="false"> alt="<?php echo(localize("sidebar.alt.logo")); ?>" draggable="false">
</a> </a>
<p class="quantum t-logo-text mb-s mt-xs t-muted ucase"> <p class="quantum t-logo-text mb-s mt-xs t-muted ucase">
N<span class="t-super-muted">ibble</span>P<span class="t-super-muted">oker</span> N<span class="t-super-muted">ibble</span>P<span class="t-super-muted">oker</span>
</p> </p>
<hr class="subtle"> <hr class="subtle">
<?php <?php
printSidebarEntry(l10n_url_abs('/'), localize("sidebar.text.home"), "fad fa-home"); printSidebarEntry(l10n_url_abs('/'), localize("sidebar.text.home"), "fad fa-home", "home");
?> ?>
<hr class="subtle"> <hr class="subtle">
<?php <?php
printSidebarEntry(l10n_url_abs('/content/'), localize("sidebar.text.projects"), "fad fa-briefcase"); printSidebarEntry(l10n_url_abs('/content/'), localize("sidebar.text.projects"), "fad fa-briefcase", "content");
?> ?>
<div class="ml-m"> <div class="ml-m">
<?php <?php
printSidebarEntry(l10n_url_abs('/content/?tags=application'), localize("sidebar.text.applications"),"fad fa-browser"); printSidebarEntry(l10n_url_abs('/content/?tags=application'), localize("sidebar.text.applications"), "fad fa-browser", "application");
printSidebarEntry(l10n_url_abs('/content/?tags=library'), localize("sidebar.text.libraries"), "fad fa-puzzle-piece"); 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"); printSidebarEntry(l10n_url_abs('/content/?tags=electronic'), localize("sidebar.text.electronics"), "fad fa-microchip", "electronic");
?>
</div>
<hr class="subtle">
<?php
printSidebarEntry(l10n_url_abs('/tools/'), localize("sidebar.text.tools"), "fad fa-tools");
?>
<hr class="subtle">
<?php
printSidebarEntry(l10n_url_abs('/links/'), localize("sidebar.text.links"), "fad fa-link");
?>
<div class="ml-m">
<?php
printSidebarEntry("https://files.nibblepoker.lu/", localize("sidebar.text.downloads"),"fad fa-download");
printSidebarEntry("https://git.nibblepoker.lu/", localize("sidebar.text.gitea"), "fad fa-code");
?> ?>
</div> </div>
<hr class="subtle"> <hr class="subtle">
<?php <?php
printSidebarEntry(l10n_url_abs('/about/'), localize("sidebar.text.about"), "fad fa-user"); printSidebarEntry(l10n_url_abs('/tools/'), localize("sidebar.text.tools"), "fad fa-tools", "tools");
printSidebarEntry(l10n_url_abs('/contact/'), localize("sidebar.text.contact"),"fad fa-mailbox"); ?>
<hr class="subtle">
<?php
printSidebarEntry(l10n_url_abs('/links/'), localize("sidebar.text.links"), "fad fa-link", "links");
?>
<div class="ml-m">
<?php
printSidebarEntry("https://files.nibblepoker.lu/", localize("sidebar.text.downloads"), "fad fa-download", "");
printSidebarEntry("https://git.nibblepoker.lu/", localize("sidebar.text.gitea"), "fad fa-code", "");
?>
</div>
<hr class="subtle">
<?php
printSidebarEntry(l10n_url_abs('/about/'), localize("sidebar.text.about"), "fad fa-user", "about");
printSidebarEntry(l10n_url_abs('/contact/'), localize("sidebar.text.contact"), "fad fa-mailbox", "contact");
?> ?>
</nav> </nav>

View File

@@ -33,7 +33,7 @@ function getMainHeader(string $text, ?string $iconId = null, ?string $rightText
$htmlCode .= $text; $htmlCode .= $text;
if(!is_null($rightText)) { if(!is_null($rightText)) {
$htmlCode .= '<span class="ml-auto ' . ($chungusMode ? "t-size-12 mr-xs" : "t-size-10 t-muted") . '">' . $rightText . '</span>'; $htmlCode .= '<span class="ml-auto mobile-hide ' . ($chungusMode ? "t-size-12 mr-xs" : "t-size-10 t-muted") . '">' . $rightText . '</span>';
} }
$htmlCode .= '</h' . $hLevel . '></div>'; $htmlCode .= '</h' . $hLevel . '></div>';

View File

@@ -907,7 +907,7 @@ class ComposerElement {
case ComposerElementTypes::VIDEO: case ComposerElementTypes::VIDEO:
// Composing the video element // Composing the video element
$htmlCode .= '<video ' . (is_null($this->source) ? '' : 'src="' . $this->source . '" ') . $htmlCode .= '<video ' . (is_null($this->source) ? '' : 'src="' . $this->source . '" ') .
'class="' . $this->get_modifiers_classes() . '" ' . 'class="' . $this->get_modifiers_classes() . ' r-l" ' .
(is_null($this->thumbnail) ? '' : 'poster="' . $this->thumbnail . '" ') . (is_null($this->thumbnail) ? '' : 'poster="' . $this->thumbnail . '" ') .
'controls muted></video>'; 'controls muted></video>';
break; break;

View File

@@ -20,15 +20,50 @@ if(str_starts_with($_SERVER['REQUEST_URI'], "/en/")) {
} elseif(str_starts_with($_SERVER['REQUEST_URI'], "/fr/")) { } elseif(str_starts_with($_SERVER['REQUEST_URI'], "/fr/")) {
$user_language = "fr"; $user_language = "fr";
$user_uri_language = "/".$user_language; $user_uri_language = "/".$user_language;
} elseif(str_starts_with($_SERVER['REQUEST_URI'], "/lb/")) { } elseif(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
$user_language = "lb";
$user_uri_language = "/".$user_language;
} else {
// Attempting to detect the language through the browser's headers. // Attempting to detect the language through the browser's headers.
// TODO: This ! $_client_languages = [];
$user_uri_language = "";
foreach(explode(",", $_SERVER["HTTP_ACCEPT_LANGUAGE"]) as $_client_lang_entry) {
$_client_lang_entry_parts = explode(";", $_client_lang_entry);
// Ignoring "en-US" and similar entries
if(count($_client_lang_entry_parts) != 2) {
continue;
}
// Only allowing supported languages
if(!in_array($_client_lang_entry_parts[0], ["en", "fr"])) {
continue;
}
// Parsing the language's weight
$_client_lang_entry_parts[1] = str_replace("q=", "", $_client_lang_entry_parts[1]);
$_client_lang_entry_weight = filter_var($_client_lang_entry_parts[1], FILTER_VALIDATE_FLOAT);
if($_client_lang_entry_weight === false || !is_float($_client_lang_entry_weight)) {
continue;
}
// Saving it for later
$_client_languages[] = $_client_lang_entry_parts;
}
// Sorting based on weight and selecting the preferred one.
if(count($_client_languages) > 0) {
usort($_client_languages, function(array $a, array $b) {
if($a[1] == $b[1]) {
return 0;
}
return ($a[1] > $b[1]) ? -1 : 1;
});
$user_language = $_client_languages[0][0];
}
} }
// Setting headers
header("Content-Language: " . $user_language);
// Reading and parsing the strings.json file // Reading and parsing the strings.json file
$lang_json = file_get_contents(realpath($dir_commons . "/strings.json")); $lang_json = file_get_contents(realpath($dir_commons . "/strings.json"));
$lang_data = json_decode($lang_json, true); $lang_data = json_decode($lang_json, true);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
{
"contact.head.title": "Contact - NibblePoker",
"contact.head.description": "TODO: description",
"contact.og.title": "NibblePoker - Contact",
"contact.og.description": "TODO: description",
"contact.header.title": "Contact",
"contact.twitter.title": "Twitter",
"contact.twitter.compose": "Compose DM to @NibblePoker on Twitter"
}

View File

@@ -10,7 +10,7 @@
"content.search.count.single": "result", "content.search.count.single": "result",
"content.search.count.multiple": "results", "content.search.count.multiple": "results",
"content.header.base" : "Content", "content.header.base" : "Projects",
"content.search.header" : "Search", "content.search.header" : "Search",
"content.error.header" : "Error", "content.error.header" : "Error",
"_content.item.header" : "", "_content.item.header" : "",
@@ -56,8 +56,8 @@
"content.commons.version.old.single": "Old version", "content.commons.version.old.single": "Old version",
"content.commons.version.old.multiple": "Old versions", "content.commons.version.old.multiple": "Old versions",
"content.commons.version.source": "Source code", "content.commons.version.source": "Source code",
"content.commons.cpu": "CPU <span class=\"hidden-xs-and-down\">Architecture</span>", "content.commons.cpu": "CPU <span class=\"mobile-hide\">Architecture</span>",
"content.commons.cpu.responsive": "CPU <span class=\"hidden-xs-and-down\">Architecture</span>", "content.commons.cpu.responsive": "CPU <span class=\"mobile-hide\">Architecture</span>",
"content.commons.cpu.any": "Any architecture", "content.commons.cpu.any": "Any architecture",
"content.commons.cpu.x64": "x64", "content.commons.cpu.x64": "x64",
"content.commons.cpu.x86": "x86", "content.commons.cpu.x86": "x86",

View File

@@ -0,0 +1,7 @@
{
"links.head.title": "Links - NibblePoker",
"links.head.description": "TODO: description",
"links.og.title": "NibblePoker - Links",
"links.og.description": "TODO: description",
"links.header.title": "Links"
}

View File

@@ -0,0 +1,11 @@
{
"contact.head.title": "Contact - NibblePoker",
"contact.head.description": "TODO: description",
"contact.og.title": "NibblePoker - Contact",
"contact.og.description": "TODO: description",
"contact.header.title": "Contact",
"contact.twitter.title": "Twitter",
"contact.twitter.compose": "Composer un message privé pour @NibblePoker sur Twitter"
}

View File

@@ -10,6 +10,11 @@
"content.search.count.single": "résultat", "content.search.count.single": "résultat",
"content.search.count.multiple": "résultats", "content.search.count.multiple": "résultats",
"content.header.base" : "Projets",
"content.search.header" : "Recherche",
"content.error.header" : "Erreur",
"_content.item.header" : "",
"content.error.head.title": "Erreur de contenu - NibblePoker", "content.error.head.title": "Erreur de contenu - NibblePoker",
"_content.error.head.description": "Done via the '$content_error_message' variable", "_content.error.head.description": "Done via the '$content_error_message' variable",
"content.error.og.title": "NibblePoker - Erreur de contenu", "content.error.og.title": "NibblePoker - Erreur de contenu",

View File

@@ -0,0 +1,7 @@
{
"links.head.title": "Liens - NibblePoker",
"links.head.description": "TODO: description",
"links.og.title": "NibblePoker - Liens",
"links.og.description": "TODO: description",
"links.header.title": "Liens"
}

132
contact/index.bak.php Normal file
View File

@@ -0,0 +1,132 @@
<?php
set_include_path('../commons/');
include_once 'config.php';
include_once 'langs.php';
?>
<!DOCTYPE html>
<html lang="<?php echo($user_language); ?>">
<head>
<?php include 'headers.php'; ?>
<title><?php print(localize('contact.title')); ?> - Nibble Poker</title>
<meta name="description" content="<?php print(localize('contact.description')); ?>">
<meta property="og:title" content="Nibble Poker - <?php print(localize('contact.title')); ?>" />
<meta property="og:type" content="website" />
<meta property="og:url" content="<?php echo($host_uri); ?>/" />
<meta property="og:image" content="<?php echo($host_uri); ?>/resources/Azias/logos/v2_opengraph.png"/>
<meta property="og:image:type" content="image/png"/>
<meta property="og:description" content="<?php print(localize('contact.description')); ?>"/>
</head>
<body class="with-custom-webkit-scrollbars with-custom-css-scrollbars dark-mode" data-dm-shortcut-enabled="true" data-sidebar-shortcut-enabled="true">
<?php include 'body-root.php'; ?>
<div class="page-wrapper with-sidebar with-navbar-fixed-bottom">
<?php $SIDEBAR_ID = 'contact'; include 'sidebar.php'; ?>
<div class="content-wrapper">
<div class="container-fluid">
<div id="page-title-bar" class="card p-0 pl-20 m-0 square-corners bg-very-dark title-bkgd navbar">
<h2 class="content-title font-size-24 mt-20 text-truncate">
<i class="fad fa-mailbox"></i>&nbsp;<?php print(localize("contact.title")); ?>
</h2>
<?php include 'header-lang.php'; ?>
</div>
<div class="content mx-auto w-lg-p90">
<div class="card p-0 mx-0">
<div class="px-card py-10 border-bottom px-20">
<div class="container-fluid">
<div class="row">
<div class="col-4">
<h2 class="card-title font-size-18 m-0"><i class="fad fa-envelope-square"></i>&nbsp;&nbsp;<?php print(localize("contact.email.title")); ?></h2>
</div>
<div class="col-8 text-right font-italic">
<h2 class="card-title font-size-18 m-0 text-super-muted">herwin.bozet@gmail.com</h2>
</div>
</div>
</div>
</div>
<div class="px-card py-20 bg-light-lm bg-very-dark-dm rounded-bottom px-20">
<form action="mailto:herwin.bozet@gmail.com?subject=Website%20contact%20form%20message" target="_top" method="post" class="w-full">
<div class="form-group">
<label for="name"><?php print(localize("contact.email.name")); ?></label>
<input type="text" class="form-control" id="name" placeholder="John Smith">
</div>
<div class="form-group">
<label for="message" class="required"><?php print(localize("contact.email.message")); ?></label>
<textarea class="form-control" id="message" placeholder="Write your message here." required="required"></textarea>
</div>
<input class="btn btn-primary mr-10" type="submit" value="<?php print(localize("generic.button.submit")); ?>">
<input class="btn btn-secondary" type="reset" value="<?php print(localize("generic.button.reset")); ?>">
</form>
</div>
</div>
<div class="card p-0 mx-0">
<div class="px-card py-10 border-bottom px-20">
<div class="container-fluid">
<div class="row">
<div class="col-4">
<h2 class="card-title font-size-18 m-0"><i class="fab fa-twitter"></i>&nbsp;&nbsp;Twitter</h2>
</div>
<div class="col-8 text-right font-italic">
<h2 class="card-title font-size-18 m-0 text-super-muted">@NibblePoker</h2>
</div>
</div>
</div>
</div>
<div class="px-card py-20 bg-light-lm bg-very-dark-dm rounded-bottom pl-20">
<a href="https://twitter.com/messages/compose?recipient_id=937370791334895616">
<button class="btn btn-primary"><?php print(localize("contact.twitter.button")); ?></button>
</a>
</div>
</div>
<div class="card p-0 mx-0">
<div class="px-card py-10 border-bottom px-20">
<div class="container-fluid">
<div class="row">
<div class="col-5 col-lg-12">
<h2 class="card-title font-size-18 m-0">
<i class="fad fa-lock-alt"></i>&nbsp;&nbsp;Tox
</h2>
</div>
</div>
</div>
</div>
<div class="px-card py-10 bg-light-lm bg-very-dark-dm rounded-bottom px-20">
<p class="mb-0 mt-10">
<?php print(localize("contact.tox.main")); ?>
</p>
<p class="text-monospace text-break font-size-12 mt-0 ml-10">
62C1A91A425F90D7B4F047D70CCF31E7402C9EC37B93604B0F37C416442D15044AF6C1AE033B
</p>
<p class="mb-20 text-decoration-none">
<a href="tox:62C1A91A425F90D7B4F047D70CCF31E7402C9EC37B93604B0F37C416442D15044AF6C1AE033B" class="text-decoration-none">
<button class="btn btn-primary"><?php print(localize("contact.tox.button.open")); ?></button>
</a>
<button id="button-copy-tox-id-main" class="btn btn-secondary ml-10">
<?php print(localize("contact.tox.button.copy")); ?>
</button>
</p>
<hr>
<p class="mb-0">
<?php print(localize("contact.tox.secondary")); ?>
</p>
<p class="text-monospace text-break font-size-12 mt-0 ml-10">
01ABBD4515C8FA56231333D1022CEEE0A605F4E85F8A945365F56D196A1BBA10FB4DCE08DBE8
</p>
<p>
<a href="tox:01ABBD4515C8FA56231333D1022CEEE0A605F4E85F8A945365F56D196A1BBA10FB4DCE08DBE8" class="text-decoration-none">
<button class="btn btn-primary"><?php print(localize("contact.tox.button.open")); ?></button>
</a>
<button id="button-copy-tox-id-backup" class="btn btn-secondary ml-10">
<?php print(localize("contact.tox.button.copy")); ?>
</button>
</p>
</div>
</div>
</div>
</div>
</div>
<?php include 'footer.php'; ?>
</div>
<script src="/resources/HalfMoon/1.1.1/js/halfmoon.min.js"></script>
<script src="/resources/Azias/js/nibblepoker.lu.js"></script>
</body>
</html>

View File

@@ -1,132 +1,53 @@
<?php <?php
set_include_path('../commons/'); $start_time = microtime(true);
include_once 'config.php'; set_include_path('../');
include_once 'langs.php'; include_once 'commons/config.php';
include_once 'commons/langs.php';
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?php echo($user_language); ?>"> <html lang="<?php echo($user_language); ?>">
<head> <head>
<?php include 'headers.php'; ?> <?php include 'commons/DOM/head.php'; ?>
<title><?php print(localize('contact.title')); ?> - Nibble Poker</title> <title><?php print(localize('contact.head.title')); ?></title>
<meta name="description" content="<?php print(localize('contact.description')); ?>"> <meta name="description" content="<?php print(localize('contact.head.description')); ?>">
<meta property="og:title" content="Nibble Poker - <?php print(localize('contact.title')); ?>" /> <meta property="og:title" content="<?php print(localize('contact.og.title')); ?>"/>
<meta property="og:type" content="website" /> <meta property="og:type" content="website"/>
<meta property="og:url" content="<?php echo($host_uri); ?>/" /> <meta property="og:url" content="<?php echo($host_uri . l10n_url_abs('/')); ?>"/>
<meta property="og:image" content="<?php echo($host_uri); ?>/resources/Azias/logos/v2_opengraph.png"/> <meta property="og:image" content="<?php echo($host_uri); ?>/resources/NibblePoker/images/logos/v2_opengraph.png"/>
<meta property="og:image:type" content="image/png"/> <meta property="og:image:type" content="image/png"/>
<meta property="og:description" content="<?php print(localize('contact.description')); ?>"/> <meta property="og:description" content="<?php print(localize('contact.og.description')); ?>"/>
</head> </head>
<body class="with-custom-webkit-scrollbars with-custom-css-scrollbars dark-mode" data-dm-shortcut-enabled="true" data-sidebar-shortcut-enabled="true"> <body>
<?php include 'body-root.php'; ?> <?php
<div class="page-wrapper with-sidebar with-navbar-fixed-bottom"> include_once 'commons/DOM/utils.php';
<?php $SIDEBAR_ID = 'contact'; include 'sidebar.php'; ?> $SIDEBAR_IDS = ['contact'];
include 'commons/DOM/sidebar.php';
<div class="content-wrapper"> ?>
<div class="container-fluid"> <header class="w-full p-m pl-s">
<div id="page-title-bar" class="card p-0 pl-20 m-0 square-corners bg-very-dark title-bkgd navbar"> <h1 class="t-size-17 t-w-500">
<h2 class="content-title font-size-24 mt-20 text-truncate"> <i class="fad fa-mailbox t-size-16 mr-s t-muted"></i><?php print(localize("contact.header.title")); ?>
<i class="fad fa-mailbox"></i>&nbsp;<?php print(localize("contact.title")); ?> </h1>
</h2> <?php include 'commons/DOM/header-lang.php'; ?>
<?php include 'header-lang.php'; ?> </header>
</div> <main id="main" class="rl-m border border-r-0 p-l">
<div class="content mx-auto w-lg-p90">
<div class="card p-0 mx-0"> <?php printMainHeader(localize("contact.twitter.title"), "fab fa-twitter", "@NibblePoker"); ?>
<div class="px-card py-10 border-bottom px-20"> <p class="m-s">
<div class="container-fluid"> <a href="https://twitter.com/messages/compose?recipient_id=937370791334895616" class="bland-link button-link">
<div class="row"> <button class="p-xs r-s border b-light primary"><?php print(localize("contact.twitter.compose")); ?></button>
<div class="col-4"> </a>
<h2 class="card-title font-size-18 m-0"><i class="fad fa-envelope-square"></i>&nbsp;&nbsp;<?php print(localize("contact.email.title")); ?></h2> </p>
</div>
<div class="col-8 text-right font-italic"> </main>
<h2 class="card-title font-size-18 m-0 text-super-muted">herwin.bozet@gmail.com</h2> <?php
</div> include 'commons/DOM/footer.php';
</div> include 'commons/DOM/scripts.php';
</div> ?>
</div>
<div class="px-card py-20 bg-light-lm bg-very-dark-dm rounded-bottom px-20">
<form action="mailto:herwin.bozet@gmail.com?subject=Website%20contact%20form%20message" target="_top" method="post" class="w-full">
<div class="form-group">
<label for="name"><?php print(localize("contact.email.name")); ?></label>
<input type="text" class="form-control" id="name" placeholder="John Smith">
</div>
<div class="form-group">
<label for="message" class="required"><?php print(localize("contact.email.message")); ?></label>
<textarea class="form-control" id="message" placeholder="Write your message here." required="required"></textarea>
</div>
<input class="btn btn-primary mr-10" type="submit" value="<?php print(localize("generic.button.submit")); ?>">
<input class="btn btn-secondary" type="reset" value="<?php print(localize("generic.button.reset")); ?>">
</form>
</div>
</div>
<div class="card p-0 mx-0">
<div class="px-card py-10 border-bottom px-20">
<div class="container-fluid">
<div class="row">
<div class="col-4">
<h2 class="card-title font-size-18 m-0"><i class="fab fa-twitter"></i>&nbsp;&nbsp;Twitter</h2>
</div>
<div class="col-8 text-right font-italic">
<h2 class="card-title font-size-18 m-0 text-super-muted">@NibblePoker</h2>
</div>
</div>
</div>
</div>
<div class="px-card py-20 bg-light-lm bg-very-dark-dm rounded-bottom pl-20">
<a href="https://twitter.com/messages/compose?recipient_id=937370791334895616">
<button class="btn btn-primary"><?php print(localize("contact.twitter.button")); ?></button>
</a>
</div>
</div>
<div class="card p-0 mx-0">
<div class="px-card py-10 border-bottom px-20">
<div class="container-fluid">
<div class="row">
<div class="col-5 col-lg-12">
<h2 class="card-title font-size-18 m-0">
<i class="fad fa-lock-alt"></i>&nbsp;&nbsp;Tox
</h2>
</div>
</div>
</div>
</div>
<div class="px-card py-10 bg-light-lm bg-very-dark-dm rounded-bottom px-20">
<p class="mb-0 mt-10">
<?php print(localize("contact.tox.main")); ?>
</p>
<p class="text-monospace text-break font-size-12 mt-0 ml-10">
62C1A91A425F90D7B4F047D70CCF31E7402C9EC37B93604B0F37C416442D15044AF6C1AE033B
</p>
<p class="mb-20 text-decoration-none">
<a href="tox:62C1A91A425F90D7B4F047D70CCF31E7402C9EC37B93604B0F37C416442D15044AF6C1AE033B" class="text-decoration-none">
<button class="btn btn-primary"><?php print(localize("contact.tox.button.open")); ?></button>
</a>
<button id="button-copy-tox-id-main" class="btn btn-secondary ml-10">
<?php print(localize("contact.tox.button.copy")); ?>
</button>
</p>
<hr>
<p class="mb-0">
<?php print(localize("contact.tox.secondary")); ?>
</p>
<p class="text-monospace text-break font-size-12 mt-0 ml-10">
01ABBD4515C8FA56231333D1022CEEE0A605F4E85F8A945365F56D196A1BBA10FB4DCE08DBE8
</p>
<p>
<a href="tox:01ABBD4515C8FA56231333D1022CEEE0A605F4E85F8A945365F56D196A1BBA10FB4DCE08DBE8" class="text-decoration-none">
<button class="btn btn-primary"><?php print(localize("contact.tox.button.open")); ?></button>
</a>
<button id="button-copy-tox-id-backup" class="btn btn-secondary ml-10">
<?php print(localize("contact.tox.button.copy")); ?>
</button>
</p>
</div>
</div>
</div>
</div>
</div>
<?php include 'footer.php'; ?>
</div>
<script src="/resources/HalfMoon/1.1.1/js/halfmoon.min.js"></script>
<script src="/resources/Azias/js/nibblepoker.lu.js"></script>
</body> </body>
</html> </html>
<?php
$end_time = microtime(true);
if($print_execution_timer) {
echo("<!-- PHP execution took " . round(($end_time - $start_time) * 1000, 2) . " ms -->");
}
?>

View File

@@ -65,9 +65,9 @@ if($contentManager->hasError) {
$content_head_og_description = $content->get_head_description(); $content_head_og_description = $content->get_head_description();
} elseif($contentManager->displayType == ContentDisplayType::SEARCH) { } elseif($contentManager->displayType == ContentDisplayType::SEARCH) {
$content_head_title = localize("content.search.head.title"); $content_head_title = localize("content.search.head.title");
$content_head_description = localize("content.search.head.description");; $content_head_description = localize("content.search.head.description");
$content_head_og_title = localize("content.search.og.title");; $content_head_og_title = localize("content.search.og.title");
$content_head_og_description = localize("content.search.og.description");; $content_head_og_description = localize("content.search.og.description");
} }
// TODO: Fix the OG URL tag to add the tags ! // TODO: Fix the OG URL tag to add the tags !
@@ -84,10 +84,8 @@ if($contentManager->hasError) {
<body> <body>
<?php <?php
include_once 'commons/DOM/utils.php'; include_once 'commons/DOM/utils.php';
include 'commons/DOM/body-1.php'; $SIDEBAR_IDS = array_merge(['content'], is_null($contentManager->requestedTags) ? [] : $contentManager->requestedTags);
$SIDEBAR_ID = 'home';
include 'commons/DOM/sidebar.php'; include 'commons/DOM/sidebar.php';
include 'commons/DOM/body-2.php';
?> ?>
<header class="w-full p-m pl-s"> <header class="w-full p-m pl-s">
<h1 class="t-size-17 t-w-500"> <h1 class="t-size-17 t-w-500">
@@ -95,24 +93,29 @@ include 'commons/DOM/body-2.php';
if($contentManager->hasError) { if($contentManager->hasError) {
echo('<i class="fad fa-exclamation-triangle t-size-16 mr-s t-muted"></i>'); echo('<i class="fad fa-exclamation-triangle t-size-16 mr-s t-muted"></i>');
echo(localize("content.header.base")); echo(localize("content.header.base"));
echo('<span class="mobile-hide">');
echo('<span class="mx-s t-size-15">❱</span>'); echo('<span class="mx-s t-size-15">❱</span>');
echo(localize("content.error.header")); echo(localize("content.error.header"));
echo('</span>');
} elseif($contentManager->displayType == ContentDisplayType::SEARCH) { } elseif($contentManager->displayType == ContentDisplayType::SEARCH) {
echo('<i class="fad fa-briefcase t-size-16 mr-s t-muted"></i>'); echo('<i class="fad fa-briefcase t-size-16 mr-s t-muted"></i>');
echo(localize("content.header.base")); echo(localize("content.header.base"));
echo('<span class="mobile-hide">');
echo('<span class="mx-s t-size-15">❱</span>'); echo('<span class="mx-s t-size-15">❱</span>');
echo(localize("content.search.header")); echo(localize("content.search.header"));
echo('</span>');
} elseif($contentManager->displayType == ContentDisplayType::CONTENT) { } elseif($contentManager->displayType == ContentDisplayType::CONTENT) {
echo('<i class="fad fa-briefcase t-size-16 mr-s t-muted"></i>'); echo('<i class="fad fa-briefcase t-size-16 mr-s t-muted"></i>');
echo(localize("content.header.base")); echo(localize("content.header.base"));
echo('<span class="mobile-hide">');
echo('<span class="mx-s t-size-15">❱</span>'); echo('<span class="mx-s t-size-15">❱</span>');
echo('<span class="t-size-16">' . $content->get_head_title() . '</span>'); echo('<span class="t-size-16">' . $content->get_head_title() . '</span>');
echo('</span>');
} }
?> ?>
</h1> </h1>
<?php //include 'header-lang.php'; ?> <?php include 'commons/DOM/header-lang.php'; ?>
</header> </header>
<?php include 'commons/DOM/body-3.php'; ?>
<main id="main" class="rl-m border border-r-0 p-l"> <main id="main" class="rl-m border border-r-0 p-l">
<?php <?php
// Checking if an error occurred. // Checking if an error occurred.
@@ -187,9 +190,7 @@ include 'commons/DOM/body-2.php';
?> ?>
</main> </main>
<?php <?php
include 'commons/DOM/body-4.php';
include 'commons/DOM/footer.php'; include 'commons/DOM/footer.php';
include 'commons/DOM/body-5.php';
include 'commons/DOM/scripts.php'; include 'commons/DOM/scripts.php';
?> ?>
</body> </body>

View File

@@ -0,0 +1,158 @@
{
"strings": {
"en": {
"meta.title": "CircuitPython - Custom File Systems",
"meta.description": "A set of examples of custom file systems and block-level devices for CircuitPython that can be used for educational purposes and expanded upon.",
"article.subtitle": "<a href=\"https://github.com/aziascreations/CircuitPython-CustomFileSystems\"><i class=\"fab fa-github\"></i> View on GitHub</a>",
"intro.title": "Introduction",
"intro.p1": "This project contains a set of examples of custom file systems and block-level devices for CircuitPython that can be used for educational purposes and expanded upon.",
"intro.p2": "All these examples are thoroughly documented in order to allow you to understand how each method of a virtual FS/BLD works, and also to show you some of the undocumented methods for these.",
"requirements.title": "Requirements",
"requirements.1": "A MCU with CircuitPython 8.0 or newer",
"requirements.1.1": "Access to the <a href=\"https://docs.circuitpython.org/en/latest/shared-bindings/zlib/index.html\">zlib</a>&nbsp;&nbsp;(Required for most block-level devices)",
"requirements.1.2": "Wi-Fi connectivity is required for some examples",
"requirements.1.3": "Around 1MiB of disk space and 48 KiB of RAM free on the MCU",
"requirements.2": "A way to mount disk images on you computer for block-level projects",
"requirements.2.1": "<a href=\"https://sourceforge.net/projects/imdisk-toolkit/\">ImDisk's Ram Disk tool</a> is recommended for Windows.",
"requirements.2.2": "I don't know about Linux, sorry.",
"requirements.3": "A lot of patience to deal with some of CircuitPython's quirks",
"fs.title": "File Systems",
"fs.blank.title": "Blank",
"fs.blank.p1": "Blank file system with a lot of comments on how each procedure works and what it should return.<br>When its content is listed, it is shown as being empty.",
"fs.blank.p2": "This file system has a LOT more comments than the others which explains in much more details how each important method works.",
"fs.rom.title": "Read-Only Memory",
"bld.title": "Block-level Devices",
"bld.stub.title": "Stub",
"bld.stub.p1": "Stub of a generic block-level class without any code, but detailed comments for each required methods and their warnings and notes.",
"bld.stub.p2": "The reasoning behind not making this one a working class is that block-level devices require quite a bit more code to make them work as you need to create a working MBR and FAT partition.",
"bld.remote.title": "Remote",
"warning.title": "Warning",
"warning.p1": "Due to the way some commands are executed, it is possible to have a <a href=\"https://owasp.org/www-community/attacks/Command_Injection\">command injection vulnerability</a> if you mess up or leave the config file editable by everyone.",
"warning.p2": "This might be fixed in the future, but don't count on it as this project is a personal one.",
"features.title": "Features",
"features.list.1.1": "● General",
"links.title": "Links",
"_123": "https://files.nibblepoker.lu/downloads/CircuitPython-CustomFileSystems/CircuitPython-CustomFileSystems-master.zip"
},
"fr": {
"meta.title": "CircuitPython - Systèmes de fichiers personalisés",
"meta.description": "Un set de systèmes de fichiers et stockage en blocs personnalisés pour CircuitPython qui peuvent être utilisés afin d'apprendre leur fonctionnement ou améliorés et implémentés dans d'autres solutions.",
"article.subtitle": "<a href=\"https://github.com/aziascreations/CircuitPython-CustomFileSystems\"><i class=\"fab fa-github\"></i> Voir sur GitHub</a>",
"intro.title": "Introduction",
"intro.p1": "Ce projet contient un set de systèmes de fichiers et stockage en blocs personnalisés pour CircuitPython qui peuvent être utilisés afin d'apprendre leur fonctionnement ou améliorés et implémentés dans d'autres solutions.",
"intro.p2": "Tous ces exemples sont soigneusement documentés afin de vous permettre de comprendre le fonctionnement de chaque méthode d'un système de fichiers virtuel ou d'un stockage en blocs<br>Et en plus de cela, ils vous montreront certaines des méthodes non documentées.",
"requirements.title": "Dépendances",
"requirements.1": "Un MCU avec CircuitPython 8.0 ou une version plus récente",
"requirements.1.1": "Access to the <a href=\"https://docs.circuitpython.org/en/latest/shared-bindings/zlib/index.html\">zlib</a>&nbsp;&nbsp;(Required for most block-level devices)",
"requirements.1.2": "Wi-Fi connectivity is required for some examples",
"requirements.1.3": "Around 1MiB of disk space and 48 KiB of RAM free on the MCU",
"requirements.2": "A way to mount disk images on you computer for block-level projects",
"requirements.2.1": "<a href=\"https://sourceforge.net/projects/imdisk-toolkit/\">ImDisk's Ram Disk tool</a> is recommended for Windows.",
"requirements.2.2": "I don't know about Linux, sorry.",
"requirements.3": "A lot of patience to deal with some of CircuitPython's quirks",
"warning.title": "Avertissements",
"warning.p1": "Due au fait que certaines commandes sont exécutées avec des paramètres arbitraires configurables cette application est vulnérable aux attaques par <a href=\"https://owasp.org/www-community/attacks/Command_Injection\">injection de commande</a> si le fichier de configuration est modifiable par des personnes non autorisées.",
"warning.p2": "Ce problème sera probablement réglé dans le futur, mais il n'y a pas de date fixe comme ce projet est plus personnel qu'autre-chose.",
"features.title": "Fonctionnalités",
"links.title": "Liens"
}
},
"metadata": {
"template": "generic-project-readme",
"head": {
"title": "meta.title",
"description": "meta.description"
},
"opengraph": {
"title": "meta.title",
"description": "meta.description",
"type": null,
"url": null,
"image": null,
"image_type": null
},
"article": {
"icon": "fab fa-python",
"title": "meta.title",
"subtitle": "article.subtitle",
"tags": ["electronic", "python", "circuitpython"]
}
},
"elements": [
{"type": "h1", "content": "intro.title"},
{"type": "paragraph", "indent": 2, "content": "intro.p1"},
{"type": "paragraph", "indent": 2, "content": "intro.p2"},
{"type": "h1", "content": "requirements.title"},
{
"type": "paragraph", "indent": 2,
"parts": [
{"type": "raw", "content": "●&nbsp;&nbsp;", "localize": false},
{"type": "raw", "content": "requirements.1"},
{"type": "raw", "content": "<br>", "localize": false},
{"type": "raw", "content": "&nbsp;&nbsp;&nbsp;∘&nbsp;&nbsp;", "localize": false},
{"type": "raw", "content": "requirements.1.1"},
{"type": "raw", "content": "<br>", "localize": false},
{"type": "raw", "content": "&nbsp;&nbsp;&nbsp;∘&nbsp;&nbsp;", "localize": false},
{"type": "raw", "content": "requirements.1.2"},
{"type": "raw", "content": "<br>", "localize": false},
{"type": "raw", "content": "&nbsp;&nbsp;&nbsp;∘&nbsp;&nbsp;", "localize": false},
{"type": "raw", "content": "requirements.1.3"}
]
},
{
"type": "paragraph", "indent": 2,
"parts": [
{"type": "raw", "content": "●&nbsp;&nbsp;", "localize": false},
{"type": "raw", "content": "requirements.2"},
{"type": "raw", "content": "<br>", "localize": false},
{"type": "raw", "content": "&nbsp;&nbsp;&nbsp;∘&nbsp;&nbsp;", "localize": false},
{"type": "raw", "content": "requirements.2.1"},
{"type": "raw", "content": "<br>", "localize": false},
{"type": "raw", "content": "&nbsp;&nbsp;&nbsp;∘&nbsp;&nbsp;", "localize": false},
{"type": "raw", "content": "requirements.2.2"}
]
},
{
"type": "paragraph", "indent": 2,
"parts": [
{"type": "raw", "content": "●&nbsp;&nbsp;", "localize": false},
{"type": "raw", "content": "requirements.3"}
]
},
{"type": "h1", "content": "fs.title"},
{"type": "paragraph", "indent": 2, "content": "fs.p1"},
{"type": "image", "src": "fuck"},
{"type": "h1", "content": "fs.blank.title"},
{"type": "paragraph", "indent": 2, "content": "fs.blank.p1"},
{"type": "paragraph", "indent": 2, "content": "fs.blank.p2"},
{"type": "h1", "content": "fs.rom.title"},
{"type": "paragraph", "indent": 2, "content": "intro.p2"},
{"type": "h1", "content": "bld.title"},
{"type": "paragraph", "indent": 2, "content": "bld.p1"},
{"type": "image", "src": "fuck"},
{"type": "h1", "content": "bld.stub.title"},
{"type": "paragraph", "indent": 2, "content": "bld.stub.p1"},
{"type": "paragraph", "indent": 2, "content": "bld.stub.p2"},
{"type": "h1", "content": "bld.remote.title"},
{"type": "paragraph", "indent": 2, "content": "intro.p2"}
]
}

109
error.php
View File

@@ -10,63 +10,58 @@ if(isset($_SERVER['REDIRECT_STATUS'])) {
$np_err_code = $_SERVER['REDIRECT_STATUS']; $np_err_code = $_SERVER['REDIRECT_STATUS'];
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?php echo($user_language); ?>"> <html lang="<?php echo($user_language); ?>">
<head> <head>
<?php include 'commons/DOM/head.php'; ?> <?php include 'commons/DOM/head.php'; ?>
<title><?php print(localize('error.'.$np_err_code.'.head.title')); ?></title> <title><?php print(localize('error.'.$np_err_code.'.head.title')); ?></title>
<meta name="description" content="<?php print(localize('error.'.$np_err_code.'.head.description')); ?>"> <meta name="description" content="<?php print(localize('error.'.$np_err_code.'.head.description')); ?>">
<meta property="og:title" content="<?php print(localize('error.'.$np_err_code.'.og.title')); ?>"/> <meta property="og:title" content="<?php print(localize('error.'.$np_err_code.'.og.title')); ?>"/>
<meta property="og:type" content="website"/> <meta property="og:type" content="website"/>
<meta property="og:url" content="<?php echo($host_uri . l10n_url_abs('/')); ?>"/> <meta property="og:url" content="<?php echo($host_uri . l10n_url_abs('/')); ?>"/>
<meta property="og:image" content="<?php echo($host_uri); ?>/resources/NibblePoker/images/logos/v2_opengraph.png"/> <meta property="og:image" content="<?php echo($host_uri); ?>/resources/NibblePoker/images/logos/v2_opengraph.png"/>
<meta property="og:image:type" content="image/png"/> <meta property="og:image:type" content="image/png"/>
<meta property="og:description" content="<?php print(localize('error.'.$np_err_code.'.og.description')); ?>"/> <meta property="og:description" content="<?php print(localize('error.'.$np_err_code.'.og.description')); ?>"/>
</head> </head>
<body> <body>
<?php <?php
include_once 'commons/DOM/utils.php'; include_once 'commons/DOM/utils.php';
include 'commons/DOM/body-1.php'; $SIDEBAR_IDS = [];
$SIDEBAR_ID = 'error'; include 'commons/DOM/sidebar.php';
include 'commons/DOM/sidebar.php'; ?>
include 'commons/DOM/body-2.php'; <header class="w-full p-m pl-s">
?> <h1 class="t-size-17 t-w-500">
<header class="w-full p-m pl-s"> <i class="fad fa-exclamation-triangle t-size-16 mr-s t-muted"></i><?php print(localize("error.".$np_err_code.".header.title")); ?>
<h1 class="t-size-17 t-w-500"> </h1>
<i class="fad fa-exclamation-triangle t-size-16 mr-s t-muted"></i><?php print(localize("error.".$np_err_code.".header.title")); ?> <?php include 'commons/DOM/header-lang.php'; ?>
</h1> </header>
<?php //include "header-lang.php'; ?> <main id="main" class="rl-m border border-r-0 p-l">
</header>
<?php include 'commons/DOM/body-3.php'; ?> <?php printMainHeader(localize("home.intro.title")); ?>
<main id="main" class="rl-m border border-r-0 p-l"> <p class="mt-xs ml-s"><?php print(localize("home.intro.text.1")); ?></p>
<p class="mt-xs ml-s"><?php print(localize("home.intro.text.2")); ?></p>
<?php printMainHeader(localize("home.intro.title")); ?>
<p class="mt-xs ml-s"><?php print(localize("home.intro.text.1")); ?></p> <?php
<p class="mt-xs ml-s"><?php print(localize("home.intro.text.2")); ?></p> $np_err_img = "";
$np_err_img_alt = "";
<?php switch($np_err_code) {
$np_err_img = ""; case 403:
$np_err_img_alt = ""; case 404:
switch($np_err_code) { case 500:
case 403: default:
case 404: $np_err_img = "/resources/NibblePoker/images/drawings/computer_v1_dead_strong.png";
case 500: $np_err_img_alt = localize("error.skit.pc.dead");
default: break;
$np_err_img = "/resources/NibblePoker/images/drawings/computer_v1_dead_strong.png"; }
$np_err_img_alt = localize("error.skit.pc.dead"); echo('<img id="error-page-skit" src="' . $np_err_img . '" alt="' . $np_err_img_alt . '" draggable="false">');
break; ?>
} </main>
echo('<img id="error-page-skit" src="' . $np_err_img . '" alt="' . $np_err_img_alt . '" draggable="false">'); <?php
?> include 'commons/DOM/footer.php';
</main> include 'commons/DOM/scripts.php';
<?php ?>
include 'commons/DOM/body-4.php'; </body>
include 'commons/DOM/footer.php'; </html>
include 'commons/DOM/body-5.php';
include 'commons/DOM/scripts.php';
?>
</body>
</html>
<?php <?php
$end_time = microtime(true); $end_time = microtime(true);
if($print_execution_timer) { if($print_execution_timer) {

View File

@@ -20,18 +20,15 @@ include_once 'commons/langs.php';
<body> <body>
<?php <?php
include_once 'commons/DOM/utils.php'; include_once 'commons/DOM/utils.php';
include 'commons/DOM/body-1.php'; $SIDEBAR_IDS = ['home'];
$SIDEBAR_ID = 'home';
include 'commons/DOM/sidebar.php'; include 'commons/DOM/sidebar.php';
include 'commons/DOM/body-2.php';
?> ?>
<header class="w-full p-m pl-s"> <header class="w-full p-m pl-s">
<h1 class="t-size-17 t-w-500"> <h1 class="t-size-17 t-w-500">
<i class="fad fa-home t-size-16 mr-s t-muted"></i><?php print(localize("home.header.title")); ?> <i class="fad fa-home t-size-16 mr-s t-muted"></i><?php print(localize("home.header.title")); ?>
</h1> </h1>
<?php //include 'header-lang.php'; ?> <?php include 'commons/DOM/header-lang.php'; ?>
</header> </header>
<?php include 'commons/DOM/body-3.php'; ?>
<main id="main" class="rl-m border border-r-0 p-l"> <main id="main" class="rl-m border border-r-0 p-l">
<?php printMainHeader(localize("home.intro.title")); ?> <?php printMainHeader(localize("home.intro.title")); ?>
@@ -79,9 +76,7 @@ include 'commons/DOM/body-2.php';
</main> </main>
<?php <?php
include 'commons/DOM/body-4.php';
include 'commons/DOM/footer.php'; include 'commons/DOM/footer.php';
include 'commons/DOM/body-5.php';
include 'commons/DOM/scripts.php'; include 'commons/DOM/scripts.php';
?> ?>
</body> </body>

View File

@@ -1,120 +1,48 @@
<?php <?php
set_include_path('../commons/'); $start_time = microtime(true);
include_once 'config.php'; set_include_path('../');
include_once 'langs.php'; include_once 'commons/config.php';
include_once 'commons/langs.php';
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?php echo($user_language); ?>"> <html lang="<?php echo($user_language); ?>">
<head> <head>
<?php include 'headers.php'; ?> <?php include 'commons/DOM/head.php'; ?>
<title>Links - Nibble Poker</title> <title><?php print(localize('links.head.title')); ?></title>
<meta name="description" content="A collection of links to all the other locations we are active on."> <meta name="description" content="<?php print(localize('links.head.description')); ?>">
<meta property="og:title" content="Nibble Poker - Links" /> <meta property="og:title" content="<?php print(localize('links.og.title')); ?>"/>
<meta property="og:type" content="website" /> <meta property="og:type" content="website"/>
<meta property="og:url" content="<?php echo($host_uri); ?>/" /> <meta property="og:url" content="<?php echo($host_uri . l10n_url_abs('/')); ?>"/>
<meta property="og:image" content="<?php echo($host_uri); ?>/resources/Azias/logos/v2_opengraph.png"/> <meta property="og:image" content="<?php echo($host_uri); ?>/resources/NibblePoker/images/logos/v2_opengraph.png"/>
<meta property="og:image:type" content="image/png"/> <meta property="og:image:type" content="image/png"/>
<meta property="og:description" content="A collection of links to all the other locations we are active on."/> <meta property="og:description" content="<?php print(localize('links.og.description')); ?>"/>
</head> </head>
<body class="with-custom-webkit-scrollbars with-custom-css-scrollbars dark-mode" data-dm-shortcut-enabled="true" data-sidebar-shortcut-enabled="true"> <body>
<?php include 'body-root.php'; ?> <?php
<div class="page-wrapper with-sidebar with-navbar-fixed-bottom"> include_once 'commons/DOM/utils.php';
<?php $SIDEBAR_ID = 'links'; include 'sidebar.php'; ?> $SIDEBAR_IDS = ['links'];
<div class="content-wrapper"> include 'commons/DOM/sidebar.php';
<div class="container-fluid"> ?>
<div id="page-title-bar" class="card p-0 pl-20 m-0 square-corners bg-very-dark title-bkgd navbar"> <header class="w-full p-m pl-s">
<h2 class="content-title font-size-24 mt-20 text-truncate"> <h1 class="t-size-17 t-w-500">
<i class="fad fa-link"></i>&nbsp;<?php print(localize("links.title")); ?> <i class="fad fa-link t-size-16 mr-s t-muted"></i><?php print(localize("links.header.title")); ?>
</h2> </h1>
<?php include 'header-lang.php'; ?> <?php include 'commons/DOM/header-lang.php'; ?>
</div> </header>
<div class="content mx-auto w-lg-p90"> <main id="main" class="rl-m border border-r-0 p-l">
<div class="card p-0 mx-0">
<div class="px-card py-10 border-bottom px-20"> <!-- TODO -->
<div class="container-fluid">
<div class="row"> </main>
<div class="col-5 col-lg-12"> <?php
<h2 class="card-title font-size-18 m-0"> include 'commons/DOM/footer.php';
<i class="fab fa-github"></i>&nbsp;&nbsp;GitHub include 'commons/DOM/scripts.php';
</h2> ?>
</div>
<div class="col-7 hidden-lg-and-up text-right font-italic">
<h2 class="card-title font-size-18 m-0 text-super-muted">aziascreations</h2>
</div>
</div>
</div>
</div>
<!--<div class="content mx-15 my-15"><p>[Contains the most recent repositories and blablabla...]</p>
</div>-->
<div class="px-card py-10 bg-light-lm bg-very-dark-dm rounded-bottom px-20">
<p class="font-size-12 m-0">
<i class="fad fa-globe"></i> https://github.com/aziascreations
<a class="ml-20" href="https://github.com/aziascreations">
<span class="badge badge-primary">
<?php print(localize('links.visit.button')); ?>
</span>
</a>
</p>
</div>
</div>
<div class="card p-0 mx-0">
<div class="px-card py-10 border-bottom px-20">
<div class="container-fluid">
<div class="row">
<div class="col-5 col-lg-12">
<h2 class="card-title font-size-18 m-0">
<i class="fab fa-twitter"></i>&nbsp;&nbsp;Twitter
</h2>
</div>
<div class="col-7 hidden-lg-and-up text-right font-italic">
<h2 class="card-title font-size-18 m-0 text-super-muted">@nibblepoker</h2>
</div>
</div>
</div>
</div>
<div class="px-card py-10 bg-light-lm bg-very-dark-dm rounded-bottom px-20">
<p class="font-size-12 m-0">
<i class="fad fa-globe"></i> https://twitter.com/NibblePoker
<a class="ml-20" href="https://twitter.com/NibblePoker">
<span class="badge badge-primary">
<?php print(localize('links.visit.button')); ?>
</span>
</a>
</p>
</div>
</div>
<div class="card p-0 mx-0">
<div class="px-card py-10 border-bottom px-20">
<div class="container-fluid">
<div class="row">
<div class="col-5 col-lg-12">
<h2 class="card-title font-size-18 m-0">
<i class="fab fa-linkedin"></i>&nbsp;&nbsp;LinkedIn
</h2>
</div>
<div class="col-7 hidden-lg-and-up text-right font-italic">
<h2 class="card-title font-size-18 m-0 text-super-muted">NibblePoker</h2>
</div>
</div>
</div>
</div>
<div class="px-card py-10 bg-light-lm bg-very-dark-dm rounded-bottom px-20">
<p class="font-size-12 m-0">
<i class="fad fa-globe"></i> https://www.linkedin.com/in/herwin-bozet-60aa6310b/
<a class="ml-20" href="https://www.linkedin.com/in/herwin-bozet-60aa6310b/">
<span class="badge badge-primary">
<?php print(localize('links.visit.button')); ?>
</span>
</a>
</p>
</div>
</div>
</div>
</div>
</div>
<?php include 'footer.php'; ?>
</div>
<script src="/resources/HalfMoon/1.1.1/js/halfmoon.min.js"></script>
<script src="/resources/Azias/js/nibblepoker.lu.js"></script>
</body> </body>
</html> </html>
<?php
$end_time = microtime(true);
if($print_execution_timer) {
echo("<!-- PHP execution took " . round(($end_time - $start_time) * 1000, 2) . " ms -->");
}
?>

View File

@@ -20,18 +20,15 @@ include_once 'commons/langs.php';
<body> <body>
<?php <?php
include_once 'commons/DOM/utils.php'; include_once 'commons/DOM/utils.php';
include 'commons/DOM/body-1.php'; $SIDEBAR_IDS = [];
$SIDEBAR_ID = 'privacy';
include 'commons/DOM/sidebar.php'; include 'commons/DOM/sidebar.php';
include 'commons/DOM/body-2.php';
?> ?>
<header class="w-full p-m pl-s"> <header class="w-full p-m pl-s">
<h1 class="t-size-17 t-w-500"> <h1 class="t-size-17 t-w-500">
<i class="fad fa-user-secret t-size-16 mr-s t-muted"></i><?php print(localize("privacy.header.title")); ?> <i class="fad fa-user-secret t-size-16 mr-s t-muted"></i><?php print(localize("privacy.header.title")); ?>
</h1> </h1>
<?php //include 'header-lang.php'; ?> <?php include 'commons/DOM/header-lang.php'; ?>
</header> </header>
<?php include 'commons/DOM/body-3.php'; ?>
<main id="main" class="rl-m border border-r-0 p-l"> <main id="main" class="rl-m border border-r-0 p-l">
<?php printMainHeader(localize("privacy.introduction.title"), "fad fa-info"); ?> <?php printMainHeader(localize("privacy.introduction.title"), "fad fa-info"); ?>
@@ -207,9 +204,7 @@ include 'commons/DOM/body-2.php';
</main> </main>
<?php <?php
include 'commons/DOM/body-4.php';
include 'commons/DOM/footer.php'; include 'commons/DOM/footer.php';
include 'commons/DOM/body-5.php';
include 'commons/DOM/scripts.php'; include 'commons/DOM/scripts.php';
?> ?>
</body> </body>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -45,11 +45,14 @@ window.addEventListener('load', function(){
} }
eChildElement.onclick = function() { eChildElement.onclick = function() {
let imageElement = document.getElementById("modal-img"); let eModalImage = document.createElement("img")
imageElement.src = eChildElement.src; eModalImage.classList.add("modal-inner-image");
imageElement.alt = eChildElement.alt; eModalImage.classList.add("r-xl");
halfmoon.toggleModal('modal-content-image-viewer'); eModalImage.src = eChildElement.src;
console.log("Opening image..."); eModalImage.alt = eChildElement.alt;
//halfmoon.toggleModal('modal-content-image-viewer');
//console.log("Opening image...");
showContentModal(eModalImage);
}; };
// Saving the element for later. // Saving the element for later.

View File

@@ -1,19 +1,81 @@
const animationStepCount = 10;
function getBezierBlend(progress) {
return (3 * progress ** 2) - (2 * progress ** 3);
}
function fadeOut(element, time = 200) {
element.style.opacity = "1.0";
element.hidden = false;
return new Promise((resolve) => {
const delay = time / animationStepCount;
let i = 0;
const intervalId = setInterval(() => {
element.style.opacity = String(1 - getBezierBlend(i / animationStepCount));
i++;
if(i === animationStepCount) {
element.style.opacity = "0.0";
element.hidden = true;
clearInterval(intervalId);
resolve();
}
}, delay);
});
}
function fadeIn(element, time = 200) {
element.style.opacity = "0.0";
element.hidden = false;
return new Promise((resolve) => {
const delay = time / animationStepCount;
let i = 0;
const intervalId = setInterval(() => {
element.style.opacity = String(getBezierBlend(i / animationStepCount));
i++;
if(i === animationStepCount) {
element.style.opacity = "1.0";
clearInterval(intervalId);
resolve();
}
}, delay);
});
}
let isSidebarVisible = true; let isSidebarVisible = true;
let eContentModal = document.getElementById("modal-content");
let eContentModalInner = document.getElementById("modal-content-inner");
function showContentModal(eContent) {
eContentModalInner.appendChild(eContent);
fadeIn(eContentModal, 175).then(r => {
// We don't care about what happens afterward...
});
}
document.addEventListener("DOMContentLoaded", () => { document.addEventListener("DOMContentLoaded", () => {
const eSidebar = document.getElementById("sidebar"); const eSidebar = document.getElementById("sidebar");
const eMain = document.getElementById("main"); const eMain = document.getElementById("main");
document.getElementById("sidebar-toggle-footer").onclick = function () { document.getElementById("sidebar-toggle-footer").onclick = function() {
if(isSidebarVisible) { if(isSidebarVisible) {
eSidebar.classList.add("retracted"); eSidebar.classList.add("retracted");
eMain.classList.add("expanded"); eMain.classList.add("expanded");
} else { } else {
eSidebar.classList.remove("retracted"); eSidebar.classList.remove("retracted");
eMain.classList.remove("expanded"); eMain.classList.remove("expanded");
} }
isSidebarVisible = !isSidebarVisible; isSidebarVisible = !isSidebarVisible;
}; };
//showContentModal(eContentModal);
[eContentModal, document.getElementById("modal-content-cross"), eContentModalInner].forEach(value => {
value.onclick = function() {
fadeOut(eContentModal, 175).then(r => {
eContentModalInner.innerHTML = "";
});
}
})
// TODO: Autodetect mobile screens, close it, and add classes to make it over the rest with dark modal bkgd. // TODO: Autodetect mobile screens, close it, and add classes to make it over the rest with dark modal bkgd.
}); });

View File

@@ -2,3 +2,5 @@
// Add the "w-000px"/"h-000x" classes. // Add the "w-000px"/"h-000x" classes.
$undefined-add-px-sizing: false; $undefined-add-px-sizing: false;
$nibblepoker-background-root: "/resources/NibblePoker/images/backgrounds";

View File

@@ -13,6 +13,7 @@
@include global-rounding-maker("s", calc(#{$border-base-radius} * 0.75)); @include global-rounding-maker("s", calc(#{$border-base-radius} * 0.75));
@include global-rounding-maker("m", #{$border-base-radius}); @include global-rounding-maker("m", #{$border-base-radius});
@include global-rounding-maker("l", calc(#{$border-base-radius} * 1.5)); @include global-rounding-maker("l", calc(#{$border-base-radius} * 1.5));
@include global-rounding-maker("xl", calc(#{$border-base-radius} * 2.0));
/* Utilities > Rounding > Global > Fixed Sizes */ /* Utilities > Rounding > Global > Fixed Sizes */
@include global-rounding-maker("0", 0); @include global-rounding-maker("0", 0);

View File

@@ -40,9 +40,12 @@
/* Utilities > Spacing > Global > Manual Extras */ /* Utilities > Spacing > Global > Manual Extras */
.p-mxs {
padding: calc(#{$margin-base-size} * 0.375);
}
.p-xxs { .p-xxs {
padding: calc(#{$margin-base-size} * 0.25); padding: calc(#{$margin-base-size} * 0.25);
} }
.p-mxs {
padding: calc(#{$margin-base-size} * 0.375);
}
.p-ms {
padding: calc(#{$margin-base-size} * 0.625);
}

View File

@@ -3,6 +3,8 @@
// Massive thanks to "fontsquirrel.com" for allowing me to properly subset and compress the font <3 // Massive thanks to "fontsquirrel.com" for allowing me to properly subset and compress the font <3
/* External > Quantum */
@font-face { @font-face {
font-family: 'Quantum'; font-family: 'Quantum';
src: url('/resources/Quantum/Quantum.min.woff2') format('woff2'), src: url('/resources/Quantum/Quantum.min.woff2') format('woff2'),

View File

@@ -13,6 +13,7 @@
/* Externals */ /* Externals */
@import 'external/reset'; @import 'external/reset';
@import 'external/quantum';
/* Variables */ /* Variables */
@import 'variables'; @import 'variables';
@@ -36,21 +37,26 @@
@import 'core/spacing/axis'; @import 'core/spacing/axis';
@import 'core/spacing/sided'; @import 'core/spacing/sided';
/* Site > Fonts */ /* Site */
@import 'external/quantum'; @import 'site/base'; // Has manual disabling of some core stuff in specific situations and a shit-tier fix for tables & border on mobile.
@import 'site/text'; // Has some hardcoded width for font-awesome icons in sidebar and headings
/* Site > HTML Elements */ /* Site > Elements */
@import 'site/commons';
@import 'site/body';
@import 'site/layout'; // Has manual disabling of some core stuff in specific situations and a shit-tier fix for tables.
@import 'site/hr'; @import 'site/hr';
@import 'site/scrollbar'; @import 'site/scrollbar';
@import 'site/input'; // Has ugly fix for download buttons
@import 'site/table'; // Uses copied paddings for cells & ugly rounding fix
/* Site > Misc */
@import 'site/backgrounds';
/* Site > Fixes */
@import 'site/mobile'; // Has !important overrides for obvious reasons
/* Site > Unsorted */
@import 'site/image'; @import 'site/image';
@import 'site/wedge'; @import 'site/wedge';
@import 'site/input';
@import 'site/text'; // Has hardcoded with for font-awesome icons in sidebar
@import 'site/backgrounds';
@import 'site/table'; // Uses copied paddings for cells & ugly rounding fix
@import 'site/code'; // Uses copied borders, roundings and paddings @import 'site/code'; // Uses copied borders, roundings and paddings
@import 'site/content'; // Uses fixed sizes and floats @import 'site/content'; // Uses fixed sizes and floats
@import 'site/video'; @import 'site/video';
@import 'site/modal';

View File

@@ -1,17 +1,27 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin // NibblePoker.lu CSS - (C) 2023 Bozet Herwin
/* Site > Misc > Backgrounds */
.bkgd-blank { .bkgd-blank {
background: #{$color-background-main-headings}; background: #{$color-background-main-headings};
} }
.bkgd-surround {
background: #{$color-background-surround};
}
.bkgd-blank-dark {
background: mix($color-background-main, $color-background-surround, 50%);
}
.bkgd-grid { .bkgd-grid {
background: #{$color-background-main-headings} url("/resources/NibblePoker/images/backgrounds/3px-tile-0.4.png") repeat scroll center center; background: #{$color-background-main-headings} url("#{$nibblepoker-background-root}/3px-tile-0.4.png") repeat scroll center center;
} }
.bkgd-squares { .bkgd-squares {
background: #{$color-background-main-headings} url("/resources/NibblePoker/images/backgrounds/bright-squares-p100-0.125.png") repeat scroll center center; background: #{$color-background-main-headings} url("#{$nibblepoker-background-root}/bright-squares-p100-0.125.png") repeat scroll center center;
} }
.bkgd-math { .bkgd-math {
background: #{$color-background-main-headings} url("/resources/NibblePoker/images/backgrounds/old-mathematics-v2-0.25.png") repeat scroll center center; background: #{$color-background-main-headings} url("#{$nibblepoker-background-root}/old-mathematics-v2-0.25.png") repeat scroll center center;
} }

View File

@@ -0,0 +1,155 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin
/* Site > Base */
/* Site > Base > Layout */
/* Site > Base > Layout > Root */
html, body {
min-width: 100vw;
min-height: 100vh;
width: 100vw !important;
height: 100vh !important;
max-width: 100vw;
max-height: 100vh;
}
/* Site > Base > Layout > Main Grid */
body {
display: grid;
grid-template-columns: min-content 1fr;
grid-template-rows: min-content 1fr min-content;
gap: 0;
& > nav {
grid-column: 1;
grid-row: 1 / span 2;
overflow-x: hidden;
overflow-y: auto;
z-index: #{$z-index-sidebar};
}
& > header {
grid-column: 2;
grid-row: 1;
// Inner content
display: grid;
grid-template-columns: 1fr min-content;
grid-template-rows: min-content;
& > h1 {
grid-column: 1;
}
& > #lang-selector {
grid-column: 2;
}
}
& > main {
grid-column: 2;
grid-row: 2;
overflow-x: hidden;
overflow-y: auto;
position: relative; // Helps with some absolute alignments inside it
}
& > footer {
grid-column: 1 / span 2;
grid-row: 3;
}
}
/* Site > Base > Layout > Mobile Fixes */
@media only screen and (max-width: 768px) {
body {
& > nav {
border-right: 1px solid #{$color-border-all};
}
& > header {
grid-column: 1 / span 2;
}
& > main {
grid-column: 1 / span 2;
// TODO: Remove scrolling here
}
}
}
/* Site > Base > Coloring & Fonts */
body {
background-color: #{$color-background-body};
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
header, nav, footer {
background-color: #{$color-background-surround};
}
main {
background-color: #{$color-background-main};
}
/* Site > Base > Sidebar */
// FIXME: For mobile, just use 2 media queries to define normal behaviour and inverted mobile behaviour.
// FIXME: Might be easier to have it as absolute, shift it left when closing and using a blank spacing div tbh...
// Or nest content in div, and when retracted move it out at the same speed, idk...
.sidebar {
width: #{$size-sidebar};
max-width: #{$size-sidebar};
min-height: 100%;
&.retracted {
width: 0;
padding-left: 0;
padding-right: 0;
overflow: hidden;
}
.sidebar-entry {
display: flex;
align-items: center;
justify-content: left;
}
}
/* Site > Base > Main */
main {
&.expanded {
border-left: 0;
border-radius: 0;
}
}
/* Site > Base > Transitions */
main, .sidebar {
transition: width 0.4s, padding 0.4s, border-width 0.4s, border-radius 0.4s;
transition-timing-function: cubic-bezier(.25,.8,.25,1.1);
}
/* // HTML Elements > Layout > Trash */
// FIXME: Move it out too !
.heading-main {
> h2, > h3, > h4 {
display: flex;
align-items: center;
justify-content: left;
}
&.heading-dyn-width-1 {
min-width: 75%;
}
}

View File

@@ -1,59 +0,0 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin
/* HTML Elements > HTML & Body */
//@import 'images';
html, body {
min-width: 100vw;
min-height: 100vh;
width: 100vw !important;
height: 100vh !important;
max-width: 100vw;
max-height: 100vh;
background-color: #{$color-background-body};
}
body {
//z-index: -2;
font-family: "Roboto", Arial, sans-serif;
//&:before {
// content: ' ';
// display: block;
// position: absolute;
// left: 0;
// top: 0;
// width: 100%;
// height: 100%;
// z-index: -1;
//}
//
//&.background-grid:before {
// opacity: 0.3; // TODO: Set to .2 if in light.
// background-image: #{$img_grid};
//}
//
//&.background-map:before {
// background-image: #{$img_map};
// filter: contrast(200%) invert(75%) opacity(0.25) brightness(0.625);
//}
}
body {
//background-color: var(--lm-base-body-bg-color);
//background-image: var(--lm-base-body-bg-image);
//color: var(--lm-base-text-color);
//font-size: var(--base-font-size);
//line-height: var(--base-line-height);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
//font-weight: 400;
}
// TODO: Add that background to other classes through a common declaration
// And then separate only the body in a final declaration to unset the background from fixed to default !
// It will reduce the number of CSS statements/selectors !!!

View File

@@ -1,27 +0,0 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin
/* HTML Elements > Commons */
//* {
// margin: 0;
// padding: 0;
//
// color: #{$color-black-medium};
//
// .dark-mode & {
// color: #{$color-white-light};
// }
//}
//.container, header, footer, form, .sidebar {
// border: 1px solid var(--l-border-color);
//
// .dark-mode & {
// border-color: var(--d-border-color);
// }
//}
//
button + button, .button-link + .button-link > button {
margin-left: 0.75rem;
}

View File

@@ -1,19 +1,10 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin // NibblePoker.lu CSS - (C) 2023 Bozet Herwin
/* HTML Elements > Horizontal Rule */ /* Site > Elements > Horizontal Rule */
hr { hr.subtle {
//color: var(--dm-horizontal-rule-color); background-color: rgba(0,0,0,0) !important;
//background-color: var(--dm-horizontal-rule-color); background: #5d5f61;
background: radial-gradient(circle, rgba(83, 85, 87, 0.8) 0%, rgba(65, 67, 69, 0.65) 75%, rgba(17, 20, 23, 0) 100%);
.dark-mode & { opacity: 0.1;
}
&.subtle {
background-color: rgba(0,0,0,0) !important;
background: #5d5f61;
background: radial-gradient(circle, rgba(83, 85, 87, 0.8) 0%, rgba(65, 67, 69, 0.65) 75%, rgba(17, 20, 23, 0) 100%);
opacity: 0.1;
}
} }

View File

@@ -1,8 +1,8 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin // NibblePoker.lu CSS - (C) 2023 Bozet Herwin
/* Site > Input */ /* Site > Elements > Inputs */
/* Site > Input > Commons */ /* Site > Elements > Inputs > Commons */
button, input { button, input {
border: 0; border: 0;
@@ -21,7 +21,7 @@ button, input {
} }
} }
/* Site > Input > Buttons */ /* Site > Elements > Inputs > Buttons */
button { button {
cursor: pointer; cursor: pointer;
@@ -39,3 +39,40 @@ button {
} }
} }
} }
// Ugly fix for download buttons
button + button, .button-link + .button-link > button {
margin-left: 0.75rem;
}
/* Site > Elements > Inputs > Lang Selector */
#lang-selector {
position: relative;
white-space: nowrap;
> summary {
cursor: pointer;
list-style: none;
user-select: none;
}
> div {
position: absolute;
z-index: #{$z-index-lang-dropdown};
top: 2rem;
right: 0;
min-width: 100%;
// Visibility transition
//height: 0;
//transition: height 0.4s;
//transition-timing-function: cubic-bezier(.25,.8,.25,1.1);
}
// TODO: Maybe force it to be visible when closes ?
//&[open] > div {
// height: auto;
//}
}

View File

@@ -1,69 +0,0 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin
/* HTML Elements > Layout */
// Fixing some alignment issues with the sidebar and header
// I hate everyone that worked on CSS with every fiber of my soul.
// TODO: Try .container-root > tbody > tr [ > td ] {}
tr, td {
vertical-align: top;
}
.container-root {
width: 100vw !important;
min-height: 100vh !important;
height: 100vh !important;
max-height: 100vh !important;
overflow: hidden;
}
header, nav, footer {
background-color: #{$color-background-surround};
}
// FIXME: Might be easier to have it as absolute, shift it left when closing and using a blank spacing div tbh...
// Or nest content in div, and when retracted move it out at the same speed, idk...
.sidebar {
width: #{$size-sidebar};
max-width: #{$size-sidebar};
min-height: 100%;
&.retracted {
width: 0;
padding-left: 0;
padding-right: 0;
overflow: hidden;
}
}
// TODO: Can be simplified in the DOM
.sidebar-entry {
display: flex;
align-items: center;
justify-content: left;
}
main {
background-color: #{$color-background-main};
&.expanded {
border-left: 0;
border-radius: 0;
}
}
main, .sidebar {
transition: width 0.4s, padding 0.4s, border-width 0.4s, border-radius 0.4s;
transition-timing-function: cubic-bezier(.25,.8,.25,1.1);
}
.heading-main {
> h2, > h3, > h4 {
display: flex;
align-items: center;
justify-content: left;
}
&.heading-dyn-width-1 {
min-width: 75%;
}
}

View File

@@ -0,0 +1,19 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin
/* Site > Fixes > Mobile */
@media only screen and (max-width: 768px) {
// Overrides the ".p-l" class used on "main".
main {
padding: calc(#{$margin-base-size} * 0.5) !important;
}
// Overrides a style in "site/content.scss".
.content-search-entry > p {
width: 100% !important;
}
.mobile-hide {
display: none;
}
}

View File

@@ -0,0 +1,34 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin
.modal {
position: absolute;
top: 0;
left: 0;
z-index: #{$z-index-modal};
background-color: #000000CF;
width: 100vw;
height: 100vh;
> #modal-content-cross {
cursor: pointer;
}
> #modal-content-inner {
position: absolute;
//background-color: #00aaaa;
top: 0;
left: 0;
right: 0;
height: 100vh;
width: 75vw;
margin-left: auto;
margin-right: auto;
display: grid;
place-items: center;
}
}
.modal-inner-image {
max-width: 100%;
max-height: 100%;
}

View File

@@ -1,5 +1,9 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin // NibblePoker.lu CSS - (C) 2023 Bozet Herwin
tr, td {
vertical-align: top;
}
table.stylish { table.stylish {
th { th {
font-weight: bold; font-weight: bold;

View File

@@ -1,29 +1,77 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin // NibblePoker.lu CSS - (C) 2023 Bozet Herwin
p, a, h1, h2, h3, td { /* Site > Text */
/* Site > Text > Commons */
p, a, h1, h2, h3, h4, h5, h6, td, th, .code, summary {
color: #{$color-text-regular-normal}; color: #{$color-text-regular-normal};
} }
/* Site > Text > Paragraphs */
p { p {
line-height: 1.2; line-height: 1.2;
} }
// Setting colors for bland links. /* Site > Text > Links */
// Done before muted text to make the footer privacy link possible.
a { a {
text-decoration: none; // Base
}
a:hover {
text-decoration: underline; text-decoration: underline;
color: #{$color-link-blue};
color: #{$color-link-hover}; & * {
color: #{$color-link-blue};
}
> * { &:hover {
color: #{$color-link-hover}; color: #{$color-link-blue-hover};
text-decoration: underline;
& * {
color: #{$color-link-blue-hover};
text-decoration: underline;
}
}
// Bland links
&.casper-link, &.bland-link {
text-decoration: none;
color: #{$color-text-regular-normal};
& * {
color: #{$color-text-regular-normal};
}
&:hover {
text-decoration: underline;
color: #{$color-link-hover};
& * {
color: #{$color-link-hover};
}
// FIXME: Not working, big F
//i {
// text-decoration: none !important;
//}
}
}
// Special case for buttons
&.casper-link, &.button-link, &.text-link {
text-decoration: none;
&:hover {
text-decoration: none; // Only really applies to content listing entries...
& * {
text-decoration: none;
}
}
} }
} }
/* Site > Text > Helpers */
.t-half-muted { .t-half-muted {
opacity: 65%; opacity: 65%;
} }
@@ -42,32 +90,14 @@ a:hover {
opacity: 45%; opacity: 45%;
} }
/* Site > Text > Targeted Rules */
.t-logo-text { .t-logo-text {
font-size: 1.775em; font-size: 1.775em;
line-height: 1; line-height: 1;
} }
a:not(.bland-link) { /* Site > Text > Targeted Rules > Sidebar */
text-decoration: underline;
//text-decoration: overline;
color: #{$color-link-blue} !important;
& * {
color: #{$color-link-blue} !important;
}
&:hover {
//text-decoration: underline;
color: #{$color-link-blue-hover} !important;
& * {
color: #{$color-link-blue-hover} !important;
}
}
}
// Special rules for the sidebar and FontAwesome icons // Special rules for the sidebar and FontAwesome icons
.sidebar-entry { .sidebar-entry {
@@ -89,6 +119,8 @@ a:not(.bland-link) {
//} //}
} }
/* Site > Text > Targeted Rules > Headings */
// And now for the headings, the exceptions keep popping up :,) // And now for the headings, the exceptions keep popping up :,)
// TODO: Add a simple and nicer divider. // TODO: Add a simple and nicer divider.
.heading-main { .heading-main {

View File

@@ -1,3 +1,5 @@
// NibblePoker.lu CSS - (C) 2023 Bozet Herwin
video { video {
width: 100% !important; width: 100% !important;
height: auto !important; height: auto !important;

View File

@@ -150,8 +150,6 @@ $color-scrollbar-border: $color-border-all;
$scrollbar-size: 1.25em; $scrollbar-size: 1.25em;
/* Variables > Others */ /* Variables > Others */
$border-base-radius: 5px; $border-base-radius: 5px;
@@ -164,3 +162,9 @@ $size-sidebar: 15rem;
//$size-sidebar: 30rem; //$size-sidebar: 30rem;
$content-search-image-size: 128px; $content-search-image-size: 128px;
/* Variables > Z Indexes */
$z-index-sidebar: 5;
$z-index-lang-dropdown: 10;
$z-index-modal: 99;

View File

@@ -68,18 +68,15 @@ if($contentManager->hasError) {
<body> <body>
<?php <?php
include_once 'commons/DOM/utils.php'; include_once 'commons/DOM/utils.php';
include 'commons/DOM/body-1.php'; $SIDEBAR_IDS = ['tools'];
$SIDEBAR_ID = 'tools';
include 'commons/DOM/sidebar.php'; include 'commons/DOM/sidebar.php';
include 'commons/DOM/body-2.php';
?> ?>
<header class="w-full p-m pl-s"> <header class="w-full p-m pl-s">
<h1 class="t-size-17 t-w-500"> <h1 class="t-size-17 t-w-500">
<i class="fad fa-tools t-size-16 mr-s t-muted"></i><?php print(localize("tools.header.title")); ?> <i class="fad fa-tools t-size-16 mr-s t-muted"></i><?php print(localize("tools.header.title")); ?>
</h1> </h1>
<?php //include 'header-lang.php'; ?> <?php include 'commons/DOM/header-lang.php'; ?>
</header> </header>
<?php include 'commons/DOM/body-3.php'; ?>
<main id="main" class="rl-m border border-r-0 p-l"> <main id="main" class="rl-m border border-r-0 p-l">
<?php <?php
// Checking if an error occurred. // Checking if an error occurred.
@@ -163,9 +160,7 @@ include 'commons/DOM/body-2.php';
?> ?>
</main> </main>
<?php <?php
include 'commons/DOM/body-4.php';
include 'commons/DOM/footer.php'; include 'commons/DOM/footer.php';
include 'commons/DOM/body-5.php';
include 'commons/DOM/scripts.php'; include 'commons/DOM/scripts.php';
// Including the tool's scripts if required. // Including the tool's scripts if required.

View File

@@ -1,4 +1,3 @@
document.addEventListener("DOMContentLoaded", () => { document.addEventListener("DOMContentLoaded", () => {
const eInputFiles = document.getElementById("tool-svg-to-png-files"); const eInputFiles = document.getElementById("tool-svg-to-png-files");
const eFileSelectButton = document.getElementById("tool-svg-to-png-btn-select"); const eFileSelectButton = document.getElementById("tool-svg-to-png-btn-select");
@@ -13,7 +12,7 @@ document.addEventListener("DOMContentLoaded", () => {
const eFileConvertButton = document.getElementById("tool-svg-to-png-btn-convert"); const eFileConvertButton = document.getElementById("tool-svg-to-png-btn-convert");
// Propagating the button click to the input element // Propagating the button click to the input element
eFileSelectButton.onclick = function () { eFileSelectButton.onclick = function() {
eInputFiles.click(); eInputFiles.click();
} }
@@ -30,7 +29,7 @@ document.addEventListener("DOMContentLoaded", () => {
}); });
// Handling conversion // Handling conversion
eFileConvertButton.onclick = function () { eFileConvertButton.onclick = function() {
const canvas = document.getElementById('conversion-canvas'); const canvas = document.getElementById('conversion-canvas');
const ctx = canvas.getContext('2d'); const ctx = canvas.getContext('2d');