Skip to content

16394 distinguish product edition #16924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion netbox/project-static/dist/netbox.css

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions netbox/project-static/img/motif.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 53 additions & 3 deletions netbox/project-static/styles/transitional/_navigation.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Navbar and light theme styling
.navbar-vertical.navbar-expand-lg {

// Background Gradient
background: linear-gradient(180deg, rgba(0, 133, 125, 0.00) 0%, rgba(0, 133, 125, 0.10) 100%), #FFF;

// Adjust hover color & style for menu items
.navbar-collapse {
.nav-link-icon {
Expand Down Expand Up @@ -49,6 +46,55 @@
}
}
}

// Ensures theme toggle appears above background image
.navbar-nav {
z-index: 1;
}

// Logo text for non-community editions
.navbar-brand {

// Reduce logo padding on mobile view
@include media-breakpoint-down(lg) {
padding: 0.2rem 0;
}

a:hover {
text-decoration: none;
}
.netbox-edition {
font-size: .7rem;
letter-spacing: .15rem;
text-align: center;
}
}

// Navigation geometric graphic for non-community editions
img.motif {
bottom: 0;
display: none;
left:0;
mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.30) 100%);
opacity: .5;
position: fixed;
user-drag: none;
user-select: none;
-moz-user-select: none;
-webkit-user-drag: none;
-webkit-user-select: none;
-ms-user-select: none;
width:18rem;

@include media-breakpoint-up(lg) {
display: block;
}
}
}

// Light theme styling
body[data-bs-theme=light] .navbar-vertical.navbar-expand-lg {
background: linear-gradient(180deg, rgba(0, 133, 125, 0.00) 0%, rgba(0, 133, 125, 0.10) 100%), #FFF;
}

// Dark theme styling
Expand Down Expand Up @@ -83,4 +129,8 @@ body[data-bs-theme=dark] .navbar-vertical.navbar-expand-lg {
.text-secondary {
color: $bright-teal!important;
}

img.motif {
opacity: .25;
}
}
6 changes: 6 additions & 0 deletions netbox/templates/base/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@

{# Sidebar #}
<aside class="navbar navbar-vertical navbar-expand-lg">

{% if settings.RELEASE.edition != 'Community' %}
<img class="motif" src="{% static 'motif.svg' %}" alt="{% trans "NetBox Motif" %}">
{% endif %}

<div class="container-fluid">

{# Menu toggle (mobile view) #}
Expand All @@ -32,6 +37,7 @@ <h1 class="navbar-brand">
<a href="{% url 'home' %}">
<img src="{% static 'logo_netbox_dark_teal.svg' %}" alt="{% trans "NetBox Logo" %}" class="navbar-brand-image hide-theme-dark">
<img src="{% static 'logo_netbox_bright_teal.svg' %}" alt="{% trans "NetBox Logo" %}" class="navbar-brand-image hide-theme-light">
<div class="netbox-edition fw-semibold mt-2">{{ settings.RELEASE.edition }}</div>
</a>
</h1>

Expand Down