~homeworkprod/byceps

6bdc5ae248266f5dcd14a3d9f16dd1d57e92de12 — Jochen Kupperschmidt 6 months ago 6b7538c
Introduce CSS class `main-tab`
2 files changed, 11 insertions(+), 19 deletions(-)

M byceps/blueprints/admin/core/templates/macros/admin.html
M byceps/static/style/admin.css
M byceps/blueprints/admin/core/templates/macros/admin.html => byceps/blueprints/admin/core/templates/macros/admin.html +1 -1
@@ 20,7 20,7 @@
    <ol>
    {%- for item in navigation.get_items() %}
      {%- with is_current = (item.id is not none) and (item.id == current_tab) %}
      <li><a href="{{ item.endpoint }}"{% if is_current %} class="current"{% endif -%}>{% if item.icon %}{{ render_icon(item.icon) }} {% endif %}{{ item.label }}</a></li>
      <li><a href="{{ item.endpoint }}" class="main-tab{% if is_current %} current{% endif %}">{% if item.icon %}{{ render_icon(item.icon) }} {% endif %}{{ item.label }}</a></li>
      {%- endwith %}
    {%- endfor %}
    </ol>

M byceps/static/style/admin.css => byceps/static/style/admin.css +10 -18
@@ 348,35 348,28 @@ nav.main li {
.main-tabs ol {
  display: flex;
  list-style: none;
  margin: -8px 12px 0 12px;
  margin: 0 12px;
  padding: 0;
}

.main-tabs li {
  padding: 8px 0 0 4px;
  padding: 0 0 0 4px;
}

.main-tabs a,
.main-tabs .current {
.main-tab {
  border-color: #cccccc;
  border-style: solid;
  border-width: 0;
  color: #5c5c5c;
  display: block;
  font-size: 0.75rem; /* 12px / 16px */
  margin-bottom: -1px;
  margin: 1px 1px -1px 1px;
  padding: 0.5rem 1rem;
}

.main-tabs a {
  border-width: 0;
  margin-top: 1px;
  margin-right: 1px;
  margin-left: 1px;
  text-decoration: none;
}

.main-tabs a:hover,
.main-tabs .current {
.main-tab:hover,
.main-tab.current {
  border-width: 1px 1px 0 1px;
  background-color: #ffffff;
  margin-top: 0;


@@ 384,12 377,11 @@ nav.main li {
  margin-left: 0;
}

.main-tabs a.current:hover {
  color: #000000;
.main-tab:hover {
  color: #111111;
}

.main-tabs a:hover:not(.current) {
  color: #000000;
.main-tab:hover:not(.current) {
  opacity: 0.5;
}