Added basic Formula Wizard, Added script to compile SASS and TS, many other random changes.
Update .gitignore, .htaccess, and 68 more files...
This commit is contained in:
@@ -8,7 +8,7 @@ if(basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) {
|
||||
include_once 'commons/langs.php';
|
||||
?>
|
||||
<footer class="d-flex flex-align-center w-full p-s py-xs">
|
||||
<button id="sidebar-toggle-footer" class="p-xs border r-s t-size-10">
|
||||
<button id="sidebar-toggle-footer" class="p-xs border r-s t-size-10" aria-label="<?php echo(localize("footer.alt.sidebar.button")); ?>">
|
||||
<i class="fa fa-bars px-xxs" aria-hidden="true"></i>
|
||||
</button>
|
||||
<p class="flex-fill t-center t-size-10 t-w-500 t-muted">
|
||||
|
||||
@@ -54,6 +54,7 @@ function printSidebarEntry($url, $title, $icon, $activeId) {
|
||||
<?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", "");
|
||||
//printSidebarEntry("https://wiki.nibblepoker.lu/", localize("sidebar.text.wiki"), "fad fa-books", "");
|
||||
?>
|
||||
</div>
|
||||
<hr class="subtle">
|
||||
|
||||
@@ -59,4 +59,23 @@ function printMainHeader(string $text, ?string $iconId = null, ?string $rightTex
|
||||
));
|
||||
}
|
||||
|
||||
function printSubHeader(string $text, ?string $anchorId = null, ?string $backgroundClass = "bkgd-math"): void {
|
||||
if(is_null($backgroundClass)) {
|
||||
$backgroundClass = "bkgd-math";
|
||||
}
|
||||
$headingText = getMainHeader(
|
||||
$text,
|
||||
null,
|
||||
null,
|
||||
$anchorId,
|
||||
69, // Forcing it as a non-first of main heading.
|
||||
$backgroundClass,
|
||||
3
|
||||
);
|
||||
|
||||
$headingText = str_replace("t-size-14", "t-size-11", $headingText);
|
||||
|
||||
echo($headingText);
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -92,6 +92,7 @@ abstract class ComposerElementModifiers {
|
||||
|
||||
// Containers
|
||||
const CONTAINER_SCROLL_HORIZONTAL = ["horizontal-scroll", "overflow-x-scroll hide-scrollbar"];
|
||||
const CONTAINER_SCROLL_HORIZONTAL_AUTO = ["horizontal-scroll-auto", "overflow-x-auto"];
|
||||
const CONTAINER_CARD = ["card", "card"];
|
||||
|
||||
// Buttons
|
||||
|
||||
51
commons/content/opengraph.php
Normal file
51
commons/content/opengraph.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?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';
|
||||
|
||||
class OpenGraphData {
|
||||
public string $title;
|
||||
public string $description;
|
||||
public string $type;
|
||||
public string $url;
|
||||
public string $image;
|
||||
public string $image_type;
|
||||
|
||||
function __construct(array $title, array $description, string $type, string $url, string $image,
|
||||
string $image_type) {
|
||||
global $default_language;
|
||||
global $user_language;
|
||||
|
||||
$this->title = array_key_exists($user_language, $title) ? $title[$user_language] :
|
||||
(array_key_exists($default_language, $title) ? $title[$default_language] : $title[0]);
|
||||
$this->description = array_key_exists($user_language, $description) ? $description[$user_language] :
|
||||
(array_key_exists($default_language, $description) ? $description[$default_language] : $description[0]);
|
||||
|
||||
$this->type = $type;
|
||||
$this->url = $url;
|
||||
$this->image = $image;
|
||||
$this->image_type = $image_type;
|
||||
}
|
||||
|
||||
static function from_json(array $json_data): ?OpenGraphData {
|
||||
foreach(["title", "description", "type", "url", "image", "image_type"] as $wantedKey) {
|
||||
if(!key_exists($wantedKey, $json_data)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return new OpenGraphData(
|
||||
$json_data["title"],
|
||||
$json_data["description"],
|
||||
$json_data["type"],
|
||||
$json_data["url"],
|
||||
$json_data["image"],
|
||||
$json_data["image_type"]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,9 @@ include_once 'commons/config.php';
|
||||
include_once 'commons/langs.php';
|
||||
include_once 'commons/content.php';
|
||||
|
||||
// Required to handle opengraph data
|
||||
include_once 'commons/content/opengraph.php';
|
||||
|
||||
// Required to make headings
|
||||
include_once 'commons/DOM/utils.php';
|
||||
|
||||
@@ -18,20 +21,25 @@ class ToolInfoFile {
|
||||
public string $domFile;
|
||||
public ?string $langFile;
|
||||
public array $codeFilesPaths;
|
||||
public array $moduleFilesPaths;
|
||||
public array $styleFilesPaths;
|
||||
public string $icon;
|
||||
public string $titleKey;
|
||||
public ?string $subTitleKey;
|
||||
public OpenGraphData $openGraphData;
|
||||
|
||||
function __construct(string $domFile, ?string $langFile, ?array $codeFilesPaths, ?array $styleFilesPaths,
|
||||
?string $icon, ?string $titleKey, ?string $subTitleKey) {
|
||||
function __construct(string $domFile, ?string $langFile, ?array $codeFilesPaths, ?array $moduleFilesPaths,
|
||||
?array $styleFilesPaths, ?string $icon, ?string $titleKey, ?string $subTitleKey,
|
||||
array $opengraph) {
|
||||
$this->domFile = $domFile;
|
||||
$this->langFile = $langFile;
|
||||
$this->codeFilesPaths = is_null($codeFilesPaths) ? array() : $codeFilesPaths;
|
||||
$this->moduleFilesPaths = is_null($moduleFilesPaths) ? array() : $moduleFilesPaths;
|
||||
$this->styleFilesPaths = is_null($styleFilesPaths) ? array() : $styleFilesPaths;
|
||||
$this->icon = is_null($icon) ? "fad fa-question" : $icon;
|
||||
$this->titleKey = is_null($titleKey) ? "unset" : $titleKey;
|
||||
$this->subTitleKey = $subTitleKey;
|
||||
$this->openGraphData = OpenGraphData::from_json($opengraph);
|
||||
}
|
||||
|
||||
static function from_json(array $json_data): ?ToolInfoFile {
|
||||
@@ -42,10 +50,12 @@ class ToolInfoFile {
|
||||
$json_data["dom"],
|
||||
key_exists("lang", $json_data) ? $json_data["lang"] : null,
|
||||
key_exists("code", $json_data) ? $json_data["code"] : null,
|
||||
key_exists("module", $json_data) ? $json_data["module"] : null,
|
||||
key_exists("styles", $json_data) ? $json_data["styles"] : null,
|
||||
key_exists("icon", $json_data) ? $json_data["icon"] : null,
|
||||
key_exists("title", $json_data) ? $json_data["title"] : null,
|
||||
key_exists("subtitle", $json_data) ? $json_data["subtitle"] : null
|
||||
key_exists("subtitle", $json_data) ? $json_data["subtitle"] : null,
|
||||
$json_data["opengraph"]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -72,6 +82,14 @@ class ToolInfoFile {
|
||||
}
|
||||
}
|
||||
|
||||
foreach($this->moduleFilesPaths as $moduleFilePath) {
|
||||
if(!(file_exists($moduleFilePath) && is_file($moduleFilePath))) {
|
||||
$contentManager->hasError = true;
|
||||
$contentManager->errorMessageKey = "content.error.message.missing.file.module";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($this->styleFilesPaths as $styleFilePath) {
|
||||
if(!(file_exists($styleFilePath) && is_file($styleFilePath))) {
|
||||
$contentManager->hasError = true;
|
||||
@@ -108,10 +126,23 @@ abstract class ToolsContent {
|
||||
for($iCodeFilePath = 0; $iCodeFilePath < count($toolInfo->codeFilesPaths); $iCodeFilePath++) {
|
||||
$toolInfo->codeFilesPaths[$iCodeFilePath] = realpath(
|
||||
$contentRootPath . "/items/" . $toolInfo->codeFilesPaths[$iCodeFilePath]);
|
||||
$toolInfo->codeFilesPaths[$iCodeFilePath] = str_replace(
|
||||
"\\", "/", $toolInfo->codeFilesPaths[$iCodeFilePath]
|
||||
);
|
||||
}
|
||||
for($iModuleFilePath = 0; $iModuleFilePath < count($toolInfo->moduleFilesPaths); $iModuleFilePath++) {
|
||||
$toolInfo->moduleFilesPaths[$iModuleFilePath] = realpath(
|
||||
$contentRootPath . "/items/" . $toolInfo->moduleFilesPaths[$iModuleFilePath]);
|
||||
$toolInfo->moduleFilesPaths[$iModuleFilePath] = str_replace(
|
||||
"\\", "/", $toolInfo->moduleFilesPaths[$iModuleFilePath]
|
||||
);
|
||||
}
|
||||
for($iStyleFilePath = 0; $iStyleFilePath < count($toolInfo->styleFilesPaths); $iStyleFilePath++) {
|
||||
$toolInfo->styleFilesPaths[$iStyleFilePath] = realpath(
|
||||
$contentRootPath . "/items/" . $toolInfo->styleFilesPaths[$iStyleFilePath]);
|
||||
$toolInfo->styleFilesPaths[$iStyleFilePath] = str_replace(
|
||||
"\\", "/", $toolInfo->styleFilesPaths[$iStyleFilePath]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$contentManager->hasError = true;
|
||||
|
||||
@@ -31,8 +31,3 @@ function add_code_modal(string $id, string $title, string $text) {
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -16,7 +16,7 @@ for main_dir_entry in os.listdir("./"):
|
||||
if main_dir_entry.startswith("_"):
|
||||
continue
|
||||
|
||||
print("Checking ./{}".format(main_dir_entry))
|
||||
print("> Processing ./{}".format(main_dir_entry))
|
||||
|
||||
if not os.path.isdir(os.path.join("./", main_dir_entry)):
|
||||
continue
|
||||
|
||||
41
commons/strings/en/about.json
Normal file
41
commons/strings/en/about.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"about.head.title": "About - NibblePoker",
|
||||
"about.head.description": "TODO: description",
|
||||
"about.og.title": "NibblePoker - About",
|
||||
"about.og.description": "TODO: description",
|
||||
"about.header.title": "About",
|
||||
|
||||
"about.part.year.single": "year",
|
||||
"about.part.year.multiple": "years",
|
||||
"about.part.since": "since",
|
||||
|
||||
"about.education.title": "Education",
|
||||
|
||||
"about.skills.title": "Skills",
|
||||
|
||||
"about.work.title": "Work Experience",
|
||||
"about.work.ctie.title": "Government IT Centre (CTIE)",
|
||||
"about.work.ctie.role.1": "<abbr title=\"Internet-of-Things\">IoT</abbr> Developer Internship",
|
||||
"about.work.ctie.location": "Luxembourg",
|
||||
|
||||
"about.work.computrade.title": "CompuTrade Luxembourg Ltd",
|
||||
"about.work.computrade.role.1": "Full & Half-time student job",
|
||||
"about.work.computrade.location": "Steinfort, Luxembourg",
|
||||
|
||||
"about.work.lih.title": "Luxembourg Institute of Health (LIH)",
|
||||
"about.work.lih.role.1": "IT Support Internship",
|
||||
"about.work.lih.location": "Luxembourg",
|
||||
|
||||
"about.work.crlux.title": "Luxembourg Red Cross",
|
||||
"about.work.crlux.role.1": "Volunteer Excel VBA programmer.",
|
||||
"about.work.crlux.location": "Luxembourg",
|
||||
|
||||
"about.work.buttek.title": "Luxembourg Red Cross - Buttek",
|
||||
"about.work.buttek.role.1": "Volunteer ???",
|
||||
"about.work.buttek.role.2": "Student cashier ???",
|
||||
"about.work.buttek.location": "Luxembourg",
|
||||
|
||||
"about.work.current.title": "Current employer kept private",
|
||||
"about.work.current.role.1": "???",
|
||||
"about.work.current.location": "Belgium"
|
||||
}
|
||||
@@ -5,6 +5,9 @@
|
||||
"contact.og.description": "TODO: description",
|
||||
"contact.header.title": "Contact",
|
||||
|
||||
"contact.email.title": "Email",
|
||||
"contact.email.compose": "Send an email to <i>herwin.bozet@gmail.com</i>",
|
||||
|
||||
"contact.twitter.title": "Twitter",
|
||||
"contact.twitter.compose": "Compose DM to @NibblePoker on Twitter"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"footer.text.privacy": "Privacy policy",
|
||||
"footer.alt.sidebar.button": "Open and close the navigation sidebar.",
|
||||
"footer.alt.logo": "Website's logo"
|
||||
}
|
||||
@@ -3,5 +3,17 @@
|
||||
"home.head.description": "TODO: description",
|
||||
"home.og.title": "NibblePoker",
|
||||
"home.og.description": "TODO: description",
|
||||
"home.header.title": "Homepage"
|
||||
"home.header.title": "Homepage",
|
||||
|
||||
"home.showcase.title": "Showcase",
|
||||
|
||||
"home.updates.title": "Updates",
|
||||
"home.updates.text.privacy": "● Updated our privacy policy.",
|
||||
"home.updates.2.date": "August 15 2023",
|
||||
"home.updates.2.text.1": "● The website is back online.",
|
||||
"home.updates.2.text.2": "● New and much lighter design.",
|
||||
"home.updates.2.text.3": "● Changed our host to <a href=\"https://hostbrr.com/\">HostBrr</a>.",
|
||||
"home.updates.2.text.4": "● Added a section for web-based tools.",
|
||||
"home.updates.1.date": "September 9 2022",
|
||||
"home.updates.1.text.1": "● Changed our host to v6Node."
|
||||
}
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
"privacy.v2.data.title": "Data collection",
|
||||
"privacy.v2.data.intro.1": "This websites only collects data through generic access logs in order to detect and block bad actors from accessing this website.",
|
||||
"privacy.v2.data.intro.2": "None of the data collected is used for any other purpose,it is never shared with any other third-party and is never use in any sort of analytics.",
|
||||
"privacy.v2.data.intro.2": "None of the data collected is used for any other purpose, it is never shared with any other third-party and is never use in any sort of analytics.",
|
||||
"privacy.v2.data.private.1": "Here is the list of private data being collected:",
|
||||
"privacy.v2.data.private_list.1": "IP address",
|
||||
"privacy.v2.data.private_list.2": "Browser's User-Agent",
|
||||
@@ -57,7 +57,18 @@
|
||||
"privacy.v2.third.intro.2": "The goal of this system is to improve your browsing experience with the help of a private caching service and custom traffic filtering rules.",
|
||||
"privacy.v2.third.intro.3": "None of the data that may be gathered by v6Node or the system described above is ever used or stored.",
|
||||
"privacy.v2.third.intro.4": "If you'd wish to consult their privacy policy and their partners', you can do so by using the following URLs:",
|
||||
|
||||
|
||||
"privacy.v2.cookies.title": "Cookies",
|
||||
"privacy.v2.cookies.intro.1": "Our websites doesn't use nor store any cookies in your browser."
|
||||
"privacy.v2.cookies.intro.1": "Our websites doesn't use nor store any cookies in your browser.",
|
||||
|
||||
"privacy.v2.personal.title": "Personal Measures & Convictions",
|
||||
"privacy.v2.personal.disabled.intro": "While not required by any laws, we decided to improve your online privacy by disabling some features:",
|
||||
"privacy.v2.personal.disabled.list.1": "Disabling hidden <a href=\"https://wikipedia.org/wiki/HTTP_referer\">HTTP Referer</a> system.",
|
||||
"privacy.v2.personal.disabled.list.2": "Disabling Google's predatory <i>Topics API</i> and defunct <a href=\"https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea\"><i>Cohort</i></a> ad-serving systems.",
|
||||
"privacy.v2.personal.disabled.list.3": "Preventing any external third-party code from being injected into the page.",
|
||||
"privacy.v2.personal.tracking.text.1": "It is our belief that the web and modern technology in general should never be used to track and spy on people in any way shape or form.",
|
||||
"privacy.v2.personal.tracking.text.2": "We believe that any service that is in any way trying to force you to disable any ad-blocking or privacy-enhancing extensions should be avoided at all cost and shunned for their practices.",
|
||||
"privacy.v2.personal.tracking.text.3": "Modern website should <b>never</b> break with those type of extensions unless they are purposefully built to track you to near-illegal extents, this excuse is only used to force you to accept these predatory practices.",
|
||||
"_privacy.v2.personal.transparency.text.": "Additionally, we believe in the principles of transparency and openness [???]",
|
||||
"privacy.v2.personal.recommendations": "We also strongly recommend you to read the <acronym title=\"European Union Agency for Cybersecurity\">ENISA</acronym>'s <i>Privacy considerations of online behavioural tracking report</i> in order to improve your online privacy."
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"sidebar.text.links": "Links",
|
||||
"sidebar.text.downloads": "Downloads",
|
||||
"sidebar.text.gitea": "Git Repos.",
|
||||
"sidebar.text.wiki": "Wiki",
|
||||
"sidebar.text.about": "About",
|
||||
"sidebar.text.contact": "Contact"
|
||||
}
|
||||
9
commons/strings/fr/about.json
Normal file
9
commons/strings/fr/about.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"about.head.title": "À-propos - NibblePoker",
|
||||
"about.head.description": "TODO: description",
|
||||
"about.og.title": "NibblePoker - À-propos",
|
||||
"about.og.description": "TODO: description",
|
||||
"about.header.title": "À-propos"
|
||||
|
||||
|
||||
}
|
||||
@@ -5,6 +5,9 @@
|
||||
"contact.og.description": "TODO: description",
|
||||
"contact.header.title": "Contact",
|
||||
|
||||
"contact.email.title": "Courriel",
|
||||
"contact.email.compose": "Envoyer un courriel à <i>herwin.bozet@gmail.com</i>",
|
||||
|
||||
"contact.twitter.title": "Twitter",
|
||||
"contact.twitter.compose": "Composer un message privé pour @NibblePoker sur Twitter"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"footer.text.privacy": "Politique de confidentialité",
|
||||
"footer.alt.sidebar.button": "Ouvrir et fermer le menu latéral de navigation.",
|
||||
"footer.alt.logo": "Logo du site web"
|
||||
}
|
||||
@@ -3,5 +3,17 @@
|
||||
"home.head.description": "TODO: description",
|
||||
"home.og.title": "NibblePoker",
|
||||
"home.og.description": "TODO: description",
|
||||
"home.header.title": "Page d'accueil"
|
||||
"home.header.title": "Page d'accueil",
|
||||
|
||||
"home.showcase.title": "Vitrine",
|
||||
|
||||
"home.updates.title": "Updates",
|
||||
"home.updates.text.privacy": "● Mise-à-jour de notre politique de confidentialité.",
|
||||
"home.updates.2.date": "15 Août 2023",
|
||||
"home.updates.2.text.1": "● Le site internet est à nouveau disponible.",
|
||||
"home.updates.2.text.2": "● Mise en place d'un nouveau design plus léger.",
|
||||
"home.updates.2.text.3": "● Changement d'hébergeur vers <a href=\"https://hostbrr.com/\">HostBrr</a>.",
|
||||
"home.updates.2.text.4": "● Ajout d'une nouvelle section pour les outils.",
|
||||
"home.updates.1.date": " 9 Septembre 2022",
|
||||
"home.updates.1.text.1": "● Changement d'hébergeur vers v6Node."
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
"sidebar.text.links": "Liens",
|
||||
"sidebar.text.downloads": "Téléchargements",
|
||||
"sidebar.text.gitea": "Dépôts Git",
|
||||
"sidebar.text.wiki": "Wiki",
|
||||
"sidebar.text.about": "À-propos",
|
||||
"sidebar.text.contact": "Contact"
|
||||
}
|
||||
7
commons/strings/fr/tools.json
Normal file
7
commons/strings/fr/tools.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"tools.head.title": "Outils - NibblePoker",
|
||||
"tools.head.description": "TODO: description",
|
||||
"tools.og.title": "NibblePoker - Outils",
|
||||
"tools.og.description": "TODO: description",
|
||||
"tools.header.title": "Outils"
|
||||
}
|
||||
Reference in New Issue
Block a user