Skip to content

Commit

Permalink
#6797: Improve home page shading
Browse files Browse the repository at this point in the history
  • Loading branch information
thatmattlove committed Jul 24, 2021
1 parent 0572d03 commit 7d5f647
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion netbox/project-static/dist/netbox-dark.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion netbox/project-static/dist/netbox-light.css

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions netbox/project-static/styles/netbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
2 changes: 1 addition & 1 deletion netbox/templates/base/base.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{# Base template for (almost) all NetBox pages #}
{% load static %}
{% load static %}
{% load helpers %}
<!DOCTYPE html>
<html lang="en">
Expand Down Expand Up @@ -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 #}
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h6 class="alert-heading">
{% block title %}Home{% endblock %}

{% block content-wrapper %}
<div class="tab-content">
<div class="p-3">
{# General stats #}
<div class="row masonry">
{% for section, items, icon in stats %}
Expand Down

0 comments on commit 7d5f647

Please sign in to comment.