[web] Add the meta[viewport] tag to all pages (#6301)

* Always add the meta[viewport] tag
* Set metadata.viewport to false on projects list page
* Remove setting metadata.viewport = true
* Add viewport: false to editor page

GitOrigin-RevId: 6f9d4c1972e3e6fdf1b6c23cd17d57ba866fcaeb
This commit is contained in:
Alf Eaton 2022-01-19 11:56:26 +00:00 committed by Copybot
parent d1e210319b
commit ee00ff3c44
11 changed files with 6 additions and 20 deletions

View file

@ -587,6 +587,7 @@ const ProjectController = {
reconfirmedViaSAML,
zipFileSizeLimit: Settings.maxUploadSize,
isOverleaf: !!Settings.overleaf,
metadata: { viewport: false },
}
const paidUser =
@ -962,6 +963,7 @@ const ProjectController = {
Boolean(Settings.resetServiceWorker) &&
!shouldDisplayFeature('enable_pdf_caching', false),
detachRole,
metadata: { viewport: false },
})
timer.done()
}

View file

@ -100,7 +100,7 @@ if (metadata && metadata.openGraphVideo)
meta(property="og:video", content=metadata.openGraphVideo)
//- Viewport
if metadata && metadata.viewport
if !metadata || metadata.viewport !== false
meta(name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes")
//- Noindex

View file

@ -1,7 +1,7 @@
extends ../layout/layout-no-js
block vars
- metadata = { title: 'Something went wrong', viewport: true }
- metadata = { title: 'Something went wrong' }
block body
body.full-height

View file

@ -1,7 +1,7 @@
extends ../layout/layout-no-js
block vars
- metadata = { title: 'Something went wrong', viewport: true }
- metadata = { title: 'Something went wrong' }
block body
body.full-height

View file

@ -1,7 +1,7 @@
extends ../layout/layout-no-js
block vars
- metadata = { title: 'Unsupported browser', viewport: true }
- metadata = { title: 'Unsupported browser' }
block body
body.full-height

View file

@ -1,8 +1,5 @@
extends ../../layout
block vars
- metadata = { viewport: true }
block content
script(type="template", id="overleaf-token-access-data")!= StringHelper.stringifyJsonForScript({ postUrl: postUrl, csrfToken: csrfToken})

View file

@ -4,7 +4,6 @@ include ./plans-marketing/_mixins
include ./plans-marketing/_tables
block vars
- metadata = { viewport: true }
- entrypoint = 'pages/user/subscription/plans'
block append meta

View file

@ -1,8 +1,5 @@
extends ../layout-marketing
block vars
- metadata = { viewport: true }
block content
main.content.content-alt#main-content
.container

View file

@ -1,8 +1,5 @@
extends ../layout-marketing
block vars
- metadata = { viewport: true }
block content
.content.content-alt
main.login-register-container#main-content

View file

@ -1,8 +1,5 @@
extends ../layout-marketing
block vars
- metadata = { viewport: true }
block content
main.content.content-alt#main-content
.container

View file

@ -1,9 +1,6 @@
extends ../layout-marketing
include ../_mixins/recaptcha
block vars
- metadata = { viewport: true }
block content
- var showCaptcha = settings.recaptcha && settings.recaptcha.siteKey && !(settings.recaptcha.disabled && settings.recaptcha.disabled.passwordReset)