From 2edca640fe5b12ab0b7f7a1e3593ea722c0f6f8d Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Mon, 12 Jun 2023 19:51:04 +0200 Subject: [PATCH] Fix borders in projects mega menu --- sass/_menu.scss | 6 +++++- sass/_teckids.scss | 5 ++++- templates/menu/projects.html | 30 ++++++++++++++++-------------- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/sass/_menu.scss b/sass/_menu.scss index 2debb9f1..27671cdb 100644 --- a/sass/_menu.scss +++ b/sass/_menu.scss @@ -40,4 +40,8 @@ .is-mega-menu-subtitle { padding: .375rem 1rem; } -} \ No newline at end of file +} + +.navbar-dropdown { + overflow: hidden; +} diff --git a/sass/_teckids.scss b/sass/_teckids.scss index ffad834b..dd5d8908 100644 --- a/sass/_teckids.scss +++ b/sass/_teckids.scss @@ -10,11 +10,14 @@ $project-colors: ( .menu-project-section { border-left: 0.5em solid; - margin-left: 1em; } @each $project in $projects { #menu-project-section-#{$project} { border-color: map-get($project-colors, $project); + + .is-mega-menu-title .is-mega-menu-subtitle { + color: map-get($project-colors, $project); + } } } diff --git a/templates/menu/projects.html b/templates/menu/projects.html index b4b7f280..fba1b3f3 100644 --- a/templates/menu/projects.html +++ b/templates/menu/projects.html @@ -1,19 +1,21 @@ {% set projects = get_taxonomy(kind = "projekt") %} -<div class="columns"> - {% for project in projects.items %} - <section class="column menu-project-section" id="menu-project-section-{{ project.slug }}"> - {% set section = get_section(path = "projekte/" ~ project.slug ~ "/_index.md") %} - <h1 class="title is-6 is-mega-menu-title">{{ section.title }}</h1> - <p class="is-mega-menu-subtitle">{{ section.description }}</p> +<div class="container is-fluid"> + <div class="columns"> + {% for project in projects.items %} + <section class="column menu-project-section" id="menu-project-section-{{ project.slug }}"> + {% set section = get_section(path = "projekte/" ~ project.slug ~ "/_index.md") %} + <h1 class="title is-6 is-mega-menu-title">{{ section.title }}</h1> + <p class="is-mega-menu-subtitle">{{ section.description }}</p> - {% for page in project.pages %} - <a class="navbar-item" href="{{ page.permalink }}"> - <div class="navbar-content"> - {{ page.title }} - </div> - </a> + {% for page in project.pages %} + <a class="navbar-item" href="{{ page.permalink }}"> + <div class="navbar-content"> + {{ page.title }} + </div> + </a> + {% endfor %} + </section> {% endfor %} - </section> - {% endfor %} + </div> </div> \ No newline at end of file -- GitLab