From 9e60830cd25f10395dffed3a6ccdbd2aa96b3884 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Sun, 14 Jul 2024 21:53:55 +0200 Subject: [PATCH] #4: Basic Header --- app/frontend/styles/components/header.scss | 17 ++++++ .../templates/components/header.html.twig | 59 ++++--------------- app/frontend/templates/icons/bars.svg.twig | 18 +++++- 3 files changed, 43 insertions(+), 51 deletions(-) create mode 100644 app/frontend/styles/components/header.scss diff --git a/app/frontend/styles/components/header.scss b/app/frontend/styles/components/header.scss new file mode 100644 index 0000000..40637c4 --- /dev/null +++ b/app/frontend/styles/components/header.scss @@ -0,0 +1,17 @@ +#header { + @apply flex h-12 p-2 gap-2 items-center; + @apply bg-gray-300 dark:bg-gray-700; + + &__logo { + @apply h-full dark:hidden; + } + + &__logo-dark { + @apply h-full hidden dark:block; + } + + &__logo-text { + @apply text-lg text-center text-black dark:text-white; + } + +} diff --git a/app/frontend/templates/components/header.html.twig b/app/frontend/templates/components/header.html.twig index fa0ed3a..b2de304 100644 --- a/app/frontend/templates/components/header.html.twig +++ b/app/frontend/templates/components/header.html.twig @@ -1,51 +1,14 @@ -
- Euph Logo - -

Euph

- - - -
- - -
- +

Euph

+ {% include 'components/burger-menu.html.twig' %}
- -{% macro nav_item(name, href, icon) %} -
  • - - {% include 'icons/' ~ icon ~ '.svg.twig' with {'class': 'w-6 h-6'} %} - {{ name }} - -
  • -{% endmacro %} diff --git a/app/frontend/templates/icons/bars.svg.twig b/app/frontend/templates/icons/bars.svg.twig index c66fcc8..24f49af 100644 --- a/app/frontend/templates/icons/bars.svg.twig +++ b/app/frontend/templates/icons/bars.svg.twig @@ -1,4 +1,16 @@ -