Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Update for glimmer header #34

Merged
merged 3 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/common.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.b-header,
.brand-header-widgetized {
.brand-header-contents {
#brand-logo {
max-height: 32px;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Component from "@glimmer/component";
import { service } from "@ember/service";
import { not, and } from "truth-helpers";
import MountWidget from "discourse/components/mount-widget";
import DMenu from "float-kit/components/d-menu";
import BrandHeaderContents from "../../components/brand-header-contents";
import dIcon from "discourse-common/helpers/d-icon";

export default class BrandHeaderContainer extends Component {
jancernik marked this conversation as resolved.
Show resolved Hide resolved
@service site;

<template>
{{#if (and (not settings.show_bar_on_mobile) this.site.mobileView)}}
<DMenu
@icon="bars"
title="hamburger_brand_menu"
id="toggle-hamburger-brand-menu"
class="brand-header-toggle icon btn-flat"
>
<:content>
<div class="brand-header-contents">
<BrandHeaderContents />
</div>
</:content>
</DMenu>
{{/if}}
</template>
}
4 changes: 2 additions & 2 deletions javascripts/discourse/initializers/initialize-brand-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default {

initialize() {
registerWidgetShim(
"brand-header-widgetized",
"div.brand-header-widgetized",
"brand-header-contents",
"div.brand-header-contents",
hbs`<BrandHeaderContents />`
);

Expand Down
17 changes: 0 additions & 17 deletions javascripts/discourse/initializers/initialize-mobile-decorator.js

This file was deleted.

39 changes: 0 additions & 39 deletions javascripts/discourse/widgets/brand-header-container.js

This file was deleted.

20 changes: 0 additions & 20 deletions javascripts/discourse/widgets/brand-header-icon.js

This file was deleted.

23 changes: 0 additions & 23 deletions javascripts/discourse/widgets/hamburger-brand-menu.js

This file was deleted.

19 changes: 18 additions & 1 deletion mobile/mobile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,23 @@
}
}

.brand-header-widgetized {
.home-logo-wrapper-outlet {
display: flex;
.brand-header-container {
display: flex;
justify-content: center;
align-items: center;
}
}

.brand-header-contents {
padding: 0.5em;
width: 320px;
ul {
list-style: none;
margin: 0;
}

.nav {
border-top: 1px solid var(--primary-low);
border-bottom: 1px solid var(--primary-low);
Expand All @@ -45,6 +61,7 @@

.icons {
display: flex;
height: 26px;
a {
padding: 0.33em 0.6em;
.d-icon {
Expand Down
Loading