From 7d5f647cd380b6508703a04384f51deb3879ff84 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Sat, 24 Jul 2021 00:38:28 -0700 Subject: [PATCH] #6797: Improve home page shading --- netbox/project-static/dist/netbox-dark.css | Bin 692846 -> 693252 bytes netbox/project-static/dist/netbox-light.css | Bin 398401 -> 398671 bytes netbox/project-static/styles/netbox.scss | 16 ++++++++++++++++ netbox/templates/base/base.html | 2 +- netbox/templates/home.html | 2 +- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/netbox/project-static/dist/netbox-dark.css b/netbox/project-static/dist/netbox-dark.css index b1ee4229f29759bf5630b8e5fd87034e5de33f44..fadf89370e72d2ae17284ee1dfd9625c25daf265 100644 GIT binary patch delta 176 zcmaF2M5|?mRznM83sVbo3rh=Y3tJ0&3r7p*7Ovb$(|68hRhk?ynPqx|Iv1~SL1IaU zt&+Y{tb$&0eqKpxUWx8xgMB)11zZRP(^ngENls7L&dfgD_A;X~TnQ&!$@Ip2Rz)@} brXVQ^bmvl-zSfXSoKxA*+%U;7rIrf-G3YnS delta 31 mcmZo!q4jQwRznM83sVbo3rh=Y3tJ0&3r7p*7Ovb$j9dV?@Cqyd diff --git a/netbox/project-static/dist/netbox-light.css b/netbox/project-static/dist/netbox-light.css index b123125698911a75641cf704a05fa090dfba2179..6c740c96b22b4695e18391ac873fe62217ebc547 100644 GIT binary patch delta 195 zcmX@OLgM@?iG~)&7N!>F7M2#)Eo=@V0ZI8OmC-4QC5gIusU=DI6}kn9B^kC#`bx11 zddc~DC8>EOx*$3+GcUDB2cPQV)Wo9XjOm7(SR|)Qo?;c^gqt)y@D!`O4k@OAb+AE9 QoUE84JlWs~8&fS80CfRGDF6Tf delta 23 ecmX@VO5)%OiG~)&7N!>F7M2#)Eo=@Vj9dV29|unW diff --git a/netbox/project-static/styles/netbox.scss b/netbox/project-static/styles/netbox.scss index 9d8c124a8..90870f7dd 100644 --- a/netbox/project-static/styles/netbox.scss +++ b/netbox/project-static/styles/netbox.scss @@ -920,3 +920,19 @@ div.card > div.card-header > div.table-controls { background-color: $tab-content-bg; border-bottom: 1px solid $nav-tabs-border-color; } + +// Shade the home page content background-color. +body { + &[data-netbox-path='/'] { + .content-container, + .search { + background-color: $gray-100; + } + &[data-netbox-color-mode='dark'] { + .content-container, + .search { + background-color: $darkest; + } + } + } +} diff --git a/netbox/templates/base/base.html b/netbox/templates/base/base.html index 5c9f162c1..3a2d8012d 100644 --- a/netbox/templates/base/base.html +++ b/netbox/templates/base/base.html @@ -1,6 +1,5 @@ {# Base template for (almost) all NetBox pages #} {% load static %} -{% load static %} {% load helpers %} @@ -47,6 +46,7 @@ {% if preferences|get_key:'ui.colormode' == 'dark'%} data-netbox-color-mode="dark" {% else %} data-netbox-color-mode="light" {% endif %} + data-netbox-path="{{ request.path }}" > {# Page layout #} diff --git a/netbox/templates/home.html b/netbox/templates/home.html index 32ddc98ea..3fbcc4f45 100644 --- a/netbox/templates/home.html +++ b/netbox/templates/home.html @@ -24,7 +24,7 @@ {% block title %}Home{% endblock %} {% block content-wrapper %} -
+
{# General stats #}
{% for section, items, icon in stats %}