IDEMSInternational / open-app-builder

PLH App Frontend
GNU General Public License v3.0
6 stars 25 forks source link

[FEATURE] Landscape mode #2114

Closed esmeetewinkel closed 5 days ago

esmeetewinkel commented 1 year ago

What? Ability to show particular templates in landscape mode

Why? The PLH Kids deployment wants to display "storybooks" in landscape mode, so that a 1:2 ratio landscape image can be displayed as big as possible. The rest of the app needs to still be used in portrait mode.

image
jfmcquade commented 1 year ago

According the Capacitor docs, we should be able to handle this using the cordova-plugin-screen-orientation plugin.

chrismclarke commented 1 year ago

Recommend main layout should be flex box to support portrait/landscape orientation Contents list should provide template parameter_list option for screen_orientation with values for landscape (default portrait) Template navigation should likely watch for this parameter and pass into url as a query parameter, e.g. `/template/my_template?screen_orientation=landscape (portrait would be undefined/null and shoudl remove parameter) Will need some screen-orientation service that listens to router and calls api as required