Move admin header partial to a component

This way it's easier to refactor it.

Note we're using `with_request_url` in the tests because the component
renders the locale switcher, which needs a URL in order to work. This
doesn't affect whether we're in the management section or not.
This commit is contained in:
Javi Martín
2023-01-05 14:12:19 +01:00
parent d27bfb2afd
commit 86fd14f8f0
9 changed files with 153 additions and 142 deletions

View File

@@ -31,14 +31,6 @@ $table-header: #ecf1f6;
.admin {
@include admin-layout;
> header {
border-bottom: 1px solid #eee;
> * {
@include full-width-background($adjust-margin: false, $adjust-padding: true);
}
}
h2 {
font-weight: 100;
margin-bottom: $line-height;
@@ -60,86 +52,6 @@ $table-header: #ecf1f6;
float: none;
}
.top-links {
a {
line-height: rem-calc($line-height * 1.5);
}
}
.top-bar {
height: auto;
padding-top: $line-height / 2;
@include breakpoint(small only) {
.top-bar-left ul {
display: inline-block;
}
.top-bar-right {
> ul {
border-bottom: 0;
padding-bottom: 0;
margin-bottom: 0;
}
.submenu {
position: initial;
}
a {
font-weight: normal;
}
}
[class^="icon-"] {
display: none;
}
}
[class^="icon-"] {
font-size: $base-font-size;
}
h1 {
margin-top: $line-height / 2;
margin-bottom: 0;
@include breakpoint(medium) {
margin-top: 0;
}
small {
color: inherit;
text-transform: uppercase;
}
a {
color: inherit;
display: inline-block;
font-family: "Lato" !important;
font-size: rem-calc(24);
font-weight: lighter;
line-height: 1;
}
}
}
.top-bar .menu > li {
@include breakpoint(medium) {
height: auto !important;
}
}
.title-bar {
color: inherit;
position: absolute;
right: 12px;
}
.notifications.unread-notifications::after {
color: $admin-color;
}