Fakebook, a theme for social media lovers

I don’t believe so… normally I could make a component that uses one template, and then I could include for the component in both overrides… but our topic list items are a special type of template built for performance (hbr = handlebars raw template), and raw templates can’t use components. (Some previous discussion in Mounting widget in raw template?)

That’s how Discourse’s CSS is structured (and some special HTML files for themes like header/footer/etc), but within the javascripts/discourse/templates directory those templates are direct overrides of Discourse defaults (when there’s not an override, the default templates are used).

In Discourse there are two templates: /templates/list/topic-list-item.hbr and /templates/mobile/list/topic-list-item.hbr. So since there are two templates, we need two overrides.

Maybe there’s an easy way to point mobile to the non-mobile template in the JS… but if there is I’m not aware of it!

1 Like