feat: export complete Discourse themes ecosystem (16 themes, SCSS, JS components and color schemes)

This commit is contained in:
eldov
2026-08-30 18:07:57 +02:00
parent 0d76aaa622
commit 3a411c2643
258 changed files with 16878 additions and 0 deletions
@@ -0,0 +1,31 @@
import { apiInitializer } from "discourse/lib/api";
import { wantsNewWindow } from "discourse/lib/intercept-click";
export default apiInitializer((api) => {
api.registerBehaviorTransformer(
"topic-list-item-click",
({ context, next }) => {
const targetElement = context.event.target;
const topic = context.topic;
const clickTargets = [
"topic-list-data",
"link-bottom-line",
"topic-list-item",
];
if (api.container.lookup("service:site").mobileView) {
clickTargets.push("topic-item-metadata", "topic-item-stats");
}
if (clickTargets.some((t) => targetElement.classList.contains(t))) {
if (wantsNewWindow(event)) {
return true;
}
return context.navigateToTopic(topic, topic.lastUnreadUrl);
}
next();
}
);
});