Currently the default homepage settings found in the admin panel and user preferences apply to both desktop and mobile. This is a very simple theme component that will allow you to specify a different default homepage for the mobile view of your Discourse forum.
It is important to note that this will force mobile to navigate to the homepage you choose in this theme component. Your users will not be able to override the default homepage for mobile via their user preferences at this point.
Repository Link https://github.com/tshenry/discourse-force-mobile-homepage
I don’t know if there’s anything to gain by including screenshots or putting a demo on theme-creator, but if anyone thinks otherwise, please speak up!
Theme Settings
There is one setting that allows you to set the mobile homepage as:
Thank you for this useful component.
Could you please help? While showing “Latest” by default on mobile, there is no option to choose “Categories” in top drop-down menu above topic list.
Danke für die Erstellung! Wie sieht es mit der zukünftigen Kompatibilität aus, da sich die Haupt-Discourse-App weiterentwickelt und aktualisiert wird? Oder ist die Theme-Komponente in dieser Hinsicht ziemlich zukunftssicher?
Ich glaube, diese Theme-Komponente ist super einfach und ziemlich narrensicher! Nur ein paar Zeilen CSS und HTML ohne Einstellungen oder Schnickschnack.
Natürlich kamen sofort Anfragen von unseren Power-Usern, dass sie ihre eigene Überschreibungseinstellung vornehmen dürfen sollten.
Dies dient der überwiegenden Mehrheit der normalen Benutzer, aber es gibt immer noch eine Nachfrage nach der Möglichkeit, persönlich von den Top 1 % der Power-User zu überschreiben.
Ich habe im Entwicklerkonsolen des Browsers eine Deprecation-Meldung für diese großartige Theme-Komponente erhalten:
[THEME 50 ‘Force Mobile Homepage’] Deprecation notice: Accessing site.mobileView or site.desktopView during the site initialization can lead to errors and inconsistencies when the browser window is resized. Please move these checks to a component, transformer, or API callback that executes during page rendering. [deprecated since Discourse 3.5.0.beta9-dev] [deprecation id: discourse.static-viewport-initialization] [info: Designing for Different Devices (Viewport Size, Touch/Hover, etc.)]