Skip to content

Configure orientation in each page (question) #170

@lusacramento

Description

@lusacramento

Hi! I have a question.
I have a project when I need to show some pages in portrait orientation and others pages in landscape orientations on mobile devices.
How can I to configure it?
How to configure the orientation outside nuxt.config.ts per each pages?

nuxt.config.js

module: [

[
	'@vite-pwa/nuxt',
	{
		devOptions: {
				enabled: true,
				suppressWarnings: true,
				navigateFallback: '/',
				navigateFallbackAllowlist: [/^\/$/],
				type: 'module',
			},
			registerWebManifestInRouteRules: true,
			registerType: 'autoUpdate',
			manifest: {
				name: 'Cordaria App',
				short_name: 'CordariaApp',
				description:
					'Cordaria é um método de treinamento para a prática de instrumentos de cordas',
					lang: 'pt',
					display: 'fullscreen',
				orientation: 'landscape',
				theme_color: '#1c1f26',
				background_color: '#1c1f26',
				icons: [
					{
						src: '/imgs/icons/icon-192x192.png',
						sizes: '192x192',
						type: 'image/png',
					},
				],
				screenshots: [
					{
						src: 'imgs/screenshots/desktop.png',
						sizes: '1914x1004',
						type: 'image/png',
						form_factor: 'wide',
						label: 'Cordaria App Desktop',
						platform: 'desktop',
					},
					{
						src: 'imgs/screenshots/mobile.png',
						sizes: '939x431',
						type: 'image/png',
						form_factor: 'narrow',
						label: 'Cordaria App Mobile',
					},
				],
			},

			client: {
				installPrompt: true,
			},
			workbox: {
				globPatterns: ['**/*.{js,css,html,png,svg,ico,jpg}'],
			},
			injectManifest: {
				globPatterns: ['**/*.{js,css,html,png,svg,ico,jpg}'],
			},
		},
	],
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions