mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #19376 from overleaf/jel-light-touch-remove-unused
[web] Remove unused code for light touch plans page redesign GitOrigin-RevId: 9e160ed59eec5f8a700b88c0591fb0200c2dc403
This commit is contained in:
parent
ccac1047d6
commit
3084ff921b
2 changed files with 17 additions and 41 deletions
|
@ -28,31 +28,20 @@ mixin currency_and_payment_methods()
|
||||||
|
|
||||||
|
|
||||||
mixin plans_table(period, config)
|
mixin plans_table(period, config)
|
||||||
- var baseColspan = config.baseColspan || 1
|
|
||||||
- var maxColumn = config.maxColumn || 4
|
- var maxColumn = config.maxColumn || 4
|
||||||
- var tableHeadKeys = Object.keys(config.tableHead)
|
- var tableHeadKeys = Object.keys(config.tableHead)
|
||||||
|
- var highlightedColKey = tableHeadKeys[config.highlightedColumn.index]
|
||||||
|
|
||||||
tr(class=`plans-table-cols-${tableHeadKeys.length}`)
|
tr(class=`plans-table-cols-${tableHeadKeys.length}`)
|
||||||
th(colspan=baseColspan)
|
th
|
||||||
- for (var i = 0; i < maxColumn; i++)
|
- for (var i = 0; i < maxColumn; i++)
|
||||||
- var tableHeadKey = tableHeadKeys[i]
|
- var tableHeadKey = tableHeadKeys[i]
|
||||||
- var tableHeadOptions = Object.values(config.tableHead)[i] || {}
|
- var tableHeadOptions = Object.values(config.tableHead)[i] || {}
|
||||||
- var colspan = tableHeadOptions.colspan || baseColspan
|
- var highlighted = highlightedColKey === tableHeadKey
|
||||||
- var highlighted = i === config.highlightedColumn.index
|
|
||||||
- var eventTrackingKey = config.eventTrackingKey
|
- var eventTrackingKey = config.eventTrackingKey
|
||||||
- var additionalEventSegmentation = config.additionalEventSegmentation || {}
|
- var additionalEventSegmentation = config.additionalEventSegmentation || {}
|
||||||
-
|
- var thClass = highlighted ? 'plans-table-green-highlighted' : ''
|
||||||
if (highlighted) {
|
|
||||||
var thClass = 'plans-table-green-highlighted'
|
|
||||||
} else {
|
|
||||||
var thClass = ''
|
|
||||||
}
|
|
||||||
thClass += ' plans-table-column-header'
|
|
||||||
if (colspan > 1) {
|
|
||||||
var scopeValue = 'colgroup'
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
var scopeValue = 'col'
|
|
||||||
}
|
|
||||||
case tableHeadKey
|
case tableHeadKey
|
||||||
when 'individual_free'
|
when 'individual_free'
|
||||||
- var ariaLabel = translate("free")
|
- var ariaLabel = translate("free")
|
||||||
|
@ -77,8 +66,7 @@ mixin plans_table(period, config)
|
||||||
th(
|
th(
|
||||||
aria-label=ariaLabel
|
aria-label=ariaLabel
|
||||||
class=thClass
|
class=thClass
|
||||||
colspan=colspan
|
scope="col"
|
||||||
scope=scopeValue
|
|
||||||
)
|
)
|
||||||
.plans-table-th
|
.plans-table-th
|
||||||
if (highlighted)
|
if (highlighted)
|
||||||
|
@ -104,7 +92,7 @@ mixin plans_table(period, config)
|
||||||
+table_head_student_university(highlighted, eventTrackingKey, additionalEventSegmentation, period)
|
+table_head_student_university(highlighted, eventTrackingKey, additionalEventSegmentation, period)
|
||||||
|
|
||||||
for featuresPerSection in config.features
|
for featuresPerSection in config.features
|
||||||
- var dividerColspan = Object.values(config.tableHead).reduce((prev, curr) => (prev) + (curr.colspan || 1), baseColspan)
|
- var dividerColspan = Object.values(config.tableHead).length + 1
|
||||||
if featuresPerSection.divider
|
if featuresPerSection.divider
|
||||||
tr.plans-table-divider
|
tr.plans-table-divider
|
||||||
td(
|
td(
|
||||||
|
@ -134,12 +122,10 @@ mixin plans_table(period, config)
|
||||||
class=`plans-table-cols-${tableHeadKeys.length}`
|
class=`plans-table-cols-${tableHeadKeys.length}`
|
||||||
)
|
)
|
||||||
th(
|
th(
|
||||||
class="plans-table-row-header"
|
|
||||||
event-tracking="plans-page-table"
|
event-tracking="plans-page-table"
|
||||||
event-tracking-trigger="hover"
|
event-tracking-trigger="hover"
|
||||||
event-tracking-ga="subscription-funnel"
|
event-tracking-ga="subscription-funnel"
|
||||||
event-tracking-label=`${feature.feature}`
|
event-tracking-label=`${feature.feature}`
|
||||||
colspan=baseColspan
|
|
||||||
scope="row"
|
scope="row"
|
||||||
)
|
)
|
||||||
.plans-table-feature-name
|
.plans-table-feature-name
|
||||||
|
@ -165,19 +151,9 @@ mixin plans_table(period, config)
|
||||||
| #{translate(feature.feature)}
|
| #{translate(feature.feature)}
|
||||||
for plan, planIndex in Object.keys(feature.plans)
|
for plan, planIndex in Object.keys(feature.plans)
|
||||||
- var tableHeadOptions = Object.values(config.tableHead)[planIndex] || {}
|
- var tableHeadOptions = Object.values(config.tableHead)[planIndex] || {}
|
||||||
- var colspan = tableHeadOptions.colspan || baseColspan
|
- var tdClass = planIndex === config.highlightedColumn.index ? 'plans-table-green-highlighted' : ''
|
||||||
-
|
|
||||||
if (planIndex === config.highlightedColumn.index) {
|
td(class=tdClass)
|
||||||
var tdClass = 'plans-table-green-highlighted'
|
|
||||||
} else if (planIndex === config.highlightedColumn.index - 1) {
|
|
||||||
var tdClass = 'plans-table-cell-before-green-highlighted-column'
|
|
||||||
} else {
|
|
||||||
var tdClass = ''
|
|
||||||
}
|
|
||||||
td(
|
|
||||||
class=tdClass
|
|
||||||
colspan=colspan
|
|
||||||
)
|
|
||||||
+table_cell(feature, plan)
|
+table_cell(feature, plan)
|
||||||
|
|
||||||
mixin table_individual(period)
|
mixin table_individual(period)
|
||||||
|
|
|
@ -557,7 +557,7 @@
|
||||||
// See https://stackoverflow.com/a/56913789 for more details
|
// See https://stackoverflow.com/a/56913789 for more details
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.plans-table-row-header {
|
th[scope='row'] {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -616,12 +616,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.plans-table-column-header,
|
th[scope='col'],
|
||||||
td {
|
td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.plans-table-column-header {
|
th[scope='col'] {
|
||||||
font-family: @headings-font-family;
|
font-family: @headings-font-family;
|
||||||
font-size: @font-size-h2;
|
font-size: @font-size-h2;
|
||||||
font-weight: @headings-font-weight;
|
font-weight: @headings-font-weight;
|
||||||
|
@ -650,7 +650,7 @@
|
||||||
|
|
||||||
// css hack for table border-radius on the first feature name
|
// css hack for table border-radius on the first feature name
|
||||||
&:nth-child(2) {
|
&:nth-child(2) {
|
||||||
.plans-table-row-header:first-child {
|
th[scope='row']:first-child {
|
||||||
.plans-table-feature-name {
|
.plans-table-feature-name {
|
||||||
border-top-left-radius: @plans-table-border-radius;
|
border-top-left-radius: @plans-table-border-radius;
|
||||||
|
|
||||||
|
@ -798,7 +798,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.plans-table-column-header {
|
th[scope='col'] {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@
|
||||||
// the width: 100vw rule will enhance the flex-flow on the tr by ensuring the feature name (first column of each feature row)
|
// the width: 100vw rule will enhance the flex-flow on the tr by ensuring the feature name (first column of each feature row)
|
||||||
// will have the full width of viewport,
|
// will have the full width of viewport,
|
||||||
// and making the first td appear like the it is in its own row (although it's technically still on the same tr as the other tds)
|
// and making the first td appear like the it is in its own row (although it's technically still on the same tr as the other tds)
|
||||||
.plans-table-row-header {
|
th[scope='row'] {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
|
||||||
span.plans-table-feature-name {
|
span.plans-table-feature-name {
|
||||||
|
|
Loading…
Reference in a new issue