Force 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

Works like a charm. This is great mate!

「いいね!」 4

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

Many thanks.

「いいね!」 1

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

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

「いいね!」 10

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

素晴らしい、ありがとうございます :folded_hands::folded_hands::folded_hands::folded_hands:

「いいね!」 1

これを作成していただきありがとうございます!:handshake: Discourseのメインアプリが進化し、更新され続けるにつれて、将来の互換性はどうなりますか?それとも、テーマコンポーネントはこの点でかなり将来性がありますか?

「いいね!」 2

このテーマコンポーネントは非常にシンプルで、ほぼ完璧だと思います!数行のCSSとHTMLだけで、設定などもありません。

「いいね!」 3

これは非常に便利なので、追加の設定としてコアにマージすべきだと思います!

「いいね!」 10

素晴らしい、シンプルな小さなコンポーネントです。

もちろん、パワーユーザーからは、独自のオーバーライド設定を許可してほしいというリクエストがすぐに寄せられました。

これは大多数の通常のユーザーには役立ちますが、上位1%のパワーユーザーからは、個人的にオーバーライドしたいという要望が依然としてあります。

同意します。7年間更新されていませんが、Discourseのオーナーはまだ使用しています。

「いいね!」 1

「いいね!」 1

アップデートへの希望

これは更新が必要な必須プラグインの1つです!:folded_hands:

こちらでPRを更新しました: DEV: update to initializer by awesomerobot · Pull Request #3 · tshenry/discourse-force-mobile-homepage · GitHub

@tshenry ご確認いただき、お時間のある時にマージしていただけますでしょうか?

「いいね!」 6

マージされました!PRありがとうございます!

「いいね!」 7

ブラウザの開発者コンソールで、この素晴らしいテーマコンポーネントの非推奨通知を受け取りました。

[THEME 50 ‘Force Mobile Homepage’] 非推奨通知: site.mobileView または site.desktopView にサイト初期化中にアクセスすると、ブラウザウィンドウのサイズが変更されたときにエラーや不整合が発生する可能性があります。これらのチェックは、ページレンダリング中に実行されるコンポーネント、トランスフォーマー、または API コールバックに移動してください。[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

はい、同じです。私に残された数少ない減価償却通知の1つです…

「いいね!」 1