#6797: Improve home page shading

This commit is contained in:
checktheroads 2021-07-24 00:38:28 -07:00
parent 0572d03003
commit 7d5f647cd3
5 changed files with 18 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -920,3 +920,19 @@ div.card > div.card-header > div.table-controls {
background-color: $tab-content-bg; background-color: $tab-content-bg;
border-bottom: 1px solid $nav-tabs-border-color; 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;
}
}
}
}

View File

@ -1,6 +1,5 @@
{# Base template for (almost) all NetBox pages #} {# Base template for (almost) all NetBox pages #}
{% load static %} {% load static %}
{% load static %}
{% load helpers %} {% load helpers %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -47,6 +46,7 @@
{% if preferences|get_key:'ui.colormode' == 'dark'%} data-netbox-color-mode="dark" {% if preferences|get_key:'ui.colormode' == 'dark'%} data-netbox-color-mode="dark"
{% else %} data-netbox-color-mode="light" {% else %} data-netbox-color-mode="light"
{% endif %} {% endif %}
data-netbox-path="{{ request.path }}"
> >
{# Page layout #} {# Page layout #}

View File

@ -24,7 +24,7 @@
{% block title %}Home{% endblock %} {% block title %}Home{% endblock %}
{% block content-wrapper %} {% block content-wrapper %}
<div class="tab-content"> <div class="p-3">
{# General stats #} {# General stats #}
<div class="row masonry"> <div class="row masonry">
{% for section, items, icon in stats %} {% for section, items, icon in stats %}