Forzar página de inicio móvil

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 Me gusta

Works like a charm. This is great mate!

4 Me gusta

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

Many thanks.

1 me gusta

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 Me gusta

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

10 Me gusta

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 Me gusta

Excelente, ¡muchas gracias! :folded_hands::folded_hands::folded_hands::folded_hands:

1 me gusta

¡Gracias por crear esto! :handshake: ¿Qué hay de la compatibilidad futura a medida que la aplicación principal de Discourse continúa evolucionando y se actualiza? ¿O el componente temático es bastante amigable para el futuro en ese sentido?

2 Me gusta

¡Este componente de tema es súper simple y bastante a prueba de fallos, creo! Solo un par de líneas de CSS y HTML sin configuraciones ni nada elegante.

3 Me gusta

¡Todavía creo que esto debería fusionarse en el núcleo como una configuración adicional, es increíblemente útil!

10 Me gusta

Un componente pequeño, genial y sencillo.

Por supuesto, inmediatamente comenzaron las solicitudes de nuestros usuarios avanzados para que se les permitiera establecer su propia preferencia de anulación.

Esto sirve a la gran mayoría de los usuarios normales, pero todavía existe la demanda de la capacidad de anular personalmente por parte del 1% de los usuarios avanzados.

De acuerdo. No se ha actualizado en 7 años, pero los propietarios de Discourse todavía lo utilizan.

1 me gusta

1 me gusta

Esperanza de una actualización

¡Este es uno de los plugins imprescindibles que necesita ser actualizado! :folded_hands:

Lo he actualizado en una PR aquí: DEV: update to initializer by awesomerobot · Pull Request #3 · tshenry/discourse-force-mobile-homepage · GitHub

@tshenry ¿puedes echarle un vistazo y fusionarlo cuando tengas oportunidad?

6 Me gusta

¡Fusionado! ¡Gracias por la PR!

7 Me gusta

Recibí un aviso de depreciación para este gran componente temático en la consola del desarrollador del navegador:

[THEME 50 ‘Force Mobile Homepage’] Aviso de depreciación: El acceso a site.mobileView o site.desktopView durante la inicialización del sitio puede provocar errores e inconsistencias al cambiar el tamaño de la ventana del navegador. Por favor, mueva estas comprobaciones a un componente, transformador o devolución de llamada de API que se ejecute durante la representación de la página. [obsoleto desde Discourse 3.5.0.beta9-dev] [id de depreciación: discourse.static-viewport-initialization] [info: Designing for Different Devices (Viewport Size, Touch/Hover, etc.)]

2 Me gusta

Sí, lo mismo, uno de los pocos avisos de depreciación que me quedan…

1 me gusta