mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Unified Navigation Bar + Split Test (#5972)
GitOrigin-RevId: 9fbde79aba1395956d591989b6161290777cc28f
This commit is contained in:
parent
d48dbed536
commit
2667e9a11c
4 changed files with 44 additions and 9 deletions
|
@ -75,7 +75,9 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
|||
webRouter.get('*', AnalyticsUTMTrackingMiddleware.recordUTMTags())
|
||||
webRouter.get(
|
||||
'*',
|
||||
expressify(SplitTestMiddleware.loadAssignmentsInLocals([]))
|
||||
expressify(
|
||||
SplitTestMiddleware.loadAssignmentsInLocals(['unified-navigation'])
|
||||
)
|
||||
)
|
||||
|
||||
webRouter.get('/login', UserPagesController.loginPage)
|
||||
|
|
|
@ -36,7 +36,7 @@ nav.navbar.navbar-default.navbar-main
|
|||
|
||||
|
||||
// loop over header_extras
|
||||
each item in nav.header_extras
|
||||
each item in ((splitTestVariants && (splitTestVariants['unified-navigation'] === 'show-unified-navigation')) ? nav.header_extras_unified : nav.header_extras)
|
||||
-
|
||||
if ((item.only_when_logged_in && getSessionUser())
|
||||
|| (item.only_when_logged_out && (!getSessionUser()))
|
||||
|
@ -67,13 +67,25 @@ nav.navbar.navbar-default.navbar-main
|
|||
else
|
||||
li
|
||||
if child.url
|
||||
a(href=child.url, class=child.class) !{translate(child.text)}
|
||||
a(
|
||||
href=child.url,
|
||||
class=child.class,
|
||||
event-tracking=child.event
|
||||
event-tracking-mb="true"
|
||||
event-tracking-trigger="click"
|
||||
) !{translate(child.text)}
|
||||
else
|
||||
| !{translate(child.text)}
|
||||
else
|
||||
li(class=item.class)
|
||||
if item.url
|
||||
a(href=item.url, class=item.class) !{translate(item.text)}
|
||||
a(
|
||||
href=item.url,
|
||||
class=item.class,
|
||||
event-tracking=item.event
|
||||
event-tracking-mb="true"
|
||||
event-tracking-trigger="click"
|
||||
) !{translate(item.text)}
|
||||
else
|
||||
| !{translate(item.text)}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ nav.navbar.navbar-default.navbar-main
|
|||
|
||||
|
||||
// loop over header_extras
|
||||
each item in nav.header_extras
|
||||
each item in ((splitTestVariants && (splitTestVariants['unified-navigation'] === 'show-unified-navigation')) ? nav.header_extras_unified : nav.header_extras)
|
||||
-
|
||||
if ((item.only_when_logged_in && getSessionUser())
|
||||
|| (item.only_when_logged_out && (!getSessionUser()))
|
||||
|
@ -51,13 +51,25 @@ nav.navbar.navbar-default.navbar-main
|
|||
else
|
||||
li
|
||||
if child.url
|
||||
a(href=child.url, class=child.class) !{translate(child.text)}
|
||||
a(
|
||||
href=child.url,
|
||||
class=child.class,
|
||||
event-tracking=child.event
|
||||
event-tracking-mb="true"
|
||||
event-tracking-trigger="click"
|
||||
) !{translate(child.text)}
|
||||
else
|
||||
| !{translate(child.text)}
|
||||
else
|
||||
li(class=item.class)
|
||||
if item.url
|
||||
a(href=item.url, class=item.class) !{translate(item.text)}
|
||||
a(
|
||||
href=item.url,
|
||||
class=item.class,
|
||||
event-tracking=item.event
|
||||
event-tracking-mb="true"
|
||||
event-tracking-trigger="click"
|
||||
) !{translate(item.text)}
|
||||
else
|
||||
| !{translate(item.text)}
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
div.modal.fade(tabindex="-1" role="dialog" data-ol-group-plan-modal)
|
||||
.modal-dialog(role="document")
|
||||
.modal-content
|
||||
.modal-content(
|
||||
event-tracking="form-submitted-groups-modal-open"
|
||||
event-tracking-mb="true"
|
||||
event-tracking-trigger="load"
|
||||
)
|
||||
.modal-header
|
||||
h2 Customise your group subscription
|
||||
h3 Save 30% or more
|
||||
|
@ -71,7 +75,12 @@ div.modal.fade(tabindex="-1" role="dialog" data-ol-group-plan-modal)
|
|||
| The educational discount is available for groups of 10 or more
|
||||
.modal-footer
|
||||
.text-center
|
||||
button.btn.btn-primary.btn-lg(data-ol-purchase-group-plan) Purchase Now
|
||||
button.btn.btn-primary.btn-lg(
|
||||
data-ol-purchase-group-plan
|
||||
event-tracking="form-submitted-groups-modal-purchase-click"
|
||||
event-tracking-mb="true"
|
||||
event-tracking-trigger="click"
|
||||
) Purchase Now
|
||||
hr.thin
|
||||
a(
|
||||
href
|
||||
|
|
Loading…
Reference in a new issue