Compare commits

..

No commits in common. "1f56280531987533e02b1da98c1d7caa21f6f0aa" and "ea66a88d776633f9e18159a93292a772e465ba2b" have entirely different histories.

64 changed files with 6975 additions and 950 deletions

11
.gitignore vendored
View File

@ -16,7 +16,10 @@ public/assets/
/node_modules/
/public/build/
###< pentatrion/vite-bundle ###
###> symfony/asset-mapper ###
/public/assets/
/assets/vendor/
###< symfony/asset-mapper ###
###> symfony/webpack-encore-bundle ###
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###

View File

@ -1,39 +0,0 @@
FROM php:8.3-apache AS runtime
ENV APACHE_DOCUMENT_ROOT=/var/www/website/public/
ENV WEBSITE_ROOT=/var/www/website/
ENV TZ=Europe/Brussels
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV DEBIAN_FRONTEND=noninteractive
COPY . ${APACHE_DOCUMENT_ROOT}
RUN sed -ri -e "s!/var/www/html!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/sites-available/*.conf
RUN sed -ri -e "s!/var/www/!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
RUN a2enmod rewrite
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin
RUN set -eux; \
chmod uga+x /usr/local/bin/install-php-extensions && sync
RUN set -eux;install-php-extensions intl zip
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
RUN printf "[PHP]\ndate.timezone = \"$TZ\"\n" > /usr/local/etc/php/conf.d/tzone.ini
COPY docker-resources/apache2-foreground /usr/local/bin/apache2-foreground
COPY docker-resources/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN set -eux; \
chmod uga+x /usr/local/bin/entrypoint.sh && \
chmod uga+x /usr/local/bin/apache2-foreground && sync
USER www-data
WORKDIR ${WEBSITE_ROOT}
RUN mv .env.sample .env
RUN composer install
RUN php bin/console asset-map:compile
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

View File

@ -1,22 +0,0 @@
import 'normalize.css/normalize.min.css';
import './styles/app.css';
document.addEventListener("readystatechange", event => {
if(event.target.readyState === 'complete') {
initExternalLinks();
}
});
function initExternalLinks() {
document.querySelectorAll('a').forEach(elem => {
if(isExternalURL(elem.getAttribute('href'))) {
elem.setAttribute('target', '_blank');
}
})
}
const isExternalURL = (url) => {
if(url.startsWith('/')) return false;
return new URL(url).origin !== location.origin;
}

View File

@ -1,48 +0,0 @@
@font-face {
font-family: 'Fira Code';
src: url('woff2/FiraCode-Light.woff2') format('woff2'),
url("woff/FiraCode-Light.woff") format("woff");
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: 'Fira Code';
src: url('woff2/FiraCode-Regular.woff2') format('woff2'),
url("woff/FiraCode-Regular.woff") format("woff");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Fira Code';
src: url('woff2/FiraCode-Medium.woff2') format('woff2'),
url("woff/FiraCode-Medium.woff") format("woff");
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: 'Fira Code';
src: url('woff2/FiraCode-SemiBold.woff2') format('woff2'),
url("woff/FiraCode-SemiBold.woff") format("woff");
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: 'Fira Code';
src: url('woff2/FiraCode-Bold.woff2') format('woff2'),
url("woff/FiraCode-Bold.woff") format("woff");
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: 'Fira Code VF';
src: url('woff2/FiraCode-VF.woff2') format('woff2-variations'),
url('woff/FiraCode-VF.woff') format('woff-variations');
/* font-weight requires a range: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide#Using_a_variable_font_font-face_changes */
font-weight: 300 700;
font-style: normal;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

56
assets/js/page.js Normal file
View File

@ -0,0 +1,56 @@
import '/assets/scss/page.scss';
let eastereggsurl = '/assets/js/eastereggstrings.json'
document.addEventListener("readystatechange", event => {
if(event.target.readyState === 'complete') {
initExternalLinks();
initEasterEgg();
}
});
function initExternalLinks() {
document.querySelectorAll('a').forEach(elem => {
if(isExternalURL(elem.getAttribute('href'))) {
elem.setAttribute('target', '_blank');
}
})
}
function initEasterEgg() {
document.body.addEventListener('click', evt => {
fetch(eastereggsurl)
.then((response) => {
if (!response.ok) {
return;
}
return response.json();
}).then((eastereggstrings) => {
let randomstring = Math.floor(Math.random() * eastereggstrings.length);
document.querySelector('.easter-egg').innerHTML = eastereggstrings[randomstring];
})
});
}
function isInteractiveElement(element) {
// Check if the element is an interactive element or triggers an event
return (
element.tagName === 'A' ||
element.tagName === 'BUTTON' ||
element.tagName === 'INPUT' ||
element.tagName === 'SELECT' ||
element.tagName === 'TEXTAREA' ||
element.getAttribute('onclick') !== null ||
element.getAttribute('onmousedown') !== null ||
element.getAttribute('onmouseup') !== null ||
element.getAttribute('onmouseover') !== null ||
element.getAttribute('onmouseout') !== null ||
element.getAttribute('onmousemove') !== null ||
element.getAttribute('oncontextmenu') !== null
);
}
const isExternalURL = (url) => {
if(url.startsWith('/')) return false;
return new URL(url).origin !== location.origin;
}

51
assets/scss/base.scss Normal file
View File

@ -0,0 +1,51 @@
@import "custom";
@import "/node_modules/bootstrap";
@import "fonts";
$black: #141414;
$orange: #d6972a;
$white: #f0f0f0;
$font: 'Fira Code', monospace;
body {
font-family: 'Mukta', sans-serif;
background-color: $white;
}
nav {
background-color: $black;
color: $orange;
ul {
display: flex;
justify-content: end;
list-style: none;
padding: 0;
margin: 0;
li {
width: 150px;
text-align: right;
}
}
}
header {
background-color: $black;
color: $orange;
}
main {
h1 {
background-color: $orange;
padding: 5px;
}
h2 {
background-color: $orange;
padding: 2px;
}
}
a {
color: $orange;
}

70
assets/scss/custom.scss Normal file
View File

@ -0,0 +1,70 @@
@import "/node_modules/bootstrap/scss/functions";
@import "/node_modules/bootstrap/scss/variables";
@import "/node_modules/bootstrap/scss/variables-dark";
@import "/node_modules/bootstrap/scss/maps";
@import "/node_modules/bootstrap/scss/utilities";
$utilities: map-merge(
$utilities,
(
"width":
map-merge(
map-get($utilities, "width"),
(
responsive: true,
values: map-merge(
map-get(map-get($utilities, "width"), "values"),
(
10: 10%,
20: 20%,
30: 30%,
40: 40%,
60: 60%,
70: 70%,
80: 80%,
90: 90%,
50p: 50px,
100p: 100px,
150p: 150px,
200p: 200px,
250p: 250px,
500p: 500px,
),
),
)
)
),
);
$utilities: map-merge(
$utilities,
(
"height":
map-merge(
map-get($utilities, "height"),
(
responsive: true,
values: map-merge(
map-get(map-get($utilities, "height"), "values"),
(
10: 10%,
20: 20%,
30: 30%,
40: 40%,
60: 60%,
70: 70%,
80: 80%,
90: 90%,
50p: 50px,
100p: 100px,
150p: 150px,
200p: 200px,
250p: 250px,
500p: 500px,
),
),
)
)
)
);

64
assets/scss/fonts.scss Normal file
View File

@ -0,0 +1,64 @@
/*! Generated by Font Squirrel (https://www.fontsquirrel.com) on March 21, 2023 */
@font-face {
font-family: 'Mukta';
src: url('../fonts/mukta-extrabold-webfont.woff2') format('woff2'),
url('../fonts/mukta-extrabold-webfont.woff') format('woff');
font-weight: 800;
font-style: normal;
}
@font-face {
font-family: 'Mukta';
src: url('../fonts/mukta-bold-webfont.woff2') format('woff2'),
url('../fonts/mukta-bold-webfont.woff') format('woff');
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: 'Mukta';
src: url('../fonts/mukta-semibold-webfont.woff2') format('woff2'),
url('../fonts/mukta-semibold-webfont.woff') format('woff');
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: 'Mukta';
src: url('../fonts/mukta-medium-webfont.woff2') format('woff2'),
url('../fonts/mukta-medium-webfont.woff') format('woff');
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: 'Mukta';
src: url('../fonts/mukta-regular-webfont.woff2') format('woff2'),
url('../fonts/mukta-regular-webfont.woff') format('woff');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Mukta';
src: url('../fonts/mukta-light-webfont.woff2') format('woff2'),
url('../fonts/mukta-light-webfont.woff') format('woff');
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: 'Mukta';
src: url('../fonts/mukta-extralight-webfont.woff2') format('woff2'),
url('../fonts/mukta-extralight-webfont.woff') format('woff');
font-weight: 200;
font-style: normal;
}

5
assets/scss/page.scss Normal file
View File

@ -0,0 +1,5 @@
@import 'base';
img {
max-width: 100%;
}

View File

@ -1,141 +0,0 @@
@import url('./vars.css');
@import url('../fonts/fira_code.css');
body, html {
height: 100vh;
}
body {
display: grid;
grid-template-columns: 2fr 10fr;
background-color: var(--main-background);
}
.sidebar {
display: flex;
flex-direction: column;
background-color: var(--sidebar-background);
color: var(--sidebar-text-color);
font-family: var(--sidebar-font);
height: 100%;
min-height: 100vh;
header {
padding: 15px;
text-align: center;
img {
border-radius: 50%;
width: 200px;
}
}
nav {
padding: 15px;
flex-grow: 1;
ul {
list-style: none;
padding: 0;
li {
padding: 15px 0;
a {
color: var(--sidebar-text-color);
}
}
}
}
footer {
text-align: center;
padding: 15px;
font-size: var(--sidebar-text-muted-size);
color: var(--sidebar-text-muted-color);
a {
color: var(--sidebar-text-muted-color);
}
}
}
main {
font-family: var(--main-font);
background-color: var(--main-background);
padding: 0 15px;
h1 {
font-weight: normal;
font-size: var(--main-h1-size);
margin: 5px 0;
}
h1:before {
color: var(--main-h1-before-color);
content: "# ";
}
h2 {
font-weight: normal;
margin: 5px 0;
}
h2:before {
content: "## ";
color: var(--main-h1-before-color);
font-size: var(--main-h2-size);
}
h3 {
font-weight: normal;
margin: 10px 0;
}
h3:before {
font-size: var(--main-h3-size);
}
p {
margin: 5px 0;
}
a {
color: var(--main-link-color);
}
img {
max-height: 250px;
}
ul {
padding: 0 15px;
margin: 5px;
li {
max-width: calc(100vw - 30px);
}
}
}
/* X-Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
}
/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
body {
grid-template-columns: 12fr;
}
.sidebar {
display: none;
}
}
/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
}
/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
}
/* X-Large devices (large desktops, less than 1400px) */
@media (max-width: 1399.98px) {
}

View File

@ -1,16 +0,0 @@
:root {
--sidebar-background: rgb(0, 0, 0);
--sidebar-text-color: rgb(255, 255, 255);
--sidebar-text-muted-color: rgb(192, 192, 192);
--sidebar-text-muted-size: 10px;
--sidebar-font: 'Fira Code', monospace;
--main-font: 'Fira Code', monospace;
--main-background: rgb(224, 224, 224);
--main-h1-size: 28px;
--main-h1-before-color: rgb(128,128,128);
--main-h2-size: 24px;
--main-h2-before-color: rgb(128,128,128);
--main-h3-size: 24px;
--main-link-color: rgb(64,64,64);
}

View File

@ -9,17 +9,14 @@
"ext-iconv": "*",
"erusev/parsedown": "^1.7",
"nelmio/security-bundle": "^3.4",
"symfony/asset": "^7.2",
"symfony/asset-mapper": "^7.2",
"symfony/console": "^7.2",
"symfony/dotenv": "^7.2",
"symfony/flex": "^2.4",
"symfony/framework-bundle": "^7.2",
"symfony/runtime": "^7.2",
"symfony/twig-bundle": "^7.2",
"symfony/yaml": "^7.2",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
"symfony/webpack-encore-bundle": "^2.1",
"symfony/yaml": "^7.2"
},
"config": {
"allow-plugins": {
@ -54,8 +51,7 @@
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"importmap:install": "symfony-cmd"
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"

481
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d717ff4c07f81f9c351b316ecfc40ac5",
"content-hash": "cc83f6a5f9c1f56634fa0d2a44c80077",
"packages": [
{
"name": "composer/ca-bundle",
@ -82,87 +82,6 @@
],
"time": "2024-11-27T15:35:25+00:00"
},
{
"name": "composer/semver",
"version": "3.4.3",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
"reference": "4313d26ada5e0c4edfbd1dc481a92ff7bff91f12",
"shasum": ""
},
"require": {
"php": "^5.3.2 || ^7.0 || ^8.0"
},
"require-dev": {
"phpstan/phpstan": "^1.11",
"symfony/phpunit-bridge": "^3 || ^7"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Semver\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nils Adermann",
"email": "naderman@naderman.de",
"homepage": "http://www.naderman.de"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
},
{
"name": "Rob Bast",
"email": "rob.bast@gmail.com",
"homepage": "http://robbast.nl"
}
],
"description": "Semver library that offers utilities, version constraint parsing and validation.",
"keywords": [
"semantic",
"semver",
"validation",
"versioning"
],
"support": {
"irc": "ircs://irc.libera.chat:6697/composer",
"issues": "https://github.com/composer/semver/issues",
"source": "https://github.com/composer/semver/tree/3.4.3"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2024-09-19T14:15:21+00:00"
},
{
"name": "erusev/parsedown",
"version": "1.7.4",
@ -558,85 +477,6 @@
],
"time": "2024-10-25T15:15:23+00:00"
},
{
"name": "symfony/asset-mapper",
"version": "v7.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/asset-mapper.git",
"reference": "ffb733232bb6bb85ef6a994f47c817e7c2ecab9c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/asset-mapper/zipball/ffb733232bb6bb85ef6a994f47c817e7c2ecab9c",
"reference": "ffb733232bb6bb85ef6a994f47c817e7c2ecab9c",
"shasum": ""
},
"require": {
"composer/semver": "^3.0",
"php": ">=8.2",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/filesystem": "^7.1",
"symfony/http-client": "^6.4|^7.0"
},
"conflict": {
"symfony/framework-bundle": "<6.4"
},
"require-dev": {
"symfony/asset": "^6.4|^7.0",
"symfony/browser-kit": "^6.4|^7.0",
"symfony/console": "^6.4|^7.0",
"symfony/event-dispatcher-contracts": "^3.0",
"symfony/finder": "^6.4|^7.0",
"symfony/framework-bundle": "^6.4|^7.0",
"symfony/http-foundation": "^6.4|^7.0",
"symfony/http-kernel": "^6.4|^7.0",
"symfony/web-link": "^6.4|^7.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\AssetMapper\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Maps directories of assets & makes them available in a public directory with versioned filenames.",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/asset-mapper/tree/v7.2.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-11-20T11:17:29+00:00"
},
{
"name": "symfony/cache",
"version": "v7.2.1",
@ -1779,179 +1619,6 @@
],
"time": "2024-12-07T13:24:01+00:00"
},
{
"name": "symfony/http-client",
"version": "v7.2.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client.git",
"reference": "339ba21476eb184290361542f732ad12c97591ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client/zipball/339ba21476eb184290361542f732ad12c97591ec",
"reference": "339ba21476eb184290361542f732ad12c97591ec",
"shasum": ""
},
"require": {
"php": ">=8.2",
"psr/log": "^1|^2|^3",
"symfony/deprecation-contracts": "^2.5|^3",
"symfony/http-client-contracts": "~3.4.4|^3.5.2",
"symfony/service-contracts": "^2.5|^3"
},
"conflict": {
"amphp/amp": "<2.5",
"php-http/discovery": "<1.15",
"symfony/http-foundation": "<6.4"
},
"provide": {
"php-http/async-client-implementation": "*",
"php-http/client-implementation": "*",
"psr/http-client-implementation": "1.0",
"symfony/http-client-implementation": "3.0"
},
"require-dev": {
"amphp/http-client": "^4.2.1|^5.0",
"amphp/http-tunnel": "^1.0|^2.0",
"amphp/socket": "^1.1",
"guzzlehttp/promises": "^1.4|^2.0",
"nyholm/psr7": "^1.0",
"php-http/httplug": "^1.0|^2.0",
"psr/http-client": "^1.0",
"symfony/amphp-http-client-meta": "^1.0|^2.0",
"symfony/dependency-injection": "^6.4|^7.0",
"symfony/http-kernel": "^6.4|^7.0",
"symfony/messenger": "^6.4|^7.0",
"symfony/process": "^6.4|^7.0",
"symfony/rate-limiter": "^6.4|^7.0",
"symfony/stopwatch": "^6.4|^7.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\HttpClient\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously",
"homepage": "https://symfony.com",
"keywords": [
"http"
],
"support": {
"source": "https://github.com/symfony/http-client/tree/v7.2.2"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-12-30T18:35:15+00:00"
},
{
"name": "symfony/http-client-contracts",
"version": "v3.5.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client-contracts.git",
"reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/ee8d807ab20fcb51267fdace50fbe3494c31e645",
"reference": "ee8d807ab20fcb51267fdace50fbe3494c31e645",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"type": "library",
"extra": {
"thanks": {
"url": "https://github.com/symfony/contracts",
"name": "symfony/contracts"
},
"branch-alias": {
"dev-main": "3.5-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\HttpClient\\": ""
},
"exclude-from-classmap": [
"/Test/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Generic abstractions related to HTTP clients",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"support": {
"source": "https://github.com/symfony/http-client-contracts/tree/v3.5.2"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-12-07T08:49:48+00:00"
},
{
"name": "symfony/http-foundation",
"version": "v7.2.0",
@ -3847,6 +3514,78 @@
],
"time": "2024-10-18T07:58:17+00:00"
},
{
"name": "symfony/webpack-encore-bundle",
"version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/webpack-encore-bundle.git",
"reference": "e335394b68a775a9b2bd173a8ba4fd2001f3870c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/webpack-encore-bundle/zipball/e335394b68a775a9b2bd173a8ba4fd2001f3870c",
"reference": "e335394b68a775a9b2bd173a8ba4fd2001f3870c",
"shasum": ""
},
"require": {
"php": ">=8.1.0",
"symfony/asset": "^5.4 || ^6.2 || ^7.0",
"symfony/config": "^5.4 || ^6.2 || ^7.0",
"symfony/dependency-injection": "^5.4 || ^6.2 || ^7.0",
"symfony/http-kernel": "^5.4 || ^6.2 || ^7.0",
"symfony/service-contracts": "^1.1.9 || ^2.1.3 || ^3.0"
},
"require-dev": {
"symfony/framework-bundle": "^5.4 || ^6.2 || ^7.0",
"symfony/http-client": "^5.4 || ^6.2 || ^7.0",
"symfony/phpunit-bridge": "^5.4 || ^6.2 || ^7.0",
"symfony/twig-bundle": "^5.4 || ^6.2 || ^7.0",
"symfony/web-link": "^5.4 || ^6.2 || ^7.0"
},
"type": "symfony-bundle",
"extra": {
"thanks": {
"url": "https://github.com/symfony/webpack-encore",
"name": "symfony/webpack-encore"
}
},
"autoload": {
"psr-4": {
"Symfony\\WebpackEncoreBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Integration of your Symfony app with Webpack Encore",
"support": {
"issues": "https://github.com/symfony/webpack-encore-bundle/issues",
"source": "https://github.com/symfony/webpack-encore-bundle/tree/v2.2.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-10-02T07:27:19+00:00"
},
{
"name": "symfony/yaml",
"version": "v7.2.0",
@ -3919,80 +3658,6 @@
],
"time": "2024-10-23T06:56:12+00:00"
},
{
"name": "twig/extra-bundle",
"version": "v3.18.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/twig-extra-bundle.git",
"reference": "9746573ca4bc1cd03a767a183faadaf84e0c31fa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/twig-extra-bundle/zipball/9746573ca4bc1cd03a767a183faadaf84e0c31fa",
"reference": "9746573ca4bc1cd03a767a183faadaf84e0c31fa",
"shasum": ""
},
"require": {
"php": ">=8.0.2",
"symfony/framework-bundle": "^5.4|^6.4|^7.0",
"symfony/twig-bundle": "^5.4|^6.4|^7.0",
"twig/twig": "^3.2|^4.0"
},
"require-dev": {
"league/commonmark": "^1.0|^2.0",
"symfony/phpunit-bridge": "^6.4|^7.0",
"twig/cache-extra": "^3.0",
"twig/cssinliner-extra": "^3.0",
"twig/html-extra": "^3.0",
"twig/inky-extra": "^3.0",
"twig/intl-extra": "^3.0",
"twig/markdown-extra": "^3.0",
"twig/string-extra": "^3.0"
},
"type": "symfony-bundle",
"autoload": {
"psr-4": {
"Twig\\Extra\\TwigExtraBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
}
],
"description": "A Symfony bundle for extra Twig extensions",
"homepage": "https://twig.symfony.com",
"keywords": [
"bundle",
"extra",
"twig"
],
"support": {
"source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.18.0"
},
"funding": [
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/twig/twig",
"type": "tidelift"
}
],
"time": "2024-09-26T19:22:23+00:00"
},
{
"name": "twig/twig",
"version": "v3.17.1",

View File

@ -3,7 +3,7 @@
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Nelmio\SecurityBundle\NelmioSecurityBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
];

View File

@ -1,11 +0,0 @@
framework:
asset_mapper:
# The paths to make available to the asset mapper.
paths:
- assets/
missing_import_mode: strict
when@prod:
framework:
asset_mapper:
missing_import_mode: warn

View File

@ -0,0 +1,45 @@
webpack_encore:
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
output_path: '%kernel.project_dir%/public/build'
# If multiple builds are defined (as shown below), you can disable the default build:
# output_path: false
# Set attributes that will be rendered on all script and link tags
script_attributes:
defer: true
# Uncomment (also under link_attributes) if using Turbo Drive
# https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change
# 'data-turbo-track': reload
# link_attributes:
# Uncomment if using Turbo Drive
# 'data-turbo-track': reload
# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
# crossorigin: 'anonymous'
# Preload all rendered script and link tags automatically via the HTTP/2 Link header
# preload: true
# Throw an exception if the entrypoints.json file is missing or an entry is missing from the data
# strict_mode: false
# If you have multiple builds:
# builds:
# frontend: '%kernel.project_dir%/public/frontend/build'
# pass the build name as the 3rd argument to the Twig functions
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
framework:
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
#when@prod:
# webpack_encore:
# # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
# # Available in version 1.2
# cache: true
#when@test:
# webpack_encore:
# strict_mode: false

BIN
dev-certs/website.test.der Normal file

Binary file not shown.

View File

@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAodMtQp4Q1zb291bh+m3AXiIt5w2LbAlC/d/MsnPRYhvB6OGV
/G6sucbaX04WVZ6Qarp7xSqoDOdzNuYen5jNjURFGliSoYXPgzVBxJ0jodoHWDJA
CGvg0vpJ2XbRReK8/wj7t0pLqg04tBQlRzrH9uNxmjNt1jxN6MKSeiu22vowjX93
HpFevAo5XAe+akU0dXrV6TQ7wRe9/s4gtk0IeiGcvyApSL68qi1v3BOe4By+r5Mv
hx7dham7eo8ioXM6ASPRPl1iIMrr/9ccnOGkpivaWfCBoXqr2xcPkA1ZXuSKk+Jg
FAo+QbjvnxCPyWq38UlexJp2eBm8VKPh0kMeCQIDAQABAoIBABrH9i+WNTdI02pv
qIpna3Sot2wLo81HYxzc0uWdoUNZUKgX3VifgFpmfHFVXQDicwgWwLEKtDEehMTL
JLpI8Yu1hrIrgmjU2ljekXnWf7Ujfh+sgUhjghuobFxe+5dTRO/4LqBQ3WDRO1ci
FmFJaxqC3aQlasIPzNz+hntNjL+EcPFbsVNuoepAuazDms0FrlkqJn3JlP91/5dg
xo3pVEDuJaC/v4eo8T0tJtexqKr9vPVpxmJ0+p3eZm9P3QTqXrmXex1GhZ4AyzF7
5tLgib6vPlRexkS6TRy3468RVU4cntzBbtmm7mO2m+BMMoUQNJtRSppMFcS9kIly
UwdEV3kCgYEAzV218WwKdmbKw1JUxvLkulG/mNgiipbRO5vCAd4PQWQG6mNpANbr
15zJOfaBnezuDRfqgicoFvXkoA4iWYR9D62NC4HbiKtvoRZmJtRy7baxn8TRa0HG
ow7Et08FZ6tMzl9Va7FN3rKRQnPgj5X9jCP8vsP/6AdDISE3DXDbAPMCgYEAybk8
sIjAFv/KD4SMCB2IJTIF7VYtbkvc4kcXsAkCGt8ZdMew64/6Pl0pM8CkpES+0Nzw
xB9yqryvtyn/ov/Nb0u/cpaP2UHYREvjSV3zNUcp3BWjZEaroqqv5fHjojgaSPEu
IFs8NQLVjA4/j0DpDF+wR4whI+BnEyDaSjeYxBMCgYAxP1u2PVZ09kmBdWjnHLBF
Df2IRaxi16/tP3jSwdGeuMH/yz8O+HsuBWcsAzUqDfs4IJgYBhPTDbx5tWn/VYo4
DEJalBV1PMdUNe7hOOkmoD0QNz6RHgDocU4zNzvwlF+izbHKVYZ69Q9ohClBxZI7
3RVrGc1wcu1iMHjnPD0IiQKBgD167VpIc3MPBoBwP1WB2qqrck8Bgtso1+tHC5sl
Q7T45gNHkU5aFUTIk/Qn9IX0RcvWarL7erE6zLsgW79MA0q2ZWUBKlpmzQkTr/P+
ZE+KnuFq3t+DAnCTYQTOEjiwrKIqj4phBBqMAJWtCgYZHG4fA9Tqincqv39+9cjE
5RRtAoGAa44YZeOB9yRlnbLfu4TcgZmgyJ71wbtwjaGb2GMxtX+GdpGKDwYZZvmp
/CRlivM2ePoNWgdJnky1V3Wz3XIQgE4ZupNRtODBoK2/BVSYe3mScxjF6D75ByVH
GiRkL+hj21IiJveNsMMxZpICfRIfohVMFMBSeaOp7mdl4B/lLlQ=
-----END RSA PRIVATE KEY-----

View File

@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDiTCCAnGgAwIBAgIIdAEzQmOCNAYwDQYJKoZIhvcNAQEFBQAwMDEVMBMGA1UE
AxMMd2Vic2l0ZS50ZXN0MRcwFQYDVQQKEw5zZWxmc2lnbmVkLm9yZzAeFw0yMzA4
MDQxMTIzNTRaFw0zMzA4MDQxMTIzNTRaMDAxFTATBgNVBAMTDHdlYnNpdGUudGVz
dDEXMBUGA1UEChMOc2VsZnNpZ25lZC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQCh0y1CnhDXNvb3VuH6bcBeIi3nDYtsCUL938yyc9FiG8Ho4ZX8
bqy5xtpfThZVnpBqunvFKqgM53M25h6fmM2NREUaWJKhhc+DNUHEnSOh2gdYMkAI
a+DS+knZdtFF4rz/CPu3SkuqDTi0FCVHOsf243GaM23WPE3owpJ6K7ba+jCNf3ce
kV68CjlcB75qRTR1etXpNDvBF73+ziC2TQh6IZy/IClIvryqLW/cE57gHL6vky+H
Ht2Fqbt6jyKhczoBI9E+XWIgyuv/1xyc4aSmK9pZ8IGheqvbFw+QDVle5IqT4mAU
Cj5BuO+fEI/JarfxSV7EmnZ4GbxUo+HSQx4JAgMBAAGjgaYwgaMwDAYDVR0TBAUw
AwEB/zALBgNVHQ8EBAMCAvQwOwYDVR0lBDQwMgYIKwYBBQUHAwEGCCsGAQUFBwMC
BggrBgEFBQcDAwYIKwYBBQUHAwQGCCsGAQUFBwMIMBEGCWCGSAGG+EIBAQQEAwIA
9zAXBgNVHREEEDAOggx3ZWJzaXRlLnRlc3QwHQYDVR0OBBYEFIEHbQqj84Ezt5TF
uYsN2j+InWKUMA0GCSqGSIb3DQEBBQUAA4IBAQBq2agTbeMW6R1R8fDJMaTbQMm9
Kg1asNi0iTucFle1H79A/QGBTdNvJwtKq9CGBobfuCZi2jz6feX8Fx0f+hlQ2hVG
RVrywheVhVBa+Dv1jnSLz5hssza0Xy/mKfaIeg9ulJlFNQ3FHuvPUILzJDdvpt0E
kG5kkwqmM9CQ2uqITRk5egihJEwqeXVbS3XV+2Qk1njpTafl8O/WLhMbeTsEmRHV
eftxOXobzJNriNESqyDzHg5Qx99TfjxX5pl4tEmEmCBjKwPfvEIaZutFd33RIiWy
D2WrqFolVT0IHB4ideCbuoRhLwuJlHovVZt8HW601TsIvoPKj2tmMR4eBDWp
-----END CERTIFICATE-----

BIN
dev-certs/website.test.pfx Normal file

Binary file not shown.

View File

@ -1,40 +0,0 @@
#!/bin/bash
set -e
# Note: we don't just use "apache2ctl" here because it itself is just a shell-script wrapper around apache2 which provides extra functionality like "apache2ctl start" for launching apache2 in the background.
# (also, when run as "apache2ctl <apache args>", it does not use "exec", which leaves an undesirable resident shell process)
: "${APACHE_CONFDIR:=/etc/apache2}"
: "${APACHE_ENVVARS:=$APACHE_CONFDIR/envvars}"
if test -f "$APACHE_ENVVARS"; then
. "$APACHE_ENVVARS"
fi
# Apache gets grumpy about PID files pre-existing
: "${APACHE_RUN_DIR:=/var/run/apache2}"
: "${APACHE_PID_FILE:=$APACHE_RUN_DIR/apache2.pid}"
rm -f "$APACHE_PID_FILE"
# create missing directories
# (especially APACHE_RUN_DIR, APACHE_LOCK_DIR, and APACHE_LOG_DIR)
for e in "${!APACHE_@}"; do
if [[ "$e" == *_DIR ]] && [[ "${!e}" == /* ]]; then
# handle "/var/lock" being a symlink to "/run/lock", but "/run/lock" not existing beforehand, so "/var/lock/something" fails to mkdir
# mkdir: cannot create directory '/var/lock': File exists
dir="${!e}"
while [ "$dir" != "$(dirname "$dir")" ]; do
dir="$(dirname "$dir")"
if [ -d "$dir" ]; then
break
fi
absDir="$(readlink -f "$dir" 2>/dev/null || :)"
if [ -n "$absDir" ]; then
mkdir -p "$absDir"
fi
done
mkdir -p "${!e}"
fi
done
exec apache2 -DFOREGROUND "$@"

View File

@ -1,121 +0,0 @@
#!/bin/bash
echo "Now in entrypoint.sh for Website"
echo "Script: 1.0.21 (2022-02-17)"
echo "User: '$(whoami)'"
echo "Group: '$(id -g -n)'"
echo "Working dir: '$(pwd)'"
# https://github.com/docker-library/wordpress/blob/master/docker-entrypoint.sh
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
# envs that can be appended with _FILE
envs=(
APP_ENV
APP_SECRET
DATADIR
TRUSTED_PROXIES
)
echo "Now parsing _FILE variables."
for e in "${envs[@]}"; do
file_env "$e"
done
echo "done!"
echo "Dump envs to .env..."
rm -rf .env
touch .env
for e in "${envs[@]}"; do
echo "$e=\"${!e}\"" >> .env
done
echo "Dump auto load..."
composer dump-autoload
echo "Current working dir is '$(pwd)'"
if [[ $DKR_BUILD_LOCALE == "true" ]]; then
echo "Will build all locales..."
locale-gen
else
echo "Will not build the locales..."
fi
echo "Current working dir is '$(pwd)'"
# there are 0 upgrade commands
if [[ $DKR_RUN_UPGRADE == "false" ]]; then
echo 'Will NOT run upgrade commands.'
else
echo 'Running upgrade commands...'
fi
# there are 0 verify commands
if [[ $DKR_RUN_VERIFY == "false" ]]; then
echo 'Will NOT run verification commands.'
else
echo 'Running verification commands...'
fi
# report commands
if [[ $DKR_RUN_REPORT == "false" ]]; then
echo 'Will NOT run report commands.'
else
echo 'Running report commands...'
fi
# set docker var.
export IS_DOCKER=true
if [ -z $APACHE_RUN_USER ]
then
APACHE_RUN_USER='www-data'
fi
if [ -z $APACHE_RUN_GROUP ]
then
APACHE_RUN_GROUP='www-data'
fi
if [[ $(stat -c '%U' $WEBSITE_ROOT) != $APACHE_RUN_USER ]];
then
chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $WEBSITE_ROOT
fi
# refresh commands
if [[ $DKR_RUN_REFRESH == "false" ]]; then
echo 'Will NOT run refresh commands.'
else
echo 'Running refresh commands...'
php $WEBSITE_ROOT/bin/console refresh
fi
php $WEBSITE_ROOT/bin/console cache:clear
php $WEBSITE_ROOT/bin/console cache:warm
echo "Go!"
exec apache2-foreground

View File

@ -1,26 +0,0 @@
<?php
/**
* Returns the importmap for this application.
*
* - "path" is a path inside the asset mapper system. Use the
* "debug:asset-map" command to see the full list of paths.
*
* - "entrypoint" (JavaScript only) set to true for any module that will
* be used as an "entrypoint" (and passed to the importmap() Twig function).
*
* The "importmap:require" command can be used to add new entries to this file.
*/
return [
'app' => [
'path' => './assets/app.js',
'entrypoint' => true,
],
'normalize.css' => [
'version' => '8.0.1',
],
'normalize.css/normalize.min.css' => [
'version' => '8.0.1',
'type' => 'css',
],
];

6358
package-lock.json generated Executable file

File diff suppressed because it is too large Load Diff

38
package.json Normal file
View File

@ -0,0 +1,38 @@
{
"name": "website",
"version": "1.0.0",
"description": "(c) 2021- Jeroen De Meerleer <me@jeroened.be>",
"main": "webpack.config.js",
"directories": {
"lib": "lib"
},
"dependencies": {
"bootstrap": "^5.3",
"js-cookie": "^3.0"
},
"devDependencies": {
"@babel/core": "^7.26",
"@babel/preset-env": "^7.26",
"@babel/plugin-proposal-class-properties": "^7.18",
"@symfony/webpack-encore": "^5.0",
"core-js": "^3.39",
"regenerator-runtime": "^0.14",
"sass": "^1.83",
"sass-loader": "^16.0",
"webpack": "^5.97",
"webpack-cli": "^5.1",
"webpack-notifier": "^1.15"
},
"license": "AGPL-3.0-or-later",
"private": true,
"scripts": {
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production --progress"
},
"repository": {
"type": "git",
"url": "https://git.jeroened.be/JeroenED/website.git"
},
"author": "Jeroen De Meerleer <me@jeroened.be>"
}

View File

@ -14,7 +14,7 @@ class DefaultController extends AbstractController
{
$return = $page->getPage($slug);
$response = new Response('', (int)$return['status']);
return $this->render('app.html.twig', $return, $response);
return $this->render('/page.html.twig', $return, $response);
}
#[Route('/error/{status}', name: 'error', requirements: ['status' => '[0-9]{3}'], priority: 2)]
@ -22,6 +22,6 @@ class DefaultController extends AbstractController
{
$return = $page->getPage('error/' . $status);
$response = new Response('', (int)$status);
return $this->render('app.html.twig', $return, $response);
return $this->render('/page.html.twig', $return, $response);
}
}

View File

@ -11,21 +11,6 @@
"config/packages/nelmio_security.yaml"
]
},
"symfony/asset-mapper": {
"version": "7.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "6.4",
"ref": "5ad1308aa756d58f999ffbe1540d1189f5d7d14a"
},
"files": [
"assets/app.js",
"assets/styles/app.css",
"config/packages/asset_mapper.yaml",
"importmap.php"
]
},
"symfony/console": {
"version": "6.0",
"recipe": {
@ -108,7 +93,20 @@
"config/routes/web_profiler.yaml"
]
},
"twig/extra-bundle": {
"version": "v3.18.0"
"symfony/webpack-encore-bundle": {
"version": "2.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "2.0",
"ref": "13ebe04e25085e2ff0bcb0f9218b561d8b5089f3"
},
"files": [
"assets/app.js",
"assets/styles/app.css",
"config/packages/webpack_encore.yaml",
"package.json",
"webpack.config.js"
]
}
}

View File

@ -1,47 +0,0 @@
<!DOCTYPE html>
<html class="h-100">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title }}{% if title is not empty %} :: {% endif %}Jeroen De Meerleer</title>
{{ importmap('app') }}
{% if css is defined and css is not empty %}
{% for sheet in css %}
<link rel="stylesheet" href="{{ sheet.file }}" integrity="sha384-{{ sheet.sha384 }}">
{% endfor %}
{% endif %}
{% if js is defined and js is not empty %}
{% for script in js %}
<script src="{{ script.file }}" integrity="sha384-{{ script.sha384 }}"></script>
{% endfor %}
{% endif %}
</head>
<body>
<div class="sidebar">
<header>
<div>
{{ header | raw }}
</div>
</header>
<nav>
<div>
{{ nav | raw }}
</div>
</nav>
<footer>
{{ footer | raw }}
</footer>
</div>
<main>
<div>
{{ content | raw }}
</div>
</main>
</body>
</html>

22
templates/base.html.twig Normal file
View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html class="h-100">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% endblock %}{% if block("title") is not empty %} :: {% endif %}Jeroen De Meerleer</title>
{% block styles %}{% endblock %}
{% block scripts %}{% endblock %}
</head>
<body class="d-flex flex-column h-100">
{% block content %}{% endblock %}
{% block extrahtml %}{% endblock %}
<footer class="footer mt-auto py-2">
{% block footer %}{% endblock %}
</footer>
</body>
</html>

42
templates/page.html.twig Executable file
View File

@ -0,0 +1,42 @@
{% extends "base.html.twig" %}
{% block title %}{{ title }}{% endblock %}
{% block content %}
<nav>
<div class="container py-3">
{{ nav | raw }}
</div>
</nav>
<header>
<div class="container py-4">
{{ header | raw }}
</div>
</header>
<main class="flex-shrink-0">
<div class="container py-4">
{{ content | raw }}
</div>
</main>
{% endblock %}
{% block styles %}
{{ encore_entry_link_tags('page') }}
{% if css is defined and css is not empty %}
{% for sheet in css %}
<link rel="stylesheet" href="{{ sheet.file }}" integrity="sha384-{{ sheet.sha384 }}">
{% endfor %}
{% endif %}
{% endblock %}
{% block scripts %}
{{ encore_entry_script_tags('page') }}
{% if js is defined and js is not empty %}
{% for script in js %}
<script src="{{ script.file }}" integrity="sha384-{{ script.sha384 }}"></script>
{% endfor %}
{% endif %}
{% endblock %}
{% block footer %}
{{ footer | raw }}
{% endblock %}

75
webpack.config.js Normal file
View File

@ -0,0 +1,75 @@
const Encore = require('@symfony/webpack-encore');
// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
Encore
// directory where compiled assets will be stored
.setOutputPath('public/build/')
// public path used by the web server to access the output path
.setPublicPath('/build')
// only needed for CDN's or subdirectory deploy
//.setManifestKeyPrefix('build/')
/*
* ENTRY CONFIG
*
* Each entry will result in one JavaScript file (e.g. app.js)
* and one CSS file (e.g. app.css) if your JavaScript imports CSS.
*/
.addEntry('page', './assets/js/page.js')
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)
//.enableStimulusBridge('./assets/controllers.json')
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
.splitEntryChunks()
// will require an extra script tag for runtime.js
// but, you probably want this, unless you're building a single-page app
.enableSingleRuntimeChunk()
/*
* FEATURE CONFIG
*
* Enable & configure other features below. For a full
* list of features, see:
* https://symfony.com/doc/current/frontend.html#adding-more-features
*/
.cleanupOutputBeforeBuild()
//.enableBuildNotifications()
.enableSourceMaps(!Encore.isProduction())
// enables hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction())
.configureBabel((config) => {
config.plugins.push('@babel/plugin-proposal-class-properties');
})
// enables @babel/preset-env polyfills
.configureBabelPresetEnv((config) => {
config.useBuiltIns = 'usage';
config.corejs = '3.23';
})
// enables Sass/SCSS support
.enableSassLoader()
// uncomment if you use TypeScript
//.enableTypeScriptLoader()
// uncomment if you use React
//.enableReactPreset()
// uncomment to get integrity="..." attributes on your script & link tags
// requires WebpackEncoreBundle 1.4 or higher
.enableIntegrityHashes()
// uncomment if you're having problems with a jQuery plugin
//.autoProvidejQuery()
;
module.exports = Encore.getWebpackConfig();