Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure orientation in each page (question) #170

Open
lusacramento opened this issue Oct 24, 2024 · 0 comments
Open

Configure orientation in each page (question) #170

lusacramento opened this issue Oct 24, 2024 · 0 comments

Comments

@lusacramento
Copy link

lusacramento commented Oct 24, 2024

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}'],
			},
		},
	],
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant