Fix interstitial page student plans have wrong button background color (#8489)

GitOrigin-RevId: f9f3ec239c06c9ecc7e608aaf879d69041c0a9a3
This commit is contained in:
M Fahru 2022-06-20 08:21:22 -04:00 committed by Copybot
parent 6235f3ea56
commit 66c27ae153

View file

@ -4,32 +4,33 @@ mixin plans_v2_table(period, config)
- for (var i = 0; i < 4; i++) - for (var i = 0; i < 4; i++)
- var tableHeadKey = Object.keys(config.tableHead)[i] - var tableHeadKey = Object.keys(config.tableHead)[i]
- var tableHeadOptions = Object.values(config.tableHead)[i] - var tableHeadOptions = Object.values(config.tableHead)[i]
- var highlighted = i === config.highlightedColumn.index
th( th(
class=(i === config.highlightedColumn.index ? 'plans-v2-table-green-highlighted' : (i === config.highlightedColumn.index - 1 ? 'plans-v2-table-cell-before-highlighted-column' : '')) class=(i === config.highlightedColumn.index ? 'plans-v2-table-green-highlighted' : (i === config.highlightedColumn.index - 1 ? 'plans-v2-table-cell-before-highlighted-column' : ''))
) )
if (i === config.highlightedColumn.index) if (highlighted)
p.plans-v2-table-green-highlighted-text !{config.highlightedColumn.text[period]} p.plans-v2-table-green-highlighted-text !{config.highlightedColumn.text[period]}
case tableHeadKey case tableHeadKey
when 'individual_free' when 'individual_free'
+table_head_individual_free(period) +table_head_individual_free(highlighted, period)
when 'individual_personal' when 'individual_personal'
+table_head_individual_personal(period) +table_head_individual_personal(highlighted, period)
when 'individual_collaborator' when 'individual_collaborator'
+table_head_individual_collaborator(period) +table_head_individual_collaborator(highlighted, period)
when 'individual_professional' when 'individual_professional'
+table_head_individual_professional(period) +table_head_individual_professional(highlighted, period)
when 'group_collaborator' when 'group_collaborator'
+table_head_group_collaborator() +table_head_group_collaborator(highlighted)
when 'group_professional' when 'group_professional'
+table_head_group_professional() +table_head_group_professional(highlighted)
when 'group_organization' when 'group_organization'
+table_head_group_organization() +table_head_group_organization(highlighted)
when 'student_free' when 'student_free'
+table_head_student_free(period) +table_head_student_free(highlighted, period)
when 'student_student' when 'student_student'
+table_head_student_student(period, tableHeadOptions.showExtraContent) +table_head_student_student(highlighted, period, tableHeadOptions.showExtraContent)
when 'student_university' when 'student_university'
+table_head_student_university(period) +table_head_student_university(highlighted, period)
for featuresPerSection in config.features for featuresPerSection in config.features
if featuresPerSection.divider if featuresPerSection.divider
@ -95,54 +96,54 @@ mixin table_student(period)
table.card.plans-v2-table.plans-v2-table-student table.card.plans-v2-table.plans-v2-table-student
+plans_v2_table(period, plansV2Config.student) +plans_v2_table(period, plansV2Config.student)
mixin table_head_individual_free(period) mixin table_head_individual_free(highlighted, period)
.plans-v2-table-th-content .plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("free")} p.plans-v2-table-th-content-title #{translate("free")}
+table_head_price('free', period) +table_head_price('free', period)
.plans-v2-table-btn-buy-container-mobile .plans-v2-table-btn-buy-container-mobile
+btn_buy_individual_free() +btn_buy_individual_free(highlighted)
ul.plans-v2-table-th-content-benefit ul.plans-v2-table-th-content-benefit
li #{translate("one_collaborator")} li #{translate("one_collaborator")}
.plans-v2-table-btn-buy-container-desktop .plans-v2-table-btn-buy-container-desktop
+btn_buy_individual_free() +btn_buy_individual_free(highlighted)
mixin table_head_individual_personal(period) mixin table_head_individual_personal(highlighted, period)
.plans-v2-table-th-content .plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("personal")} p.plans-v2-table-th-content-title #{translate("personal")}
+table_head_price('personal', period) +table_head_price('personal', period)
.plans-v2-table-btn-buy-container-mobile .plans-v2-table-btn-buy-container-mobile
+btn_buy_individual_personal(period) +btn_buy_individual_personal(highlighted, period)
ul.plans-v2-table-th-content-benefit ul.plans-v2-table-th-content-benefit
li #{translate("one_collaborator")} li #{translate("one_collaborator")}
li #{translate("most_premium_features")} li #{translate("most_premium_features")}
.plans-v2-table-btn-buy-container-desktop .plans-v2-table-btn-buy-container-desktop
+btn_buy_individual_personal(period) +btn_buy_individual_personal(highlighted, period)
mixin table_head_individual_collaborator(period) mixin table_head_individual_collaborator(highlighted, period)
.plans-v2-table-th-content .plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("standard")} p.plans-v2-table-th-content-title #{translate("standard")}
+table_head_price('collaborator', period) +table_head_price('collaborator', period)
.plans-v2-table-btn-buy-container-mobile .plans-v2-table-btn-buy-container-mobile
+btn_buy_individual_collaborator(period) +btn_buy_individual_collaborator(highlighted, period)
ul.plans-v2-table-th-content-benefit ul.plans-v2-table-th-content-benefit
li !{translate("x_collaborators_per_project", {collaboratorsCount: '10'})} li !{translate("x_collaborators_per_project", {collaboratorsCount: '10'})}
li #{translate("all_premium_features")} li #{translate("all_premium_features")}
.plans-v2-table-btn-buy-container-desktop .plans-v2-table-btn-buy-container-desktop
+btn_buy_individual_collaborator(period) +btn_buy_individual_collaborator(highlighted, period)
mixin table_head_individual_professional(period) mixin table_head_individual_professional(highlighted, period)
.plans-v2-table-th-content .plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("professional")} p.plans-v2-table-th-content-title #{translate("professional")}
+table_head_price('professional', period) +table_head_price('professional', period)
.plans-v2-table-btn-buy-container-mobile .plans-v2-table-btn-buy-container-mobile
+btn_buy_individual_professional(period) +btn_buy_individual_professional(highlighted, period)
ul.plans-v2-table-th-content-benefit ul.plans-v2-table-th-content-benefit
li #{translate("unlimited_collabs")} li #{translate("unlimited_collabs")}
li #{translate("all_premium_features")} li #{translate("all_premium_features")}
.plans-v2-table-btn-buy-container-desktop .plans-v2-table-btn-buy-container-desktop
+btn_buy_individual_professional(period) +btn_buy_individual_professional(highlighted, period)
mixin table_head_group_collaborator() mixin table_head_group_collaborator(highlighted)
.plans-v2-table-th-content .plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("group_standard")} p.plans-v2-table-th-content-title #{translate("group_standard")}
.plans-v2-table-price-container .plans-v2-table-price-container
@ -153,7 +154,7 @@ mixin table_head_group_collaborator()
p.plans-v2-table-price-period-label p.plans-v2-table-price-period-label
| per user / year | per user / year
.plans-v2-table-btn-buy-container-mobile .plans-v2-table-btn-buy-container-mobile
+btn_buy_group_collaborator() +btn_buy_group_collaborator(highlighted)
+additional_link_group('group_collaborator') +additional_link_group('group_collaborator')
ul.plans-v2-table-th-content-benefit ul.plans-v2-table-th-content-benefit
li #{translate("up_to")} !{translate("x_collaborators_per_project", {collaboratorsCount: '10'})} li #{translate("up_to")} !{translate("x_collaborators_per_project", {collaboratorsCount: '10'})}
@ -161,10 +162,10 @@ mixin table_head_group_collaborator()
span.plans-v2-group-total-price(data-ol-plans-v2-group-total-price='collaborator') #{initialLocalizedGroupPrice.price.collaborator} span.plans-v2-group-total-price(data-ol-plans-v2-group-total-price='collaborator') #{initialLocalizedGroupPrice.price.collaborator}
span &nbsp;#{translate("total_per_year_lowercase")} span &nbsp;#{translate("total_per_year_lowercase")}
.plans-v2-table-btn-buy-container-desktop .plans-v2-table-btn-buy-container-desktop
+btn_buy_group_collaborator() +btn_buy_group_collaborator(highlighted)
+additional_link_group('group_collaborator') +additional_link_group('group_collaborator')
mixin table_head_group_professional() mixin table_head_group_professional(highlighted)
.plans-v2-table-th-content .plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("group_professional")} p.plans-v2-table-th-content-title #{translate("group_professional")}
.plans-v2-table-price-container .plans-v2-table-price-container
@ -175,7 +176,7 @@ mixin table_head_group_professional()
p.plans-v2-table-price-period-label p.plans-v2-table-price-period-label
| per user / year | per user / year
.plans-v2-table-btn-buy-container-mobile .plans-v2-table-btn-buy-container-mobile
+btn_buy_group_professional() +btn_buy_group_professional(highlighted)
+additional_link_group('group_professional') +additional_link_group('group_professional')
ul.plans-v2-table-th-content-benefit ul.plans-v2-table-th-content-benefit
li #{translate("unlimited_collaborators_in_each_project")} li #{translate("unlimited_collaborators_in_each_project")}
@ -183,17 +184,17 @@ mixin table_head_group_professional()
span.plans-v2-group-total-price(data-ol-plans-v2-group-total-price='professional') #{initialLocalizedGroupPrice.price.professional} span.plans-v2-group-total-price(data-ol-plans-v2-group-total-price='professional') #{initialLocalizedGroupPrice.price.professional}
span &nbsp;#{translate("total_per_year_lowercase")} span &nbsp;#{translate("total_per_year_lowercase")}
.plans-v2-table-btn-buy-container-desktop .plans-v2-table-btn-buy-container-desktop
+btn_buy_group_professional() +btn_buy_group_professional(highlighted)
+additional_link_group('group_professional') +additional_link_group('group_professional')
mixin table_head_group_organization() mixin table_head_group_organization(highlighted)
.plans-v2-table-th-content .plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("organization")} p.plans-v2-table-th-content-title #{translate("organization")}
.plans-v2-table-comments-icon .plans-v2-table-comments-icon
i.fa.fa-comments-o i.fa.fa-comments-o
.plans-v2-table-btn-buy-container-mobile .plans-v2-table-btn-buy-container-mobile
+btn_buy_group_organization() +btn_buy_group_organization(highlighted)
small.plans-v2-table-th-content-additional-link.invisible(aria-hidden="true") small.plans-v2-table-th-content-additional-link.invisible(aria-hidden="true")
ul.plans-v2-table-th-content-benefit ul.plans-v2-table-th-content-benefit
li #{translate("best_choices_companies_universities_non_profits")} li #{translate("best_choices_companies_universities_non_profits")}
@ -208,26 +209,26 @@ mixin table_head_group_organization()
event-segmentation='{"button": "group_organization-link", "location": "table-header-list", "period": "annual", "plans-page-layout-v2": "new-plans-page"}' event-segmentation='{"button": "group_organization-link", "location": "table-header-list", "period": "annual", "plans-page-layout-v2": "new-plans-page"}'
) #{translate("also_available_as_on_premises")} ) #{translate("also_available_as_on_premises")}
.plans-v2-table-btn-buy-container-desktop .plans-v2-table-btn-buy-container-desktop
+btn_buy_group_organization() +btn_buy_group_organization(highlighted)
small.plans-v2-table-th-content-additional-link.invisible(aria-hidden="true") small.plans-v2-table-th-content-additional-link.invisible(aria-hidden="true")
mixin table_head_student_free(period) mixin table_head_student_free(highlighted, period)
div.plans-v2-table-th-content div.plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("free")} p.plans-v2-table-th-content-title #{translate("free")}
+table_head_price('free', period) +table_head_price('free', period)
.plans-v2-table-btn-buy-container-mobile .plans-v2-table-btn-buy-container-mobile
+btn_buy_student_free() +btn_buy_student_free(highlighted)
ul.plans-v2-table-th-content-benefit ul.plans-v2-table-th-content-benefit
li #{translate("one_collaborator")} li #{translate("one_collaborator")}
.plans-v2-table-btn-buy-container-desktop .plans-v2-table-btn-buy-container-desktop
+btn_buy_student_free() +btn_buy_student_free(highlighted)
mixin table_head_student_student(period, showExtraContent) mixin table_head_student_student(highlighted, period, showExtraContent)
div.plans-v2-table-th-content div.plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("student")} p.plans-v2-table-th-content-title #{translate("student")}
+table_head_price('student', period) +table_head_price('student', period)
.plans-v2-table-btn-buy-container-mobile .plans-v2-table-btn-buy-container-mobile
+btn_buy_student_student(period) +btn_buy_student_student(highlighted, period)
ul.plans-v2-table-th-content-benefit ul.plans-v2-table-th-content-benefit
li !{translate("x_collaborators_per_project", {collaboratorsCount: '6'})} li !{translate("x_collaborators_per_project", {collaboratorsCount: '6'})}
li #{translate("all_premium_features")} li #{translate("all_premium_features")}
@ -235,18 +236,18 @@ mixin table_head_student_student(period, showExtraContent)
li #{translate("for_students_only")} li #{translate("for_students_only")}
.plans-v2-table-btn-buy-container-desktop .plans-v2-table-btn-buy-container-desktop
+btn_buy_student_student(period) +btn_buy_student_student(highlighted, period)
mixin table_head_student_university(period) mixin table_head_student_university(highlighted, period)
div.plans-v2-table-th-content div.plans-v2-table-th-content
p.plans-v2-table-th-content-title #{translate("university")} p.plans-v2-table-th-content-title #{translate("university")}
div.plans-v2-table-comments-icon div.plans-v2-table-comments-icon
i.fa.fa-comments-o i.fa.fa-comments-o
.plans-v2-table-btn-buy-container-mobile .plans-v2-table-btn-buy-container-mobile
+btn_buy_student_university(period) +btn_buy_student_university(highlighted, period)
p.plans-v2-table-th-content-benefit !{translate("all_our_group_plans_offer_educational_discount", {}, [{name: 'b'}, {name: 'b'}])} p.plans-v2-table-th-content-benefit !{translate("all_our_group_plans_offer_educational_discount", {}, [{name: 'b'}, {name: 'b'}])}
.plans-v2-table-btn-buy-container-desktop .plans-v2-table-btn-buy-container-desktop
+btn_buy_student_university(period) +btn_buy_student_university(highlighted, period)
mixin table_head_price(plan, period) mixin table_head_price(plan, period)
div.plans-v2-table-price-container div.plans-v2-table-price-container
@ -324,86 +325,90 @@ mixin group_plans_license_picker()
) #{translate("learn_more_lowercase")} ) #{translate("learn_more_lowercase")}
span ) span )
mixin btn_buy_individual(subscriptionPlan, period, highlighted) mixin btn_buy_individual(highlighted, subscriptionPlan, period)
if (highlighted) a.btn.plans-v2-table-btn-buy(
a.btn.btn-primary.plans-v2-table-btn-buy( data-ol-start-new-subscription=subscriptionPlan
data-ol-start-new-subscription=subscriptionPlan data-ol-item-view=period
data-ol-item-view=period class=(highlighted ? 'btn-primary' : 'btn-default')
) )
if (period === 'monthly') if (period === 'monthly')
span #{translate("try_for_free")} span #{translate("try_for_free")}
else else
span #{translate("buy_now_no_exclamation_mark")} span #{translate("buy_now_no_exclamation_mark")}
else
a.btn.btn-default.plans-v2-table-btn-buy(
data-ol-start-new-subscription=subscriptionPlan
data-ol-item-view=period
)
if (period === 'monthly')
span #{translate("try_for_free")}
else
span #{translate("buy_now_no_exclamation_mark")}
mixin btn_buy_individual_free() mixin btn_buy_individual_free()
if (!getSessionUser()) if (!getSessionUser())
a.btn.btn-default.plans-v2-table-btn-buy(href="/register") a.btn.plans-v2-table-btn-buy(
href="/register"
class=(highlighted ? 'btn-primary' : 'btn-default')
)
span #{translate("try_for_free")} span #{translate("try_for_free")}
else else
a.btn.btn-default.plans-v2-table-btn-buy.invisible(aria-hidden="true") a.btn.plans-v2-table-btn-buy.invisible(
aria-hidden="true"
class=(highlighted ? 'btn-primary' : 'btn-default')
)
mixin btn_buy_individual_personal(period) mixin btn_buy_individual_personal(highlighted, period)
+btn_buy_individual('paid-personal', period, false) +btn_buy_individual(highlighted, 'paid-personal', period)
if (period === 'monthly') if (period === 'monthly')
+additional_link_buy('paid-personal', period) +additional_link_buy('paid-personal', period)
mixin btn_buy_individual_collaborator(period) mixin btn_buy_individual_collaborator(highlighted, period)
+btn_buy_individual('collaborator', period, true) +btn_buy_individual(highlighted, 'collaborator', period)
if (period === 'monthly') if (period === 'monthly')
+additional_link_buy('collaborator', period) +additional_link_buy('collaborator', period)
mixin btn_buy_individual_professional(period) mixin btn_buy_individual_professional(highlighted, period)
+btn_buy_individual('professional', period, false) +btn_buy_individual(highlighted, 'professional', period)
if (period === 'monthly') if (period === 'monthly')
+additional_link_buy('professional', period) +additional_link_buy('professional', period)
mixin btn_buy_group_collaborator() mixin btn_buy_group_collaborator(highlighted)
a.btn.btn-default.plans-v2-table-btn-buy( a.btn.plans-v2-table-btn-buy(
data-ol-start-new-subscription='group_collaborator' data-ol-start-new-subscription='group_collaborator'
data-ol-item-view='annual' data-ol-item-view='annual'
data-ol-has-custom-href data-ol-has-custom-href
class=(highlighted ? 'btn-primary' : 'btn-default')
) )
span #{translate("customize")} span #{translate("customize")}
span.hidden-mobile #{translate("your_plan_lowercase")} span.hidden-mobile #{translate("your_plan_lowercase")}
mixin btn_buy_group_professional() mixin btn_buy_group_professional(highlighted)
a.btn.btn-primary.plans-v2-table-btn-buy( a.btn.plans-v2-table-btn-buy(
data-ol-start-new-subscription='group_professional' data-ol-start-new-subscription='group_professional'
data-ol-item-view='annual' data-ol-item-view='annual'
data-ol-has-custom-href data-ol-has-custom-href
class=(highlighted ? 'btn-primary' : 'btn-default')
) )
span #{translate("customize")} span #{translate("customize")}
span.hidden-mobile #{translate("your_plan_lowercase")} span.hidden-mobile #{translate("your_plan_lowercase")}
mixin btn_buy_group_organization() mixin btn_buy_group_organization(highlighted)
a.btn.btn-default.plans-v2-table-btn-buy( a.btn.plans-v2-table-btn-buy(
data-ol-start-new-subscription='group_organization' data-ol-start-new-subscription='group_organization'
data-ol-item-view='annual' data-ol-item-view='annual'
data-ol-has-custom-href data-ol-has-custom-href
href='/for/enterprises/sales-contact' href='/for/enterprises/sales-contact'
target='_blank' target='_blank'
class=(highlighted ? 'btn-primary' : 'btn-default')
) )
span #{translate("contact_us_lowercase")} span #{translate("contact_us_lowercase")}
mixin btn_buy_student_free() mixin btn_buy_student_free(highlighted)
if (!getSessionUser()) if (!getSessionUser())
a.btn.btn-default.plans-v2-table-btn-buy(href="/register") a.btn.plans-v2-table-btn-buy(
href="/register"
class=(highlighted ? 'btn-primary' : 'btn-default')
)
span #{translate("try_for_free")} span #{translate("try_for_free")}
mixin btn_buy_student_student(period) mixin btn_buy_student_student(highlighted, period)
a.btn.btn-primary.plans-v2-table-btn-buy( a.btn.plans-v2-table-btn-buy(
data-ol-start-new-subscription='student' data-ol-start-new-subscription='student'
data-ol-item-view=period data-ol-item-view=period
data-ol-location='card' data-ol-location='card'
class=(highlighted ? 'btn-primary' : 'btn-default')
) )
if (period === 'monthly') if (period === 'monthly')
span #{translate("try_for_free")} span #{translate("try_for_free")}
@ -412,14 +417,15 @@ mixin btn_buy_student_student(period)
if (period === 'monthly') if (period === 'monthly')
+additional_link_buy('student', period) +additional_link_buy('student', period)
mixin btn_buy_student_university(period) mixin btn_buy_student_university(highlighted, period)
a.btn.btn-default.plans-v2-table-btn-buy( a.btn.plans-v2-table-btn-buy(
href="/for/enterprises/sales-contact" href="/for/enterprises/sales-contact"
target="_blank" target="_blank"
event-tracking="plans-page-click" event-tracking="plans-page-click"
event-tracking-mb="true" event-tracking-mb="true"
event-tracking-trigger="click" event-tracking-trigger="click"
event-segmentation='{"button": "student-university", "location": "table-header-list", "period": "' + period + '", "plans-page-layout-v2": "new-plans-page"}' event-segmentation='{"button": "student-university", "location": "table-header-list", "period": "' + period + '", "plans-page-layout-v2": "new-plans-page"}'
class=(highlighted ? 'btn-primary' : 'btn-default')
) )
span #{translate("contact_us_lowercase")} span #{translate("contact_us_lowercase")}