From 61ff9ff05f961dd0f88f696d60c8de61d097bb50 Mon Sep 17 00:00:00 2001 From: lubiana Date: Sun, 15 Jun 2025 02:25:20 +0200 Subject: [PATCH 1/8] upi --- deploy/systemd/container-saufen-caddy.service | 8 +++--- deploy/systemd/container-saufen-php.service | 18 ++++++------- deploy/systemd/pod-saufen.service | 26 +++++++++---------- deploy/update.sh | 2 ++ 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/deploy/systemd/container-saufen-caddy.service b/deploy/systemd/container-saufen-caddy.service index 1d421a1..74111ee 100644 --- a/deploy/systemd/container-saufen-caddy.service +++ b/deploy/systemd/container-saufen-caddy.service @@ -1,9 +1,9 @@ -# container-futtern-caddy.service +# container-saufen-caddy.service # autogenerated by Podman 4.3.1 # Sun Jun 23 05:33:51 UTC 2024 [Unit] -Description=Podman container-futtern-caddy.service +Description=Podman container-saufen-caddy.service Documentation=man:podman-generate-systemd(1) Wants=network-online.target After=network-online.target @@ -21,11 +21,11 @@ ExecStart=/usr/bin/podman run \ --cidfile=%t/%n.ctr-id \ --cgroups=no-conmon \ --rm \ - --pod-id-file %t/pod-futtern.pod-id \ + --pod-id-file %t/pod-saufen.pod-id \ --sdnotify=conmon \ --replace \ -d \ - --name futtern-caddy \ + --name saufen-caddy \ --volume %h/saufen/etc/caddy/Caddyfile:/etc/caddy/Caddyfile \ --volume %h/saufen/app:/var/www/html \ --volume caddy_data:/data docker.io/caddy/caddy:alpine diff --git a/deploy/systemd/container-saufen-php.service b/deploy/systemd/container-saufen-php.service index 8701c04..91e0153 100644 --- a/deploy/systemd/container-saufen-php.service +++ b/deploy/systemd/container-saufen-php.service @@ -1,15 +1,15 @@ -# container-futtern-php.service +# container-saufen-php.service # autogenerated by Podman 4.3.1 # Sun Jun 23 05:33:51 UTC 2024 [Unit] -Description=Podman container-futtern-php.service +Description=Podman container-saufen-php.service Documentation=man:podman-generate-systemd(1) Wants=network-online.target After=network-online.target RequiresMountsFor=%t/containers -BindsTo=pod-futtern.service -After=pod-futtern.service +BindsTo=pod-saufen.service +After=pod-saufen.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n @@ -21,14 +21,14 @@ ExecStart=/usr/bin/podman run \ --cidfile=%t/%n.ctr-id \ --cgroups=no-conmon \ --rm \ - --pod-id-file %t/pod-futtern.pod-id \ + --pod-id-file %t/pod-saufen.pod-id \ --sdnotify=conmon \ --replace \ -d \ - --name futtern-php \ - --volume %h/futtern/etc/php84/php-fpm.d/www.conf:/etc/php84/php-fpm.d/www.conf \ - --volume %h/futtern/app:/var/www/html \ - --volume %h/futtern/app/var:/var/www/html/var \ + --name saufen-php \ + --volume %h/saufen/etc/php84/php-fpm.d/www.conf:/etc/php84/php-fpm.d/www.conf \ + --volume %h/saufen/app:/var/www/html \ + --volume %h/saufen/app/var:/var/www/html/var \ --env APP_ENV=prod \ --env APP_SECRET=UwUtHiSisNotSecurePlZcHanGeMe \ git.php.fail/lubiana/container/php:8.4-fpm diff --git a/deploy/systemd/pod-saufen.service b/deploy/systemd/pod-saufen.service index 10a8fb0..713cc03 100644 --- a/deploy/systemd/pod-saufen.service +++ b/deploy/systemd/pod-saufen.service @@ -1,41 +1,41 @@ -# pod-futtern.service +# pod-saufen.service # autogenerated by Podman 4.3.1 # Sun Jun 23 05:33:51 UTC 2024 [Unit] -Description=Podman pod-futtern.service +Description=Podman pod-saufen.service Documentation=man:podman-generate-systemd(1) Wants=network-online.target After=network-online.target RequiresMountsFor=/run/user/%U/containers -Wants=container-futtern-caddy.service container-futtern-php.service -Before=container-futtern-caddy.service container-futtern-php.service +Wants=container-saufen-caddy.service container-saufen-php.service +Before=container-saufen-caddy.service container-saufen-php.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n Restart=on-failure TimeoutStopSec=70 ExecStartPre=/bin/rm \ - -f %t/pod-futtern.pid %t/pod-futtern.pod-id + -f %t/pod-saufen.pid %t/pod-saufen.pod-id ExecStartPre=/usr/bin/podman pod create \ - --infra-conmon-pidfile %t/pod-futtern.pid \ - --pod-id-file %t/pod-futtern.pod-id \ + --infra-conmon-pidfile %t/pod-saufen.pid \ + --pod-id-file %t/pod-saufen.pod-id \ --exit-policy=stop \ --label io.containers.autoupdate=registry \ - --name futtern \ - -p 8087:8087 \ + --name saufen \ + -p 8090:8090 \ --replace ExecStart=/usr/bin/podman pod start \ - --pod-id-file %t/pod-futtern.pod-id + --pod-id-file %t/pod-saufen.pod-id ExecStop=/usr/bin/podman pod stop \ --ignore \ - --pod-id-file %t/pod-futtern.pod-id \ + --pod-id-file %t/pod-saufen.pod-id \ -t 10 ExecStopPost=/usr/bin/podman pod rm \ --ignore \ -f \ - --pod-id-file %t/pod-futtern.pod-id -PIDFile=%t/pod-futtern.pid + --pod-id-file %t/pod-saufen.pod-id +PIDFile=%t/pod-saufen.pid Type=forking [Install] diff --git a/deploy/update.sh b/deploy/update.sh index a03c457..6b97afa 100755 --- a/deploy/update.sh +++ b/deploy/update.sh @@ -5,4 +5,6 @@ systemctl --user start pod-saufen sleep 2 podman exec -it saufen-php /var/www/html/bin/console cache:clear podman exec -it saufen-php /var/www/html/bin/console cache:warmup +podman exec -it saufen-php /var/www/html/bin/console asset-map:compile + echo 'yes' | podman exec -it saufen-php /var/www/html/bin/console doctrine:migrations:migrate From 8793f9736a60296f54f386a83af29e15763dafda Mon Sep 17 00:00:00 2001 From: lubiana Date: Mon, 16 Jun 2025 17:45:11 +0200 Subject: [PATCH 2/8] loggilog; --- composer.json | 1 + composer.lock | 264 +++++++++++++++++++++++++++++++++++- config/bundles.php | 4 + config/packages/monolog.php | 97 +++++++++++++ symfony.lock | 12 ++ 5 files changed, 377 insertions(+), 1 deletion(-) create mode 100644 config/packages/monolog.php diff --git a/composer.json b/composer.json index 151aac7..9c6d20c 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "symfony/flex": "^2.7.1", "symfony/form": "7.3.*", "symfony/framework-bundle": "7.3.*", + "symfony/monolog-bundle": "^3.10", "symfony/runtime": "7.3.*", "symfony/security-csrf": "7.3.*", "symfony/twig-bundle": "7.3.*", diff --git a/composer.lock b/composer.lock index 32fe8cd..bada032 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "1fe9f53b59a2962c86116a6fed3b749e", + "content-hash": "ff70516970cc999b1ffcfbb3ec084ee4", "packages": [ { "name": "composer/semver", @@ -1304,6 +1304,109 @@ }, "time": "2025-01-24T11:45:48+00:00" }, + { + "name": "monolog/monolog", + "version": "3.9.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/10d85740180ecba7896c87e06a166e0c95a0e3b6", + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2 || ^2.0", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "php-console/php-console": "^3.1.8", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.17 || ^11.0.7", + "predis/predis": "^1.1 || ^2", + "rollbar/rollbar": "^4.0", + "ruflin/elastica": "^7 || ^8", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "https://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/3.9.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2025-03-24T10:02:05+00:00" + }, { "name": "psr/cache", "version": "3.0.0", @@ -3432,6 +3535,165 @@ ], "time": "2025-05-29T07:47:32+00:00" }, + { + "name": "symfony/monolog-bridge", + "version": "v7.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bridge.git", + "reference": "1b188c8abbbef25b111da878797514b7a8d33990" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/1b188c8abbbef25b111da878797514b7a8d33990", + "reference": "1b188c8abbbef25b111da878797514b7a8d33990", + "shasum": "" + }, + "require": { + "monolog/monolog": "^3", + "php": ">=8.2", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/console": "<6.4", + "symfony/http-foundation": "<6.4", + "symfony/security-core": "<6.4" + }, + "require-dev": { + "symfony/console": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/mailer": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/security-core": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "symfony-bridge", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Monolog\\": "" + }, + "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": "Provides integration for Monolog with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/monolog-bridge/tree/v7.3.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": "2025-03-21T12:17:46+00:00" + }, + { + "name": "symfony/monolog-bundle", + "version": "v3.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bundle.git", + "reference": "414f951743f4aa1fd0f5bf6a0e9c16af3fe7f181" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/414f951743f4aa1fd0f5bf6a0e9c16af3fe7f181", + "reference": "414f951743f4aa1fd0f5bf6a0e9c16af3fe7f181", + "shasum": "" + }, + "require": { + "monolog/monolog": "^1.25.1 || ^2.0 || ^3.0", + "php": ">=7.2.5", + "symfony/config": "^5.4 || ^6.0 || ^7.0", + "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", + "symfony/http-kernel": "^5.4 || ^6.0 || ^7.0", + "symfony/monolog-bridge": "^5.4 || ^6.0 || ^7.0" + }, + "require-dev": { + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/phpunit-bridge": "^6.3 || ^7.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MonologBundle\\": "" + }, + "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": "Symfony MonologBundle", + "homepage": "https://symfony.com", + "keywords": [ + "log", + "logging" + ], + "support": { + "issues": "https://github.com/symfony/monolog-bundle/issues", + "source": "https://github.com/symfony/monolog-bundle/tree/v3.10.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": "2023-11-06T17:08:13+00:00" + }, { "name": "symfony/options-resolver", "version": "v7.3.0", diff --git a/config/bundles.php b/config/bundles.php index 1bc42c7..cd115f2 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -9,6 +9,7 @@ use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle; use Symfony\Bundle\MakerBundle\MakerBundle; use Symfony\Bundle\WebProfilerBundle\WebProfilerBundle; use Twig\Extra\TwigExtraBundle\TwigExtraBundle; +use Symfony\Bundle\MonologBundle\MonologBundle; return [ FrameworkBundle::class => [ @@ -33,4 +34,7 @@ return [ TwigExtraBundle::class => [ 'all' => true, ], + MonologBundle::class => [ + 'all' => true, + ], ]; diff --git a/config/packages/monolog.php b/config/packages/monolog.php new file mode 100644 index 0000000..6ed98ce --- /dev/null +++ b/config/packages/monolog.php @@ -0,0 +1,97 @@ +extension('monolog', [ + 'channels' => [ + 'deprecation', + ], + ]); + if ($containerConfigurator->env() === 'dev') { + $containerConfigurator->extension('monolog', [ + 'handlers' => [ + 'main' => [ + 'type' => 'stream', + 'path' => '%kernel.logs_dir%/%kernel.environment%.log', + 'level' => 'debug', + 'channels' => [ + '!event', + ], + ], + 'console' => [ + 'type' => 'console', + 'process_psr_3_messages' => false, + 'channels' => [ + '!event', + '!doctrine', + '!console', + ], + ], + ], + ]); + } + if ($containerConfigurator->env() === 'test') { + $containerConfigurator->extension('monolog', [ + 'handlers' => [ + 'main' => [ + 'type' => 'fingers_crossed', + 'action_level' => 'error', + 'handler' => 'nested', + 'excluded_http_codes' => [ + 404, + 405, + ], + 'channels' => [ + '!event', + ], + ], + 'nested' => [ + 'type' => 'stream', + 'path' => '%kernel.logs_dir%/%kernel.environment%.log', + 'level' => 'debug', + ], + ], + ]); + } + if ($containerConfigurator->env() === 'prod') { + $containerConfigurator->extension('monolog', [ + 'handlers' => [ + 'main' => [ + 'type' => 'fingers_crossed', + 'action_level' => 'error', + 'handler' => 'nested', + 'excluded_http_codes' => [ + 404, + 405, + ], + 'buffer_size' => 50, + ], + 'nested' => [ + 'type' => 'stream', + 'path' => 'php://stderr', + 'level' => 'debug', + 'formatter' => 'monolog.formatter.json', + ], + 'console' => [ + 'type' => 'console', + 'process_psr_3_messages' => false, + 'channels' => [ + '!event', + '!doctrine', + ], + ], + 'deprecation' => [ + 'type' => 'stream', + 'channels' => [ + 'deprecation', + ], + 'path' => 'php://stderr', + 'formatter' => 'monolog.formatter.json', + ], + ], + ]); + } +}; diff --git a/symfony.lock b/symfony.lock index 92393f8..6368bfa 100644 --- a/symfony.lock +++ b/symfony.lock @@ -143,6 +143,18 @@ "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f" } }, + "symfony/monolog-bundle": { + "version": "3.10", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "3.7", + "ref": "aff23899c4440dd995907613c1dd709b6f59503f" + }, + "files": [ + "config/packages/monolog.yaml" + ] + }, "symfony/property-info": { "version": "7.3", "recipe": { From 252eac442e5b12a98cff823668d85e132a10c1c9 Mon Sep 17 00:00:00 2001 From: lubiana Date: Mon, 16 Jun 2025 18:14:44 +0200 Subject: [PATCH 3/8] move js files --- assets/app.js | 12 ++++++------ assets/{ => javascript}/emoji-footprint.js | 0 assets/{ => javascript}/modes.js | 0 assets/{ => javascript}/numberInputs.js | 0 assets/{ => javascript}/radioState.js | 0 assets/{ => javascript}/theme.js | 0 6 files changed, 6 insertions(+), 6 deletions(-) rename assets/{ => javascript}/emoji-footprint.js (100%) rename assets/{ => javascript}/modes.js (100%) rename assets/{ => javascript}/numberInputs.js (100%) rename assets/{ => javascript}/radioState.js (100%) rename assets/{ => javascript}/theme.js (100%) diff --git a/assets/app.js b/assets/app.js index 7aa7252..8ed6e87 100644 --- a/assets/app.js +++ b/assets/app.js @@ -10,11 +10,11 @@ import './styles/modes.css'; import './styles/emoji-footprint.css'; // Import modules -import './theme.js'; -import './emoji-footprint.js'; -import './modes.js'; -import { initNumberInputs } from './numberInputs.js'; -import { initRadioState } from './radioState.js'; +import './javascript/theme.js'; +import './javascript/emoji-footprint.js'; +import './javascript/modes.js'; +import { initNumberInputs } from './javascript/numberInputs.js'; +import { initRadioState } from './javascript/radioState.js'; // Initialize everything when DOM is ready document.addEventListener('DOMContentLoaded', function() { @@ -23,4 +23,4 @@ document.addEventListener('DOMContentLoaded', function() { // Initialize number inputs on page load initNumberInputs(); -}); \ No newline at end of file +}); diff --git a/assets/emoji-footprint.js b/assets/javascript/emoji-footprint.js similarity index 100% rename from assets/emoji-footprint.js rename to assets/javascript/emoji-footprint.js diff --git a/assets/modes.js b/assets/javascript/modes.js similarity index 100% rename from assets/modes.js rename to assets/javascript/modes.js diff --git a/assets/numberInputs.js b/assets/javascript/numberInputs.js similarity index 100% rename from assets/numberInputs.js rename to assets/javascript/numberInputs.js diff --git a/assets/radioState.js b/assets/javascript/radioState.js similarity index 100% rename from assets/radioState.js rename to assets/javascript/radioState.js diff --git a/assets/theme.js b/assets/javascript/theme.js similarity index 100% rename from assets/theme.js rename to assets/javascript/theme.js From 0d236677d4854d7b66a0b8f242a4aa38700ae97d Mon Sep 17 00:00:00 2001 From: lubiana Date: Mon, 16 Jun 2025 19:05:29 +0200 Subject: [PATCH 4/8] add first chartychaaaaarrrt --- importmap.php | 11 ++++++-- templates/drink_type/show.html.twig | 42 +++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/importmap.php b/importmap.php index fbddf9e..d13ef46 100644 --- a/importmap.php +++ b/importmap.php @@ -1,7 +1,5 @@ '5.3.6', 'type' => 'css', ], + 'chart.js' => [ + 'version' => '4.5.0', + ], + '@kurkle/color' => [ + 'version' => '0.3.4', + ], + 'chart.js/auto' => [ + 'version' => '4.5.0', + ], ]; diff --git a/templates/drink_type/show.html.twig b/templates/drink_type/show.html.twig index 9531d0a..7801144 100644 --- a/templates/drink_type/show.html.twig +++ b/templates/drink_type/show.html.twig @@ -50,6 +50,48 @@ +
+
+
+
+
Example Chart
+
+
+ + +
+
+
+
+
From f0c738362aebee9025313e4c29e176ac867c5fa3 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Mon, 16 Jun 2025 17:07:14 +0000 Subject: [PATCH 5/8] Continuous Integration Fixes --- importmap.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/importmap.php b/importmap.php index d13ef46..1dea2bd 100644 --- a/importmap.php +++ b/importmap.php @@ -1,5 +1,7 @@ Date: Mon, 16 Jun 2025 20:10:48 +0200 Subject: [PATCH 6/8] emojis --- assets/javascript/modes.js | 14 ++++ assets/styles/app.css | 15 +++- templates/base.html.twig | 67 ++++++++++++--- templates/drink_type/_delete_form.html.twig | 9 +- templates/drink_type/_form.html.twig | 7 +- .../drink_type/bulk_edit_stock.html.twig | 10 +-- .../bulk_edit_wanted_stock.html.twig | 16 ++-- templates/drink_type/edit.html.twig | 18 +++- templates/drink_type/index.html.twig | 75 +++++++++++++---- templates/drink_type/new.html.twig | 16 +++- templates/drink_type/show.html.twig | 82 ++++++++++++------- templates/form/theme.html.twig | 4 +- templates/index.html.twig | 55 ++++++++----- templates/order/_delete_form.html.twig | 4 +- templates/order/_form.html.twig | 37 +++++++-- templates/order/edit.html.twig | 8 +- templates/order/index.html.twig | 42 +++++++--- templates/order/new.html.twig | 6 +- templates/order/show.html.twig | 36 ++++---- templates/system_config/_form.html.twig | 2 +- templates/system_config/_reset_form.html.twig | 4 +- templates/system_config/edit.html.twig | 8 +- templates/system_config/index.html.twig | 18 ++-- tests/Feature/Web/BulkEditFormTest.php | 6 +- .../Web/BulkEditWantedStockFormTest.php | 6 +- tests/Feature/Web/HelloWorldTest.php | 2 +- .../Web/SystemConfigControllerTest.php | 8 +- 27 files changed, 401 insertions(+), 174 deletions(-) diff --git a/assets/javascript/modes.js b/assets/javascript/modes.js index 909348f..a288f32 100644 --- a/assets/javascript/modes.js +++ b/assets/javascript/modes.js @@ -1,7 +1,19 @@ // Bonkers mode functionality +function setEmojiLevelClass(mode) { + document.body.classList.remove('emoji-normal', 'emoji-enhanced', 'emoji-bonkers'); + if (mode === 'bonkers') { + document.body.classList.add('emoji-bonkers'); + } else if (mode === 'enhanced') { + document.body.classList.add('emoji-enhanced'); + } else { + document.body.classList.add('emoji-normal'); + } +} + function initBonkersMode() { // Check if we're in bonkers mode const currentMode = document.documentElement.getAttribute('data-website-mode'); + setEmojiLevelClass(currentMode); if (currentMode === 'bonkers') { // Apply bonkers mode immediately @@ -92,6 +104,7 @@ function watchModeChanges() { if (newMode === 'bonkers') { document.body.classList.add('bonkers-mode'); + setEmojiLevelClass(newMode); // Start the fabulous effects createExtraSparkles(); @@ -100,6 +113,7 @@ function watchModeChanges() { console.log('🌈✨ Switched to bonkers mode! ✨🌈'); } else { document.body.classList.remove('bonkers-mode'); + setEmojiLevelClass(newMode); console.log(`😴 Switched to ${newMode} mode`); } } diff --git a/assets/styles/app.css b/assets/styles/app.css index befa7ed..f0278fd 100644 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -117,4 +117,17 @@ --bs-info-bg-subtle: #00313D; --bs-warning-bg-subtle: #3E3D1C; --bs-danger-bg-subtle: #520E0E; - } \ No newline at end of file + } + +/* === EMOJI LEVELS === */ +.emoji-normal .emoji-normal { display: inline; } +.emoji-normal .emoji-enhanced, +.emoji-normal .emoji-bonkers { display: none; } + +.emoji-enhanced .emoji-enhanced { display: inline; } +.emoji-enhanced .emoji-normal, +.emoji-enhanced .emoji-bonkers { display: none; } + +.emoji-bonkers .emoji-bonkers { display: inline; } +.emoji-bonkers .emoji-normal, +.emoji-bonkers .emoji-enhanced { display: none; } \ No newline at end of file diff --git a/templates/base.html.twig b/templates/base.html.twig index c0dab35..3af52a6 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -8,7 +8,7 @@ "> - {% block title %}Welcome!{% endblock %} + {% block title %}Welcome! 🥵💦🍆💋👅😈😏🍑💕💖💗💘💝💞💟💌💏💑🍌🥒💦👀😉😌😍🥰😘😚😋😫😩🥺🥴💖💗💕💞💓💗💖💘💝💋💏💑{% endblock %} {% block stylesheets %} {% endblock %} @@ -19,29 +19,63 @@
- +