From b8f2dc6a56691115c0b62e529d6ec7646c6a7ca0 Mon Sep 17 00:00:00 2001 From: Audrey Jensen Date: Tue, 25 Jul 2023 21:34:20 +0000 Subject: [PATCH 1/2] implement MOTD below navbar --- config/packages/twig.yaml | 3 +++ templates/_header.html.twig | 1 - templates/_navbar.html.twig | 12 +++++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml index f9f4cc5..ad88610 100644 --- a/config/packages/twig.yaml +++ b/config/packages/twig.yaml @@ -1,6 +1,9 @@ twig: default_path: '%kernel.project_dir%/templates' + globals: + motd: '%env(MOTD)%' when@test: twig: strict_variables: true + diff --git a/templates/_header.html.twig b/templates/_header.html.twig index 92af358..0bf57f3 100644 --- a/templates/_header.html.twig +++ b/templates/_header.html.twig @@ -17,6 +17,5 @@
- \ No newline at end of file diff --git a/templates/_navbar.html.twig b/templates/_navbar.html.twig index 2345103..80c555f 100644 --- a/templates/_navbar.html.twig +++ b/templates/_navbar.html.twig @@ -37,4 +37,14 @@ - \ No newline at end of file + + {# Display MOTD, if one is set #} + {% if motd is defined and motd is not empty %} + + {% endif %} \ No newline at end of file From 5cf9443cc97d23089f3830b716e2caa6feb95dba Mon Sep 17 00:00:00 2001 From: Audrey Jensen Date: Tue, 25 Jul 2023 21:35:09 +0000 Subject: [PATCH 2/2] add empty MOTD to .env-prod --- .env-prod | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.env-prod b/.env-prod index 89ae291..c85e31b 100644 --- a/.env-prod +++ b/.env-prod @@ -1,5 +1,8 @@ APP_ENV=prod APP_SECRET=ba16d9b24f329be32408d0a9dc24a534 #Nothing. We're an open book and have no secrets +#Message of the Day +#If blank, no MOTD will be displayed on pages. +MOTD="" #Ticket Database file URIs. RP_DATABASE_URL=sqlite:///%kernel.project_dir%/RPCopy/CRParchive.db SP_DATABASE_URL=sqlite:///%kernel.project_dir%/RPCopy/CSParchive.db