From 5e25067a3495c920e632057da5919adfb086d0e0 Mon Sep 17 00:00:00 2001 From: Andrew Gormley Date: Fri, 19 Jul 2024 13:49:47 +0100 Subject: [PATCH] 16394 distinguish product edition (#16924) * closes #16907: web ui refresh * closes #16907: changed default widget color to primary color * closes #16907: removed comma * closes #16394: distinguish product edition * Revert dashboard changes * Clean up redundant styling (merge error) * removed labs logo and added sub text for all editions * fixed motif bug * Fix "flashing" of side nav under dark mode * Use title case for edition label * altered edition text style --------- Co-authored-by: Andrew Gormley Co-authored-by: Jeremy Stretch --- netbox/project-static/dist/netbox.css | Bin 556232 -> 557077 bytes netbox/project-static/img/motif.svg | 36 +++++++++++ .../styles/transitional/_navigation.scss | 56 +++++++++++++++++- netbox/templates/base/layout.html | 6 ++ 4 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 netbox/project-static/img/motif.svg diff --git a/netbox/project-static/dist/netbox.css b/netbox/project-static/dist/netbox.css index 94a34ecb5681492bfaf3f7baae80ba49b77586d3..0d9ddb95df5ac752db2890adc76f51e02944c3e7 100644 GIT binary patch delta 505 zcmZvYy-OoO7{*E5O-4jgc%B3f-4hi2*u8ALpv;2kb;31*jiAMDc6Oa)XJ*aJoiRbM z*w#wrEd>7xA%%sAZHT^T@TZ0*`?>qG-7+cnNfX=f?@}9w)3RQK_6i03!lnmVv6^gePv_8QnSL>oRcd-b T0f)l& + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/netbox/project-static/styles/transitional/_navigation.scss b/netbox/project-static/styles/transitional/_navigation.scss index 4c16ab3de..1de4948b2 100644 --- a/netbox/project-static/styles/transitional/_navigation.scss +++ b/netbox/project-static/styles/transitional/_navigation.scss @@ -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 { @@ -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 @@ -83,4 +129,8 @@ body[data-bs-theme=dark] .navbar-vertical.navbar-expand-lg { .text-secondary { color: $bright-teal!important; } + + img.motif { + opacity: .25; + } } diff --git a/netbox/templates/base/layout.html b/netbox/templates/base/layout.html index fad748a2f..2f6030f24 100644 --- a/netbox/templates/base/layout.html +++ b/netbox/templates/base/layout.html @@ -20,6 +20,11 @@ Blocks: {# Sidebar #}