From 4e5244368683073378bfa93822f07b73ee6a9d37 Mon Sep 17 00:00:00 2001 From: Andrew Gormley Date: Tue, 16 Jul 2024 11:22:18 +0100 Subject: [PATCH] closes #16394: distinguish product edition --- netbox/project-static/dist/netbox.css | Bin 555255 -> 556224 bytes .../img/logo_netboxlabs_bright_teal.svg | 24 ++++++++ .../img/logo_netboxlabs_dark_teal.svg | 24 ++++++++ netbox/project-static/img/motif.svg | 36 +++++++++++ .../styles/transitional/_navigation.scss | 58 ++++++++++++++++++ netbox/templates/base/layout.html | 16 ++++- 6 files changed, 156 insertions(+), 2 deletions(-) create mode 100644 netbox/project-static/img/logo_netboxlabs_bright_teal.svg create mode 100644 netbox/project-static/img/logo_netboxlabs_dark_teal.svg 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 75b5b7b1e50da56b95ace2211a552f32b85ea954..03faeba0006c3de888215d43c5cbb7e412674118 100644 GIT binary patch delta 560 zcmZuuO-lk%6h)h7V_z=HLNq@D5si^?#K;*c-1QUMj{2N=>C6k~nWh8RR|zB3?A55r1dDXB zoZV_-Lup{fa8t03)Cw^*IV%<5>A|-O&-*9_w-tWg@$n^yp=x+)qGO`zOwMH`$D&QD zOo!4gN;(1*oh&pcBemWqQxucqRW&Aya5v(X=Uk1P8^cbETh_QiwW(@Q+Vieq!Ju8i#Vp*w6(*b1#EQ_y!kSQ>G&@R&oP;PlRu+LQR;kx(l9yV^8<;S>@C1z|{dKcreH h(^qsp%E3TK90cn8cI4xCuBUsJsa7iV4;uWF7M2#)7Pc1lEgWCcrz>T$icELN<=~vIUdpPqeRVd69Lsj4 I0*-k+02Wvh7XSbN diff --git a/netbox/project-static/img/logo_netboxlabs_bright_teal.svg b/netbox/project-static/img/logo_netboxlabs_bright_teal.svg new file mode 100644 index 000000000..e2dd3c2fa --- /dev/null +++ b/netbox/project-static/img/logo_netboxlabs_bright_teal.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/netbox/project-static/img/logo_netboxlabs_dark_teal.svg b/netbox/project-static/img/logo_netboxlabs_dark_teal.svg new file mode 100644 index 000000000..7ac19ef93 --- /dev/null +++ b/netbox/project-static/img/logo_netboxlabs_dark_teal.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/netbox/project-static/img/motif.svg b/netbox/project-static/img/motif.svg new file mode 100644 index 000000000..11a49f454 --- /dev/null +++ b/netbox/project-static/img/motif.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/netbox/project-static/styles/transitional/_navigation.scss b/netbox/project-static/styles/transitional/_navigation.scss index dc80af761..1d3271461 100644 --- a/netbox/project-static/styles/transitional/_navigation.scss +++ b/netbox/project-static/styles/transitional/_navigation.scss @@ -49,6 +49,57 @@ } } } + + // Ensures theme toggle appears above background image + .navbar-nav { + z-index: 1; + } + + // Logo text for non-community editions + .navbar-brand { + a:hover { + text-decoration: none; + } + .netbox-edition { + font-size: .6rem; + letter-spacing: .25rem; + text-align: center; + } + &-image-edition { + height: 1.2rem; + width: auto; + } + } + + // Navigation geometric graphic for non-community editions + .netbox-motif { + height: 100%; + left: 0; + position: absolute; + width: 100%; + + img { + bottom: 0; + mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.30) 100%); + opacity: .25; + position: absolute; + user-drag: none; + user-select: none; + -moz-user-select: none; + -webkit-user-drag: none; + -webkit-user-select: none; + -ms-user-select: none; + width:100%; + } + + @include media-breakpoint-up(lg) { + bottom: 0; + + img { + opacity: .5; + } + } + } } // Fixes bug where user loads page on dark mode, switches to light mode but filter is not removed @@ -93,4 +144,11 @@ body[data-bs-theme=dark] .navbar-vertical.navbar-expand-lg { .navbar-brand-autodark .navbar-brand-image { filter: none!important; } + + // Navigation geometric graphic for non-community editions + .netbox-motif { + img { + opacity: .25; + } + } } diff --git a/netbox/templates/base/layout.html b/netbox/templates/base/layout.html index c337d2441..e5d769730 100644 --- a/netbox/templates/base/layout.html +++ b/netbox/templates/base/layout.html @@ -22,6 +22,12 @@ Blocks: