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

View File

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