mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #10045 from overleaf/jel-new-css
[web] Load new CSS if split test enabled GitOrigin-RevId: 87ef524affa58d931b622d2f70ca6dcff7adc53c
This commit is contained in:
parent
049d7573d8
commit
ebed539e6d
6 changed files with 88 additions and 1 deletions
|
@ -197,6 +197,11 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
|
|||
}
|
||||
|
||||
res.locals.buildCssPath = function (themeModifier = '') {
|
||||
if (
|
||||
res.locals.splitTestVariants?.['design-system-updates'] === 'enabled'
|
||||
) {
|
||||
themeModifier = `main-${themeModifier}`
|
||||
}
|
||||
return res.locals.buildStylesheetPath(`${themeModifier}style.css`)
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,10 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
|||
webRouter.get(
|
||||
'*',
|
||||
expressify(
|
||||
SplitTestMiddleware.loadAssignmentsInLocals(['unified-navigation'])
|
||||
SplitTestMiddleware.loadAssignmentsInLocals([
|
||||
'unified-navigation',
|
||||
'design-system-updates',
|
||||
])
|
||||
)
|
||||
)
|
||||
|
||||
|
|
43
services/web/frontend/stylesheets/main-ieee-style.less
Normal file
43
services/web/frontend/stylesheets/main-ieee-style.less
Normal file
|
@ -0,0 +1,43 @@
|
|||
@import 'style.less';
|
||||
@import 'core/ol-ieee-variables.less';
|
||||
|
||||
@is-overleaf-light: false;
|
||||
@show-rich-text: true;
|
||||
|
||||
@ieee-wedge: 30px;
|
||||
|
||||
body > .portal-ieee {
|
||||
padding-top: @header-height;
|
||||
}
|
||||
|
||||
.portal-ieee {
|
||||
.ieee-header {
|
||||
background-color: @ieee-blue;
|
||||
margin-bottom: @margin-xl;
|
||||
padding-bottom: @padding-sm;
|
||||
padding-top: @padding-sm;
|
||||
h1 {
|
||||
margin: 0;
|
||||
}
|
||||
.ieee-logo {
|
||||
width: @navbar-brand-width;
|
||||
}
|
||||
}
|
||||
.ieee-subheader {
|
||||
background-color: @ieee-blue;
|
||||
color: #ffffff;
|
||||
line-height: 1;
|
||||
padding: @padding-md @ieee-wedge;
|
||||
position: relative;
|
||||
&:after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
border-style: solid;
|
||||
left: -1px;
|
||||
top: -1px;
|
||||
border-color: @content-alt-bg-color transparent;
|
||||
border-width: @ieee-wedge @ieee-wedge 0 0;
|
||||
}
|
||||
}
|
||||
}
|
5
services/web/frontend/stylesheets/main-light-style.less
Normal file
5
services/web/frontend/stylesheets/main-light-style.less
Normal file
|
@ -0,0 +1,5 @@
|
|||
@import 'style.less';
|
||||
@import 'core/ol-light-variables.less';
|
||||
|
||||
@is-overleaf-light: true;
|
||||
@show-rich-text: true;
|
28
services/web/frontend/stylesheets/main-style.less
Normal file
28
services/web/frontend/stylesheets/main-style.less
Normal file
|
@ -0,0 +1,28 @@
|
|||
@import (less) '../fonts/lato.css';
|
||||
@import (less) '../fonts/merriweather.css';
|
||||
@import (less) '../fonts/source-code-pro.css';
|
||||
@import (less) '../fonts/stix-two-math.css';
|
||||
|
||||
@is-overleaf-light: false;
|
||||
@show-rich-text: true;
|
||||
|
||||
// Core variables and mixins
|
||||
@import 'core/variables.less';
|
||||
@import 'core/css-variables.less';
|
||||
@import 'app/ol-style-guide.less';
|
||||
@import '_style_includes.less';
|
||||
@import '_ol_style_includes.less';
|
||||
@import 'components/embed-responsive.less';
|
||||
@import 'components/icons.less';
|
||||
@import 'components/images.less';
|
||||
@import 'components/navs-ol.less';
|
||||
@import 'components/pagination.less';
|
||||
@import 'components/tabs.less';
|
||||
|
||||
// Pages
|
||||
@import 'app/about.less';
|
||||
@import 'app/blog-posts.less';
|
||||
@import 'app/cms-page.less';
|
||||
@import 'app/content_page.less';
|
||||
@import 'app/plans-ol.less';
|
||||
@import 'app/portals.less';
|
|
@ -19,6 +19,9 @@ const entryPoints = {
|
|||
style: './frontend/stylesheets/style.less',
|
||||
'ieee-style': './frontend/stylesheets/ieee-style.less',
|
||||
'light-style': './frontend/stylesheets/light-style.less',
|
||||
'main-style': './frontend/stylesheets/main-style.less',
|
||||
'main-ieee-style': './frontend/stylesheets/main-ieee-style.less',
|
||||
'main-light-style': './frontend/stylesheets/main-light-style.less',
|
||||
}
|
||||
|
||||
// Add entrypoints for each "page"
|
||||
|
|
Loading…
Reference in a new issue