Started massive refactoring, Removed halfmoon, Added new personnal common CSS, Site now runs at >5 fps on low-end
Update .gitignore, .htaccess, and 264 more files...
This commit is contained in:
8
commons/DOM/body-1.php
Normal file
8
commons/DOM/body-1.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?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>
|
||||
8
commons/DOM/body-2.php
Normal file
8
commons/DOM/body-2.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?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>
|
||||
8
commons/DOM/body-3.php
Normal file
8
commons/DOM/body-3.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?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">
|
||||
8
commons/DOM/body-4.php
Normal file
8
commons/DOM/body-4.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?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">
|
||||
8
commons/DOM/body-5.php
Normal file
8
commons/DOM/body-5.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?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>
|
||||
23
commons/DOM/footer.php
Normal file
23
commons/DOM/footer.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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();
|
||||
}
|
||||
|
||||
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">
|
||||
<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">
|
||||
<a class="bland-link t-muted" href="<?php print(l10n_url_abs('/privacy/')); ?>">
|
||||
<?php print(localize('footer.text.privacy')); ?>
|
||||
</a>
|
||||
</p>
|
||||
<a href="<?php print(l10n_url_abs('/')); ?>">
|
||||
<img id="logo-footer" src="/resources/NibblePoker/images/logos/v2_full_unshaded_original.svg"
|
||||
alt="<?php echo(localize("footer.alt.logo")); ?>" draggable="false">
|
||||
</a>
|
||||
</footer>
|
||||
33
commons/DOM/head.php
Normal file
33
commons/DOM/head.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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();
|
||||
}
|
||||
?>
|
||||
<meta charset="utf-8" />
|
||||
<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 name="viewport" content="width=device-width" />
|
||||
<!--<meta content="cache, store" http-equiv="Cache-Control">
|
||||
<meta content="cache, store" http-equiv="Pragma">
|
||||
<meta content="3600" http-equiv="Expires">-->
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
||||
<link rel="alternate icon" href="/favicon.ico">
|
||||
<link rel="stylesheet" href="/resources/FontAwesomePro/5.15.3/css/all.min.css">
|
||||
<link rel="stylesheet" href="/resources/NibblePoker/css/nibblepoker.min.css">
|
||||
<?php
|
||||
if($enable_waffle_iron) {
|
||||
// Turns out you can't change an SVG's path fill if it's inside an IMG tag...
|
||||
//echo("<link rel=\"stylesheet\" href=\"/resources/NibblePoker/css/waffle-day.min.css\">");
|
||||
}
|
||||
if($enable_code_highlight) {
|
||||
echo('<link href="/resources/HighlightJS/11.6.0/styles/atom-one-dark.min.css" rel="stylesheet" />');
|
||||
}
|
||||
if($enable_glider) {
|
||||
echo('<link href="/resources/GliderJs/1.7.6/glider.min.css" rel="stylesheet" />');
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
18
commons/DOM/scripts.php
Normal file
18
commons/DOM/scripts.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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();
|
||||
}
|
||||
?>
|
||||
<script src="/resources/NibblePoker/js/nibblepoker.min.js"></script>
|
||||
<?php
|
||||
if($enable_glider) {
|
||||
echo('<script src="/resources/GliderJs/1.7.6/glider.min.js"></script>');
|
||||
}
|
||||
if($enable_code_highlight) {
|
||||
echo('<script src="/resources/HighlightJS/11.6.0/highlight.min.js"></script>');
|
||||
echo('<script src="/resources/HighlightJS/11.6.0/languages/csharp.min.js"></script>');
|
||||
//echo('<script src="/resources/Azias/js/code-highlighter.js"></script>');
|
||||
}
|
||||
?>
|
||||
59
commons/DOM/sidebar.php
Normal file
59
commons/DOM/sidebar.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?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();
|
||||
}
|
||||
|
||||
include_once 'commons/langs.php';
|
||||
|
||||
if(!isset($SIDEBAR_ID)) {
|
||||
$SIDEBAR_ID = 'default';
|
||||
}
|
||||
|
||||
function printSidebarEntry($url, $title, $icon) {
|
||||
echo('<a class="bland-link" href="' . $url . '"><p class="t-size-18 t-w-500 py-xs sidebar-entry">');
|
||||
echo('<i class="' . $icon . ' pr-xs t-size-12"></i><span class="t-size-12">' . $title . '</span></p></a>');
|
||||
}
|
||||
|
||||
?>
|
||||
<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">
|
||||
<img id="logo-sidebar" src="/resources/NibblePoker/images/logos/v2_full_unshaded_original.svg"
|
||||
alt="<?php echo(localize("sidebar.alt.logo")); ?>" draggable="false">
|
||||
</a>
|
||||
<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>
|
||||
</p>
|
||||
<hr class="subtle">
|
||||
<?php
|
||||
printSidebarEntry(l10n_url_abs('/'), localize("sidebar.text.home"), "fad fa-home");
|
||||
?>
|
||||
<hr class="subtle">
|
||||
<?php
|
||||
printSidebarEntry(l10n_url_abs('/content/'), localize("sidebar.text.projects"), "fad fa-briefcase");
|
||||
?>
|
||||
<div class="ml-m">
|
||||
<?php
|
||||
printSidebarEntry(l10n_url_abs('/content/?tags=application'), localize("sidebar.text.applications"),"fad fa-browser");
|
||||
printSidebarEntry(l10n_url_abs('/content/?tags=library'), localize("sidebar.text.libraries"), "fad fa-puzzle-piece");
|
||||
printSidebarEntry(l10n_url_abs('/content/?tags=electronic'), localize("sidebar.text.electronics"), "fad fa-microchip");
|
||||
?>
|
||||
</div>
|
||||
<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>
|
||||
<hr class="subtle">
|
||||
<?php
|
||||
printSidebarEntry(l10n_url_abs('/about/'), localize("sidebar.text.about"), "fad fa-user");
|
||||
printSidebarEntry(l10n_url_abs('/contact/'), localize("sidebar.text.contact"),"fad fa-mailbox");
|
||||
?>
|
||||
</nav>
|
||||
47
commons/DOM/utils.php
Normal file
47
commons/DOM/utils.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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();
|
||||
}
|
||||
|
||||
$_npDomUtilsHeadingCount = 0;
|
||||
|
||||
/**
|
||||
* Prints a standard heading container and its text with an optional anchor.
|
||||
* @param $text string Text to be shown in the heading
|
||||
* @param $iconId string|null
|
||||
* @param $rightText string|null
|
||||
* @param $anchorId string|null Anchor's ID if desired, `null` otherwise.
|
||||
* @return void
|
||||
*/
|
||||
function makeMainHeader(string $text, ?string $iconId = null, ?string $rightText = null, ?string $anchorId = null): void {
|
||||
global $_npDomUtilsHeadingCount;
|
||||
|
||||
if(!is_null($anchorId)) {
|
||||
echo('<a class="bland-link" href="#' . $anchorId . '">');
|
||||
}
|
||||
|
||||
echo('<div class="heading-main p-xs border r-s ' . ($_npDomUtilsHeadingCount > 0 ? "mt-l " : "") . 'bkgd-grid"><h2 class="t-w-500 t-size-14">');
|
||||
|
||||
// TODO: Add a simple and nicer divider.
|
||||
if(!is_null($iconId)) {
|
||||
echo('<i class="' . $iconId . ' t-size-12 t-muted"></i>');
|
||||
}
|
||||
|
||||
echo($text);
|
||||
|
||||
if(!is_null($rightText)) {
|
||||
echo('<span class="ml-auto t-muted t-size-10">' . $rightText . '</span>');
|
||||
}
|
||||
|
||||
echo('</h2></div>');
|
||||
|
||||
if(!is_null($anchorId)) {
|
||||
echo('</a>');
|
||||
}
|
||||
|
||||
$_npDomUtilsHeadingCount++;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user