Revert header sidebar change 0ef68f5 (#18241)

This commit is contained in:
Kris 2022-09-13 13:20:08 -04:00 committed by GitHub
parent b8adb70973
commit 6c1b6a98ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 23 deletions

View File

@ -2,9 +2,8 @@ import { createWidget } from "discourse/widgets/widget";
import hbs from "discourse/widgets/hbs-compiler"; import hbs from "discourse/widgets/hbs-compiler";
createWidget("header-contents", { createWidget("header-contents", {
tagName: "div.contents", tagName: "div.contents.clearfix",
template: hbs` template: hbs`
<div class="header-logo-wrapper">
{{#if this.site.desktopView}} {{#if this.site.desktopView}}
{{#if this.siteSettings.enable_experimental_sidebar_hamburger}} {{#if this.siteSettings.enable_experimental_sidebar_hamburger}}
{{#if attrs.sidebarEnabled}} {{#if attrs.sidebarEnabled}}
@ -13,7 +12,6 @@ createWidget("header-contents", {
{{/if}} {{/if}}
{{/if}} {{/if}}
{{home-logo attrs=attrs}} {{home-logo attrs=attrs}}
</div>
{{#if attrs.topic}} {{#if attrs.topic}}
{{header-topic-info attrs=attrs}} {{header-topic-info attrs=attrs}}
{{/if}} {{/if}}

View File

@ -19,12 +19,7 @@
height: 100%; height: 100%;
.contents { .contents {
display: grid; display: flex;
grid-template-areas: "logo-wrapper extra-info panel";
grid-template-columns: auto 1fr auto;
.has-sidebar-page & {
grid-template-columns: minmax(var(--d-sidebar-width), auto) 1fr auto;
}
align-items: center; align-items: center;
height: 100%; height: 100%;
@ -47,12 +42,6 @@
} }
} }
.header-logo-wrapper {
grid-area: logo-wrapper;
display: flex;
align-items: center;
}
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
@ -72,7 +61,6 @@
} }
.panel { .panel {
grid-area: panel;
position: relative; position: relative;
display: flex; display: flex;
flex: 0 0 auto; flex: 0 0 auto;
@ -224,7 +212,6 @@
} }
.header-sidebar-toggle { .header-sidebar-toggle {
grid-area: hamburger;
button { button {
margin-right: 1em; margin-right: 1em;
box-sizing: content-box; // matches other header icons box-sizing: content-box; // matches other header icons

View File

@ -199,3 +199,19 @@ body.has-sidebar-page {
padding-left: 0; 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);
}
}
}