Kraft Mobile Homepage

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:

  • latest (default)
  • categories
  • new
  • unread
  • top

Installation

If you are new to installing theme components, check out @Johani’s excellent guide on theme components, particularly how to import a theme component and how to add the theme component to your main theme.

Future

  • Allow users to override the default we set in this component.

That’s it! Questions, comments, and suggestions are always welcome :slight_smile:

56 „Gefällt mir“

Works like a charm. This is great mate!

4 „Gefällt mir“

Great little component, just what I needed for my community!

Many thanks.

1 „Gefällt mir“

Can you please integrate this into core settings.

Sitewide default in settings for mobile and desktop.

And user setting in user profile settings for mobile and desktop.

:wink:

9 „Gefällt mir“

+1 for having different home page capabilities for mobile and desktop in core.

10 „Gefällt mir“

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.

Exactly what I was after - thank you for this little component!

3 „Gefällt mir“

Ausgezeichnet, danke :folded_hands::folded_hands::folded_hands::folded_hands:

1 „Gefällt mir“

Danke für die Erstellung! :handshake: 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?

2 „Gefällt mir“

Ich glaube, diese Theme-Komponente ist super einfach und ziemlich narrensicher! Nur ein paar Zeilen CSS und HTML ohne Einstellungen oder Schnickschnack.

3 „Gefällt mir“

Ich bin immer noch der Meinung, dass dies als zusätzliche Einstellung in den Kern integriert werden sollte, es ist so unglaublich nützlich!

10 „Gefällt mir“

Eine großartige und einfache kleine Komponente.

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.

Einverstanden. Es wurde seit 7 Jahren nicht aktualisiert, wird aber immer noch von den Discourse-Besitzern verwendet.

1 „Gefällt mir“

1 „Gefällt mir“

Hoffnung auf ein Update

Dies ist eines der unverzichtbaren Plugins, das aktualisiert werden muss!:folded_hands:

Ich habe es hier in einem PR aktualisiert: DEV: update to initializer by awesomerobot · Pull Request #3 · tshenry/discourse-force-mobile-homepage · GitHub

@tshenry kannst du es dir ansehen und zusammenführen, wenn du Zeit hast?

6 „Gefällt mir“

Zusammengeführt! Danke für den PR!

7 „Gefällt mir“

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.)]

2 „Gefällt mir“

Ja, dasselbe, eine der wenigen verbleibenden Deprekationshinweise für mich…

1 „Gefällt mir“