mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #18558 from overleaf/td-bs5-query-string-override
Add a mechanism to hide incomplete Bootstrap 5 pages by default GitOrigin-RevId: 07cc998bf3a0bed9df2f43d1c04c62d167c9b893
This commit is contained in:
parent
c67e677157
commit
3b2e60ece7
4 changed files with 10 additions and 6 deletions
|
@ -338,6 +338,12 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
|
||||||
next()
|
next()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
webRouter.use(function (req, res, next) {
|
||||||
|
res.locals.bootstrap5Override =
|
||||||
|
req.query['bootstrap-5-override'] === 'enabled'
|
||||||
|
next()
|
||||||
|
})
|
||||||
|
|
||||||
webRouter.use(function (req, res, next) {
|
webRouter.use(function (req, res, next) {
|
||||||
res.locals.ExposedSettings = {
|
res.locals.ExposedSettings = {
|
||||||
isOverleaf: Settings.overleaf != null,
|
isOverleaf: Settings.overleaf != null,
|
||||||
|
|
|
@ -6,7 +6,7 @@ html(
|
||||||
class=(fixedSizeDocument ? 'fixed-size-document' : undefined)
|
class=(fixedSizeDocument ? 'fixed-size-document' : undefined)
|
||||||
)
|
)
|
||||||
- metadata = metadata || {}
|
- metadata = metadata || {}
|
||||||
- let bootstrap5EnabledPage = false
|
- let bootstrap5PageStatus = 'disabled' // One of 'disabled', 'enabled', and 'queryStringOnly'
|
||||||
|
|
||||||
block entrypointVar
|
block entrypointVar
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ html(
|
||||||
head
|
head
|
||||||
include ./_metadata.pug
|
include ./_metadata.pug
|
||||||
|
|
||||||
- const bootstrapVersion = bootstrap5EnabledPage && splitTestVariants['bootstrap-5'] === 'enabled' ? 5 : 3
|
- const bootstrapVersion = bootstrap5PageStatus !== 'disabled' && (bootstrap5Override || (bootstrap5PageStatus === 'enabled' && splitTestVariants['bootstrap-5'] === 'enabled')) ? 5 : 3
|
||||||
|
|
||||||
//- Stylesheet
|
//- Stylesheet
|
||||||
link(rel='stylesheet', href=buildCssPath(getCssThemeModifier(userSettings, brandVariation), bootstrapVersion), id="main-stylesheet")
|
link(rel='stylesheet', href=buildCssPath(getCssThemeModifier(userSettings, brandVariation), bootstrapVersion), id="main-stylesheet")
|
||||||
|
|
|
@ -5,9 +5,7 @@ block entrypointVar
|
||||||
|
|
||||||
block vars
|
block vars
|
||||||
- var suppressNavContentLinks = true
|
- var suppressNavContentLinks = true
|
||||||
|
- bootstrap5PageStatus = 'queryStringOnly' // One of 'disabled', 'enabled', and 'queryStringOnly'
|
||||||
block vars
|
|
||||||
- bootstrap5EnabledPage = true
|
|
||||||
|
|
||||||
block append meta
|
block append meta
|
||||||
meta(name="ol-usersBestSubscription" data-type="json" content=usersBestSubscription)
|
meta(name="ol-usersBestSubscription" data-type="json" content=usersBestSubscription)
|
||||||
|
|
|
@ -4,7 +4,7 @@ block entrypointVar
|
||||||
- entrypoint = 'pages/user/settings'
|
- entrypoint = 'pages/user/settings'
|
||||||
|
|
||||||
block vars
|
block vars
|
||||||
- bootstrap5EnabledPage = true
|
- bootstrap5PageStatus = 'enabled' // One of 'disabled', 'enabled', and 'queryStringOnly'
|
||||||
|
|
||||||
block append meta
|
block append meta
|
||||||
meta(name="ol-hasPassword" data-type="boolean" content=hasPassword)
|
meta(name="ol-hasPassword" data-type="boolean" content=hasPassword)
|
||||||
|
|
Loading…
Reference in a new issue