Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Remove collapsable Bootstrap navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
GilOliveira committed Mar 12, 2024
1 parent 8e19590 commit 294b941
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 17 deletions.
1 change: 1 addition & 0 deletions components/organisms/navbar/navbar.component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ $schema: https://git.drupalcode.org/project/drupal/-/raw/10.2.x/core/modules/sdc
name: Navbar
status: experimental
description: Navbar component
replaces: 'varbase_components:navbar'
props:
type: object
properties:
Expand Down
22 changes: 21 additions & 1 deletion components/organisms/navbar/navbar.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*!
* Bootstrap v5.3.2 (https://getbootstrap.com/)
* Copyright 2011-2023 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/

[data-bs-theme=light] .navbar {
background: var(--bs-white);
}

[data-bs-theme=dark] .navbar {
background: #084298;
}

.navbar {
height: 5.25rem;
}

.navbar .form-inline .form-actions {
display: none;
}
Expand All @@ -6,11 +24,13 @@
z-index: 1200;
}

[dir="ltr"] .toolbar-horizontal .toolbar-menu.nav {
.toolbar-horizontal .toolbar-menu.nav {

float: left;
}

[dir="rtl"] .toolbar-horizontal .toolbar-menu.nav {

float: right;
}

24 changes: 16 additions & 8 deletions components/organisms/navbar/navbar.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
@import "../../defaults"; // Global component defaults.

[data-bs-theme=light] {
.navbar {
background: var(--bs-white);
}
}

[data-bs-theme=dark] {
.navbar {
background: $blue-700;
}
}

.navbar {
height: 5.25rem;

.form-inline {
.form-actions {
display: none;
Expand All @@ -17,11 +33,3 @@
}
}
}

.nav-underline {
.nav-link {
&:focus {
border-bottom-color: $primary;
}
}
}
8 changes: 1 addition & 7 deletions components/organisms/navbar/navbar.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@
{% set container = container ?? false %}
{% set placement = placement ?? '' %}
{% set color = color ?? 'light' %}
{% set navbar_expand = navbar_expand ?? 'lg' %}
{% set utility_classes = utility_classes ? utility_classes : [] %}

{%
set classes = [
'navbar',
'navbar-expand-' ~ navbar_expand,
'justify-content-between',
'navbar-' ~ color,
'bg-' ~ color,
Expand All @@ -44,11 +42,7 @@
{{ branding }}
{% endblock %}

<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbar-collapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse">
<div>
{% block navigation %}
{{ navigation }}
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.components.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
// 'molecules/alert/alert': ['./components/molecules/alert/alert.scss'],
// 'molecules/tabs/tabs': ['./components/molecules/tabs/tabs.scss'],
// 'molecules/field-tags/field-tags': ['./components/molecules/field-tags/field-tags.scss'],
//'organisms/navbar/navbar': ['./components/organisms/navbar/navbar.scss'],
'organisms/navbar/navbar': ['./components/organisms/navbar/navbar.scss'],
// 'organisms/page-header/page-header': ['./components/organisms/page-header/page-header.scss'],
//'organisms/page-footer/page-footer': ['./components/organisms/page-footer/page-footer.scss'],
// 'organisms/page-better-login/page-better-login': ['./components/organisms/page-better-login/page-better-login.scss'],
Expand Down

0 comments on commit 294b941

Please sign in to comment.