This reverts commit 5ee760dc2c
.
This commit is contained in:
parent
ce27dbd560
commit
dc6418bd8f
|
@ -2,9 +2,8 @@ import { createWidget } from "discourse/widgets/widget";
|
|||
import hbs from "discourse/widgets/hbs-compiler";
|
||||
|
||||
createWidget("header-contents", {
|
||||
tagName: "div.contents",
|
||||
tagName: "div.contents.clearfix",
|
||||
template: hbs`
|
||||
<div class="header-logo-wrapper">
|
||||
{{#if this.site.desktopView}}
|
||||
{{#if this.siteSettings.enable_experimental_sidebar_hamburger}}
|
||||
{{#if attrs.sidebarEnabled}}
|
||||
|
@ -13,7 +12,6 @@ createWidget("header-contents", {
|
|||
{{/if}}
|
||||
{{/if}}
|
||||
{{home-logo attrs=attrs}}
|
||||
</div>
|
||||
{{#if attrs.topic}}
|
||||
{{header-topic-info attrs=attrs}}
|
||||
{{/if}}
|
||||
|
|
|
@ -19,32 +19,33 @@
|
|||
height: 100%;
|
||||
|
||||
.contents {
|
||||
display: grid;
|
||||
grid-template-areas: "logo-wrapper extra-info panel";
|
||||
grid-template-columns: auto 1fr auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
|
||||
.has-sidebar-page & {
|
||||
// 10px is a .wrap padding
|
||||
grid-template-columns:
|
||||
minmax(calc(var(--d-sidebar-width) - 10px), auto)
|
||||
1fr auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
.header-row {
|
||||
width: 100%;
|
||||
|
||||
.header-logo-wrapper {
|
||||
grid-area: logo-wrapper;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.logo-wrapper {
|
||||
float: left;
|
||||
}
|
||||
.auth-buttons {
|
||||
float: right;
|
||||
margin-top: 0.4em;
|
||||
|
||||
.login-button,
|
||||
.signup-button {
|
||||
padding: 8px 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
|
||||
a,
|
||||
a:visited {
|
||||
color: var(--header_primary);
|
||||
|
@ -60,10 +61,10 @@
|
|||
}
|
||||
|
||||
.panel {
|
||||
grid-area: panel;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
margin-left: auto;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
@ -211,8 +212,6 @@
|
|||
}
|
||||
|
||||
.header-sidebar-toggle {
|
||||
grid-area: hamburger;
|
||||
|
||||
button {
|
||||
margin-right: 1em;
|
||||
box-sizing: content-box; // matches other header icons
|
||||
|
@ -243,7 +242,6 @@
|
|||
|
||||
// topic info in the header
|
||||
.extra-info-wrapper {
|
||||
grid-area: extra-info;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
|
@ -251,7 +249,6 @@
|
|||
padding: 0 1.5em 0 0.5em;
|
||||
// we need to hide overflow in both to truncate the title in a flexbox
|
||||
overflow: hidden;
|
||||
|
||||
.extra-info {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
|
|
|
@ -199,3 +199,19 @@ body.has-sidebar-page {
|
|||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
body.sidebar-animate {
|
||||
#main-outlet-wrapper {
|
||||
// grid-template-columns transition supported in Firefox, Chrome support coming summer 2022
|
||||
transition-property: grid-template-columns, max-width;
|
||||
transition-timing-function: var(--d-sidebar-animation-ease);
|
||||
transition-duration: var(--d-sidebar-animation-time);
|
||||
}
|
||||
|
||||
.d-header-wrap .wrap {
|
||||
transition: max-width var(--d-sidebar-animation-time)
|
||||
var(--d-sidebar-animation-ease);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue