Remove obsolete CSS classes

This commit is contained in:
Jeremy Stretch 2024-01-12 11:10:07 -05:00
parent d8e853d1fc
commit 8e8a84f9d5
11 changed files with 14 additions and 182 deletions

View File

@ -142,59 +142,12 @@ table td > .progress {
} }
} }
// Primarily used for the new release notification, but could be used for other alerts as needed.
// Wrap any alerts in .header-alert-container to ensure the layout is consistent.
.header-alert-container {
// Center-align the alert(s).
display: flex;
align-items: center;
justify-content: center;
// Apply the same spacing that's applied to the #content div's first child (.px-3).
padding: 0 $spacer;
// By default, alerts inside .header-alert-container should take up the full width.
.alert {
width: 100%;
// Adjust the max-width for larger screens so there's not a big ugly blue blob taking up the
// entire screen.
@include media-breakpoint-up(md) {
max-width: 75%;
}
@include media-breakpoint-up(lg) {
max-width: 50%;
}
}
}
.alert { .alert {
code { code {
color: $gray-600; color: $gray-600;
} }
} }
span.profile-button .dropdown-menu {
right: 0;
left: auto;
display: block !important;
margin-top: 0.5rem;
box-shadow: $box-shadow;
transition: opacity 0.2s ease-in-out;
&:not(.show) {
pointer-events: none;
opacity: 0;
}
&.show {
pointer-events: auto;
opacity: 1;
}
}
div#advanced-search-content div.card div.card-body div.col:not(:last-child) {
margin-right: 1rem;
}
table { table {
td { td {
a { a {
@ -276,28 +229,6 @@ table {
} }
} }
div.title-container {
display: flex;
// On small screens, `flex-direction: column;` ensures the control buttons don't appear on the
// same line as the title, but rather break to the next line.
flex-direction: column;
flex-wrap: wrap;
justify-content: space-between;
@include media-breakpoint-up(lg) {
// On large screens, `flex-direction: row;` allows the control buttons to appear vertically
// aligned with the title.
flex-direction: row;
}
#content-title {
display: flex;
flex: 1 0;
flex-direction: column;
padding-bottom: map.get($spacers, 2);
}
}
// Object list control buttons (Add/Clone/Import/Export) // Object list control buttons (Add/Clone/Import/Export)
.controls { .controls {
margin-bottom: map.get($spacers, 2); margin-bottom: map.get($spacers, 2);
@ -337,32 +268,6 @@ div.title-container {
} }
} }
.object-subtitle {
display: block;
font-size: $font-size-sm;
color: $text-muted;
@include media-breakpoint-up(md) {
display: inline-block;
}
> span {
display: block;
// Hide the separator on small screens.
&.separator {
display: none;
}
&,
&.separator {
@include media-breakpoint-up(md) {
display: inline-block;
}
}
}
}
// Global Search // Global Search
nav.search { nav.search {
// Don't overtake dropdowns // Don't overtake dropdowns
@ -614,20 +519,6 @@ div.content-container {
} }
} }
.tooltip {
pointer-events: none;
}
span.color-label {
display: block;
width: 5rem;
height: 1rem;
padding: $badge-padding-y $badge-padding-x;
border: 1px solid #303030;
border-radius: $border-radius;
box-shadow: $box-shadow-sm;
}
.badge a { .badge a {
color: inherit; color: inherit;
} }
@ -790,48 +681,6 @@ label.required {
} }
} }
// Applied to containing element around table bulk-action buttons (bulk-edit, bulk-disconnect
// bulk-delete, etc). Each usage of .bulk-buttons needs to have groups of buttons wrapped with
// .bulk-button-group so that proper spacing is applied (even if there is only one group).
div.bulk-buttons {
display: flex;
justify-content: space-between;
margin: math.div($spacer, 2) 0;
// Each group of buttons needs to be contained separately for alignment purposes. This way, you
// can put some buttons in a group that aligns left, and other buttons in a group that aligns
// right.
> div.bulk-button-group {
display: flex;
flex-wrap: wrap;
// For small screens: don't fill the available space (thereby expanding the size of the button).
align-items: flex-start;
&:first-of-type:not(:last-of-type) {
// If there are multiple bulk button groups and this is the first, the first button in the
// group should *not* have left spacing applied, so the button group aligns with the rest
// of the page elements.
> *:first-child {
margin-left: 0;
}
}
&:last-of-type:not(:first-of-type) {
// If there are multiple bulk button groups and this is the last, the last button in the
// group should *not* have right spacing applied, so the button group aligns with the rest
// of the page elements.
> *:last-child {
margin-right: 0;
}
}
// However, the rest of the buttons should have spacing applied in all directions.
> * {
margin: math.div($spacer, 4);
}
}
}
table tbody { table tbody {
@each $color, $value in $theme-colors { @each $color, $value in $theme-colors {
tr.#{$color} { tr.#{$color} {
@ -959,23 +808,6 @@ div.card-overlay {
padding: $spacer; padding: $spacer;
} }
// Override masonry-layout styles when printing.
.masonry {
@media print {
position: static !important;
display: block !important;
height: unset !important;
}
.masonry-item {
@media print {
position: static !important;
top: unset !important;
left: unset !important;
display: block !important;
}
}
}
// Object hierarchy indicators. // Object hierarchy indicators.
.record-depth { .record-depth {
display: inline; display: inline;

View File

@ -30,8 +30,8 @@
{% block subtitle %} {% block subtitle %}
{% if object.created %} {% if object.created %}
<div class="object-subtitle"> <div class="text-secondary fs-5">
<span>{% trans "Created" %} {{ object.created|annotated_date }}</span> {% trans "Created" %} {{ object.created|annotated_date }}
</div> </div>
{% endif %} {% endif %}
{% endblock subtitle %} {% endblock subtitle %}

View File

@ -8,8 +8,8 @@
{% block title %}{% trans "Restore" %}: {{ object }}{% endblock %} {% block title %}{% trans "Restore" %}: {{ object }}{% endblock %}
{% block subtitle %} {% block subtitle %}
<div class="object-subtitle"> <div class="text-secondary fs-5">
<span>{% trans "Created" %} {{ object.created|annotated_date }}</span> {% trans "Created" %} {{ object.created|annotated_date }}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,7 +1,7 @@
{% load helpers %} {% load helpers %}
{% load i18n %} {% load i18n %}
{% if terminations.0 %} {% if terminations.0 %}
<table class="table table-hover panel-body attr-table"> <table class="table table-hover attr-table">
{% if terminations.0.device %} {% if terminations.0.device %}
{# Device component #} {# Device component #}
<tr> <tr>

View File

@ -1,5 +1,5 @@
{% load i18n %} {% load i18n %}
<table class="table panel-body"> <table class="table">
<tr> <tr>
<th>{% trans "VID" %}</th> <th>{% trans "VID" %}</th>
<th>{% trans "Name" %}</th> <th>{% trans "Name" %}</th>

View File

@ -36,7 +36,7 @@
<h5 class="card-header">{% trans "Report Results" %}</h5> <h5 class="card-header">{% trans "Report Results" %}</h5>
<table class="table table-hover report"> <table class="table table-hover report">
<thead> <thead>
<tr class="table-headings"> <tr>
<th>{% trans "Time" %}</th> <th>{% trans "Time" %}</th>
<th>{% trans "Level" %}</th> <th>{% trans "Level" %}</th>
<th>{% trans "Object" %}</th> <th>{% trans "Object" %}</th>

View File

@ -16,8 +16,8 @@
{% block subtitle %} {% block subtitle %}
{% if report.description %} {% if report.description %}
<div class="object-subtitle"> <div class="text-secondary fs-5">
<div class="text-muted">{{ report.description|markdown }}</div> {{ report.description|markdown }}
</div> </div>
{% endif %} {% endif %}
{% endblock subtitle %} {% endblock subtitle %}

View File

@ -39,7 +39,7 @@
<div class="card-body"> <div class="card-body">
{% include 'inc/sync_warning.html' with object=module %} {% include 'inc/sync_warning.html' with object=module %}
{% if module.reports %} {% if module.reports %}
<table class="table table-hover table-headings reports"> <table class="table table-hover reports">
<thead> <thead>
<tr> <tr>
<th width="250">{% trans "Name" %}</th> <th width="250">{% trans "Name" %}</th>

View File

@ -16,8 +16,8 @@
{% endblock breadcrumbs %} {% endblock breadcrumbs %}
{% block subtitle %} {% block subtitle %}
<div class="object-subtitle"> <div class="text-secondary fs-5">
<div class="text-muted">{{ script.Meta.description|markdown }}</div> {{ script.Meta.description|markdown }}
</div> </div>
{% endblock subtitle %} {% endblock subtitle %}

View File

@ -45,7 +45,7 @@
{% endblocktrans %} {% endblocktrans %}
</div> </div>
{% else %} {% else %}
<table class="table table-hover table-headings reports"> <table class="table table-hover reports">
<thead> <thead>
<tr> <tr>
<th width="250">{% trans "Name" %}</th> <th width="250">{% trans "Name" %}</th>

View File

@ -1,7 +1,7 @@
{% load helpers %} {% load helpers %}
{% load i18n %} {% load i18n %}
<table class="table table-hover panel-body attr-table"> <table class="table table-hover attr-table">
<tr> <tr>
<th scope="row">{% trans "Device" %}</th> <th scope="row">{% trans "Device" %}</th>
<td>{{ interface.device|linkify }}</td> <td>{{ interface.device|linkify }}</td>