feat: use FlexBox to properly arrange the sidebar layouts
Some checks reported warnings
/ phplint (push) Has been cancelled

This commit is contained in:
David Bailey 2025-01-27 10:24:41 +01:00
parent 771e9a2ec8
commit de1f1446a3
10 changed files with 172 additions and 123 deletions

View file

@ -7,5 +7,11 @@
"path": "../dragon_fire_content"
}
],
"settings": {}
"settings": {
"conventionalCommits.scopes": [
"search",
"templates",
"css"
]
}
}

View file

@ -3,8 +3,8 @@ AddType text/plain .md
AddType text/plain .atom
AddType text/plain .rss
# php_value upload_max_filesize 40M
# php_value post_max_size 42M
php_value upload_max_filesize 40M
php_value post_max_size 42M
RewriteEngine On
RewriteBase /

181
www/composer.lock generated
View file

@ -184,33 +184,33 @@
},
{
"name": "laminas/laminas-escaper",
"version": "2.13.0",
"version": "2.14.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-escaper.git",
"reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba"
"reference": "0f7cb975f4443cf22f33408925c231225cfba8cb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/af459883f4018d0f8a0c69c7a209daef3bf973ba",
"reference": "af459883f4018d0f8a0c69c7a209daef3bf973ba",
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/0f7cb975f4443cf22f33408925c231225cfba8cb",
"reference": "0f7cb975f4443cf22f33408925c231225cfba8cb",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-mbstring": "*",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0"
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
},
"conflict": {
"zendframework/zend-escaper": "*"
},
"require-dev": {
"infection/infection": "^0.27.0",
"laminas/laminas-coding-standard": "~2.5.0",
"infection/infection": "^0.27.9",
"laminas/laminas-coding-standard": "~3.0.0",
"maglnet/composer-require-checker": "^3.8.0",
"phpunit/phpunit": "^9.6.7",
"psalm/plugin-phpunit": "^0.18.4",
"vimeo/psalm": "^5.9"
"phpunit/phpunit": "^9.6.16",
"psalm/plugin-phpunit": "^0.19.0",
"vimeo/psalm": "^5.21.1"
},
"type": "library",
"autoload": {
@ -242,7 +242,7 @@
"type": "community_bridge"
}
],
"time": "2023-10-10T08:35:13+00:00"
"time": "2024-10-24T10:12:53+00:00"
},
{
"name": "laminas/laminas-feed",
@ -519,16 +519,16 @@
},
{
"name": "league/commonmark",
"version": "2.5.1",
"version": "2.5.3",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c"
"reference": "b650144166dfa7703e62a22e493b853b58d874b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/ac815920de0eff6de947eac0a6a94e5ed0fb147c",
"reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/b650144166dfa7703e62a22e493b853b58d874b0",
"reference": "b650144166dfa7703e62a22e493b853b58d874b0",
"shasum": ""
},
"require": {
@ -541,8 +541,8 @@
},
"require-dev": {
"cebe/markdown": "^1.0",
"commonmark/cmark": "0.31.0",
"commonmark/commonmark.js": "0.31.0",
"commonmark/cmark": "0.31.1",
"commonmark/commonmark.js": "0.31.1",
"composer/package-versions-deprecated": "^1.8",
"embed/embed": "^4.4",
"erusev/parsedown": "^1.0",
@ -621,7 +621,7 @@
"type": "tidelift"
}
],
"time": "2024-07-24T12:52:09+00:00"
"time": "2024-08-16T11:46:16+00:00"
},
{
"name": "league/config",
@ -707,24 +707,24 @@
},
{
"name": "nette/schema",
"version": "v1.3.0",
"version": "v1.3.2",
"source": {
"type": "git",
"url": "https://github.com/nette/schema.git",
"reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188"
"reference": "da801d52f0354f70a638673c4a0f04e16529431d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nette/schema/zipball/a6d3a6d1f545f01ef38e60f375d1cf1f4de98188",
"reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188",
"url": "https://api.github.com/repos/nette/schema/zipball/da801d52f0354f70a638673c4a0f04e16529431d",
"reference": "da801d52f0354f70a638673c4a0f04e16529431d",
"shasum": ""
},
"require": {
"nette/utils": "^4.0",
"php": "8.1 - 8.3"
"php": "8.1 - 8.4"
},
"require-dev": {
"nette/tester": "^2.4",
"nette/tester": "^2.5.2",
"phpstan/phpstan-nette": "^1.0",
"tracy/tracy": "^2.8"
},
@ -763,9 +763,9 @@
],
"support": {
"issues": "https://github.com/nette/schema/issues",
"source": "https://github.com/nette/schema/tree/v1.3.0"
"source": "https://github.com/nette/schema/tree/v1.3.2"
},
"time": "2023-12-11T11:54:22+00:00"
"time": "2024-10-06T23:10:23+00:00"
},
{
"name": "nette/utils",
@ -983,21 +983,21 @@
},
{
"name": "spatie/yaml-front-matter",
"version": "2.0.9",
"version": "2.1.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/yaml-front-matter.git",
"reference": "cbe67e1cdd0a29a96d74ccab9400fe663e078392"
"reference": "5d0009289dd19a23e5f6cbb72c959a9fc1881e32"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/yaml-front-matter/zipball/cbe67e1cdd0a29a96d74ccab9400fe663e078392",
"reference": "cbe67e1cdd0a29a96d74ccab9400fe663e078392",
"url": "https://api.github.com/repos/spatie/yaml-front-matter/zipball/5d0009289dd19a23e5f6cbb72c959a9fc1881e32",
"reference": "5d0009289dd19a23e5f6cbb72c959a9fc1881e32",
"shasum": ""
},
"require": {
"php": "^7.0|^8.0",
"symfony/yaml": "^3.0|^4.0|^5.0|^6.0|^7.0"
"php": "^8.0",
"symfony/yaml": "^6.0|^7.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
@ -1029,7 +1029,7 @@
"yaml"
],
"support": {
"source": "https://github.com/spatie/yaml-front-matter/tree/2.0.9"
"source": "https://github.com/spatie/yaml-front-matter/tree/2.1.0"
},
"funding": [
{
@ -1041,20 +1041,20 @@
"type": "github"
}
],
"time": "2024-06-13T10:20:51+00:00"
"time": "2024-12-02T08:40:45+00:00"
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.5.0",
"version": "v3.5.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
"shasum": ""
},
"require": {
@ -1092,7 +1092,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0"
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
},
"funding": [
{
@ -1108,24 +1108,24 @@
"type": "tidelift"
}
],
"time": "2024-04-18T09:32:20+00:00"
"time": "2024-09-25T14:20:29+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.30.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "0424dff1c58f028c451efff2045f5d92410bd540"
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540",
"reference": "0424dff1c58f028c451efff2045f5d92410bd540",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
"reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
"shasum": ""
},
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"provide": {
"ext-ctype": "*"
@ -1171,7 +1171,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0"
},
"funding": [
{
@ -1187,24 +1187,24 @@
"type": "tidelift"
}
],
"time": "2024-05-31T15:07:36+00:00"
"time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.30.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c"
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c",
"reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341",
"reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341",
"shasum": ""
},
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"provide": {
"ext-mbstring": "*"
@ -1251,7 +1251,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0"
},
"funding": [
{
@ -1267,24 +1267,24 @@
"type": "tidelift"
}
],
"time": "2024-06-19T12:30:46+00:00"
"time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.30.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "77fa7995ac1b21ab60769b7323d600a991a90433"
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433",
"reference": "77fa7995ac1b21ab60769b7323d600a991a90433",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
"reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8",
"shasum": ""
},
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"type": "library",
"extra": {
@ -1331,7 +1331,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0"
},
"funding": [
{
@ -1347,24 +1347,24 @@
"type": "tidelift"
}
],
"time": "2024-05-31T15:07:36+00:00"
"time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/polyfill-php81",
"version": "v1.30.0",
"version": "v1.31.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php81.git",
"reference": "3fb075789fb91f9ad9af537c4012d523085bd5af"
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/3fb075789fb91f9ad9af537c4012d523085bd5af",
"reference": "3fb075789fb91f9ad9af537c4012d523085bd5af",
"url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
"reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c",
"shasum": ""
},
"require": {
"php": ">=7.1"
"php": ">=7.2"
},
"type": "library",
"extra": {
@ -1407,7 +1407,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php81/tree/v1.30.0"
"source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0"
},
"funding": [
{
@ -1423,24 +1423,25 @@
"type": "tidelift"
}
],
"time": "2024-06-19T12:30:46+00:00"
"time": "2024-09-09T11:45:10+00:00"
},
{
"name": "symfony/yaml",
"version": "v7.1.1",
"version": "v7.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "fa34c77015aa6720469db7003567b9f772492bf2"
"reference": "099581e99f557e9f16b43c5916c26380b54abb22"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/fa34c77015aa6720469db7003567b9f772492bf2",
"reference": "fa34c77015aa6720469db7003567b9f772492bf2",
"url": "https://api.github.com/repos/symfony/yaml/zipball/099581e99f557e9f16b43c5916c26380b54abb22",
"reference": "099581e99f557e9f16b43c5916c26380b54abb22",
"shasum": ""
},
"require": {
"php": ">=8.2",
"symfony/deprecation-contracts": "^2.5|^3.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
@ -1478,7 +1479,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v7.1.1"
"source": "https://github.com/symfony/yaml/tree/v7.2.0"
},
"funding": [
{
@ -1494,26 +1495,26 @@
"type": "tidelift"
}
],
"time": "2024-05-31T14:57:53+00:00"
"time": "2024-10-23T06:56:12+00:00"
},
{
"name": "twig/markdown-extra",
"version": "v3.11.0",
"version": "v3.16.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/markdown-extra.git",
"reference": "504557d60d80478260ebd2221a2b3332a480865d"
"reference": "25f23c02936f8c7157a8413154c06a462c9c20d3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/markdown-extra/zipball/504557d60d80478260ebd2221a2b3332a480865d",
"reference": "504557d60d80478260ebd2221a2b3332a480865d",
"url": "https://api.github.com/repos/twigphp/markdown-extra/zipball/25f23c02936f8c7157a8413154c06a462c9c20d3",
"reference": "25f23c02936f8c7157a8413154c06a462c9c20d3",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"php": ">=8.0.2",
"symfony/deprecation-contracts": "^2.5|^3",
"twig/twig": "^3.0"
"twig/twig": "^3.13|^4.0"
},
"require-dev": {
"erusev/parsedown": "^1.7",
@ -1554,7 +1555,7 @@
"twig"
],
"support": {
"source": "https://github.com/twigphp/markdown-extra/tree/v3.11.0"
"source": "https://github.com/twigphp/markdown-extra/tree/v3.16.0"
},
"funding": [
{
@ -1566,31 +1567,31 @@
"type": "tidelift"
}
],
"time": "2024-08-07T17:34:09+00:00"
"time": "2024-09-03T20:17:35+00:00"
},
{
"name": "twig/twig",
"version": "v3.11.0",
"version": "v3.16.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "e80fb8ebba85c7341a97a9ebf825d7fd4b77708d"
"reference": "475ad2dc97d65d8631393e721e7e44fb544f0561"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/e80fb8ebba85c7341a97a9ebf825d7fd4b77708d",
"reference": "e80fb8ebba85c7341a97a9ebf825d7fd4b77708d",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/475ad2dc97d65d8631393e721e7e44fb544f0561",
"reference": "475ad2dc97d65d8631393e721e7e44fb544f0561",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"php": ">=8.0.2",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3",
"symfony/polyfill-php80": "^1.22",
"symfony/polyfill-php81": "^1.29"
},
"require-dev": {
"phpstan/phpstan": "^2.0",
"psr/container": "^1.0|^2.0",
"symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0"
},
@ -1634,7 +1635,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v3.11.0"
"source": "https://github.com/twigphp/Twig/tree/v3.16.0"
},
"funding": [
{
@ -1646,7 +1647,7 @@
"type": "tidelift"
}
],
"time": "2024-08-08T16:15:16+00:00"
"time": "2024-11-29T08:27:05+00:00"
}
],
"packages-dev": [],

View file

@ -1,7 +1,7 @@
const BANNER_TIME = 600 * 1000.0
// const BANNER_ANIMATION = "opacity 0.8s linear, transform 0.1s linear"
const BANNER_ANIMATION = "opacity 0.8s linear"
const BANNER_ANIMATION = "opacity 0.8s linear, transform 1s linear"
// const BANNER_ANIMATION = "opacity 0.8s linear"
class BannerHandler {
@ -73,7 +73,7 @@ class BannerHandler {
const bannerPercentage = (bannerPercentageFrom + (bannerPercentageTo - bannerPercentageFrom) * this.currentPhase)
const banner_top = (1-bannerPercentage) * bannerTranslateMax
this.bannerDOM.style.transform = "translateY(" + banner_top + 'px' + ")"
this.bannerDOM.style.transform = "translateZ(0.1px) translateY(" + banner_top + 'px)'
}
fadeOut() {

View file

@ -34,6 +34,12 @@ body {
--text_1: #FFFFFF;
--text_border: #A0A0A080;
--content-width: min(100vw, calc(20rem + 40vw));
--content-total-margin: calc(calc(100vw - var(--content-width)) / 2);
--content-padding: max(0.5rem, min(1rem, var(--content-total-margin)));
--content-margin: max(0px, calc(var(--content-total-margin) - 1rem));
color: var(--text_1);
background: var(--bg_1);
margin: 0px;
@ -51,6 +57,17 @@ body {
}
}
@media only screen and (max-width: 1000px) {
#toc_container {
display: none !important;
visibility: hidden !important;
}
#main_content_flexbox:before {
flex: 0.5 0 0 !important;
}
}
:link {
color: var(--highlight_1);
font-style: italic;
@ -127,19 +144,31 @@ a:hover {
scroll-margin-top: 6rem;
}
#main_content_flexbox {
width: 100vw;
display: flex;
justify-content: left;
align-items: flex-start;
padding-left: 1em;
padding-right: 1em;
&:before {
content: '';
flex: 0.2 0 0;
}
}
#main_content_wrapper {
--content-width: min(100vw, calc(20rem + 40vw));
--content-total-margin: calc(calc(100vw - var(--content-width)) / 2);
/*padding: 0rem var(--content-padding) 1rem var(--content-padding);*/
/*width: var(--content-width);*/
flex: 0 1 var(--content-width);
--content-padding: max(0.5rem, min(1rem, var(--content-total-margin)));
--content-margin: max(0px, calc(var(--content-total-margin) - 1rem));
padding: 0rem var(--content-padding) 1rem var(--content-padding);
width: auto;
margin-left: var(--content-margin);
margin-right: var(--content-margin);
/*margin-left: calc(var(--content-margin));
//margin-right: var(--content-margin);*/
margin-top: 0px;
min-height: 100%;

View file

@ -15,6 +15,8 @@
flex-direction: row;
justify-content: left;
height: 2.3rem;
list-style-type: none;
padding: 0px;
@ -30,6 +32,8 @@
& > ._path {
width: 100%;
height: 1.5rem;
font-style: italic;
padding-left: 0.5rem;

View file

@ -5,11 +5,9 @@
top: 0px;
width: calc(var(--content-margin) - 2em);
margin-left: 2em;
flex: 0.1 0 15em;
padding-top: 0.8em;
padding-right: 0.5em;
padding-right: 0.3em;
padding-bottom: 0.5em;
border-radius: 0 0em 0em 0.5em;
@ -52,7 +50,7 @@
list-style: none;
}
& li {
& > li {
border-radius: 0.2em;
border-bottom: 1px solid transparent;

View file

@ -182,7 +182,7 @@ class TocNavBarUpdater {
trackingRebuildCallback() {
this._removeNavbarElements();
this.navbar_dom = document.querySelector('.navbar ._path');
this.navbar_dom = document.querySelector('#main_navbar_path');
}
trackingUpdateCallback(element) {

View file

@ -4,7 +4,7 @@
{{ page.basename }}
</li>
</menu>
<menu class="_path">
<menu class="_path" id="main_navbar_path">
{% set split_post = page.path |split('/') %}
{% for i in range(0, split_post|length - 1) %}
<li>

View file

@ -91,17 +91,28 @@
</menu>
</header>
<nav id="toc" class="table_of_contents">
</nav>
<div id="main_content_flexbox">
<nav id="toc_container" class="table_of_contents navbar">
<div class="_titles">
</div>
<div class="_path">
toc
</div>
<main id="main_content_wrapper">
{% block main_content %}
<h3>This here should have been replaced by content.
</h3>
If you can see this, complain to your nearest dragon.
{% endblock %}
</main>
<div id="toc">
</div>
</nav>
<main id="main_content_wrapper">
{% block main_content %}
<h3>This here should have been replaced by content.
</h3>
If you can see this, complain to your nearest dragon.
{% endblock %}
</main>
</div>
<footer id="main_footer">
{% block main_footer %}