FIX: Let core handle toggling "in topic" state (#6)

Also adjusts some styling following core changes.
This commit is contained in:
Penar Musaraj 2021-10-21 10:00:00 -04:00 committed by GitHub
parent 565174c3e3
commit 205ead43f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 18 deletions

View File

@ -112,9 +112,9 @@ $max-width: 600px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
left: 0; left: 0;
top: 1.9em; top: 2.4em;
right: 0; right: 0;
padding: 2em 1em 1em 1em; padding: 0.5em;
@include breakpoint(mobile-extra-large) { @include breakpoint(mobile-extra-large) {
width: 100%; width: 100%;
} }
@ -124,18 +124,16 @@ $max-width: 600px;
margin: 0; margin: 0;
} }
} }
}
.search-widget { .searching a.show-advanced-search {
div.discourse-tags { display: none;
font-size: var(--font-down-1);
} }
li a.widget-link {
display: block; .search-link .d-icon {
padding: 0.25em 0.5em; color: var(--primary-medium);
&:hover, }
&:focus {
background-color: var(--highlight-medium); span.keyword {
} color: var(--primary);
} }
} }

View File

@ -25,16 +25,14 @@ export default apiInitializer("0.8", (api) => {
return { return {
formFactor: attrs.formFactor || "menu", formFactor: attrs.formFactor || "menu",
showHeaderResults: false, showHeaderResults: false,
inTopicContext: attrs.inTopicContext,
}; };
}, },
html: function () { html: function (attrs, state) {
if (this.state.formFactor === "widget") { if (this.state.formFactor === "widget") {
return this.panelContents(); return this.panelContents();
} else { } else {
return this.attach("menu-panel", { return this._super(attrs, state);
maxWidth: 500,
contents: () => this.panelContents(),
});
} }
}, },
clickOutside() { clickOutside() {