_mixins.pug 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. //- Buy Buttons
  2. mixin btn_buy_collaborator(location)
  3. a.btn.btn-primary(
  4. data-ol-start-new-subscription='collaborator'
  5. data-ol-location=location
  6. )
  7. span(data-ol-view='monthly') #{translate("start_free_trial")}
  8. span(hidden data-ol-view='annual') #{translate("buy_now")}
  9. mixin btn_buy_personal(location)
  10. a.btn.btn-primary(
  11. data-ol-start-new-subscription='paid-personal'
  12. data-ol-tracking-plan='personal'
  13. data-ol-location=location
  14. )
  15. span(data-ol-view='monthly') #{translate("start_free_trial")}
  16. span(hidden data-ol-view='annual') #{translate("buy_now")}
  17. mixin btn_buy_free(location)
  18. a.btn.btn-primary(
  19. data-ol-has-custom-href
  20. href="/register"
  21. style=(getLoggedInUserId() === null ? "" : "visibility: hidden")
  22. data-ol-start-new-subscription='free'
  23. data-ol-location=location
  24. )
  25. span.text-capitalize #{translate('get_started_now')}
  26. mixin btn_buy_professional(location)
  27. a.btn.btn-primary(
  28. data-ol-start-new-subscription='professional'
  29. data-ol-location=location
  30. )
  31. span(data-ol-view='monthly') #{translate("start_free_trial")}
  32. span(hidden data-ol-view='annual') #{translate("buy_now")}
  33. mixin btn_buy_student(location, plan)
  34. if plan == 'annual'
  35. a.btn.btn-primary(
  36. data-ol-start-new-subscription='student'
  37. data-ol-item-view='annual'
  38. data-ol-tracking-label='student-annual'
  39. data-ol-location=location
  40. ) #{translate("buy_now")}
  41. else
  42. a.btn.btn-primary(
  43. data-ol-start-new-subscription='student'
  44. data-ol-item-view='monthly'
  45. data-ol-tracking-label='student-monthly'
  46. data-ol-location=location
  47. ) #{translate("start_free_trial")}
  48. //- Cards
  49. mixin card_student_annual(location)
  50. .best-value
  51. strong #{translate('best_value')}
  52. .card-header
  53. h2 #{translate("student")} (#{translate("annual")})
  54. h5.tagline #{translate('tagline_student_annual')}
  55. .circle
  56. span
  57. +price_student_annual
  58. +features_student(location, 'annual')
  59. mixin card_student_monthly(location)
  60. .card-header
  61. h2 #{translate("student")}
  62. h5.tagline #{translate('tagline_student_monthly')}
  63. .circle
  64. span
  65. +price_student_monthly
  66. +features_student(location, 'monthly')
  67. //- Features Lists, used within cards
  68. mixin features_collaborator(location)
  69. ul.list-unstyled
  70. li
  71. strong #{translate("collabs_per_proj", {collabcount:10})}
  72. +features_premium
  73. li
  74. br
  75. +btn_buy_collaborator(location)
  76. mixin features_free(location)
  77. ul.list-unstyled
  78. li #{translate("one_collaborator")}
  79. li(class="hidden-xs hidden-sm")  
  80. li(class="hidden-xs hidden-sm")  
  81. li(class="hidden-xs hidden-sm")  
  82. li(class="hidden-xs hidden-sm")  
  83. li(class="hidden-xs hidden-sm")  
  84. li(class="hidden-xs hidden-sm")  
  85. li
  86. br
  87. +btn_buy_free(location)
  88. mixin features_personal(location)
  89. ul.list-unstyled
  90. li #{translate("one_collaborator")}
  91. li  
  92. li
  93. strong #{translate('premium_features')}
  94. li #{translate('sync_dropbox_github')}
  95. li #{translate('full_doc_history')}
  96. li + #{translate('more').toLowerCase()}
  97. li(class="hidden-xs hidden-sm")  
  98. li
  99. br
  100. +btn_buy_personal(location)
  101. mixin features_premium
  102. li  
  103. li
  104. strong #{translate('all_premium_features')}
  105. li #{translate('sync_dropbox_github')}
  106. li #{translate('full_doc_history')}
  107. li #{translate('track_changes')}
  108. li + #{translate('more').toLowerCase()}
  109. mixin features_professional(location)
  110. ul.list-unstyled
  111. li
  112. strong #{translate("unlimited_collabs")}
  113. +features_premium
  114. li
  115. br
  116. +btn_buy_professional(location)
  117. mixin features_student(location, plan)
  118. ul.list-unstyled
  119. li
  120. strong #{translate("collabs_per_proj", {collabcount:6})}
  121. +features_premium
  122. li
  123. br
  124. +btn_buy_student(location, plan)
  125. mixin gen_localized_price_for_plan_view(plan, view)
  126. for currencyCode in Object.keys(settings.localizedPlanPricing)
  127. span(
  128. hidden=(currencyCode !== recommendedCurrency)
  129. data-ol-currencyCode=currencyCode
  130. ) #{settings.localizedPlanPricing[currencyCode][plan][view]}
  131. mixin gen_localized_price_for_plan(plan)
  132. div(data-ol-view='monthly')
  133. +gen_localized_price_for_plan_view(plan, 'monthly')
  134. span.small /mo
  135. div(hidden data-ol-view='annual')
  136. +gen_localized_price_for_plan_view(plan, 'annual')
  137. span.small /yr
  138. //- Prices
  139. mixin price_personal
  140. +gen_localized_price_for_plan('personal')
  141. mixin price_collaborator
  142. +gen_localized_price_for_plan('collaborator')
  143. mixin price_professional
  144. +gen_localized_price_for_plan('professional')
  145. mixin price_student_annual
  146. +gen_localized_price_for_plan_view('student', 'annual')
  147. span.small /yr
  148. mixin price_student_monthly
  149. +gen_localized_price_for_plan_view('student', 'monthly')
  150. span.small /mo
  151. //- UI Control
  152. mixin currency_dropdown
  153. .dropdown.currency-dropdown(dropdown)
  154. a.btn.btn-default.dropdown-toggle(
  155. href="#",
  156. data-toggle="dropdown",
  157. dropdown-toggle
  158. )
  159. for currencyCode in Object.keys(settings.localizedPlanPricing)
  160. span(
  161. hidden=(currencyCode !== recommendedCurrency)
  162. data-ol-currencyCode=currencyCode
  163. ) #{currencyCode} (#{settings.localizedPlanPricing[currencyCode]['symbol']})
  164. span.caret
  165. ul.dropdown-menu.dropdown-menu-right.text-right(role="menu")
  166. for currencyCode in Object.keys(settings.localizedPlanPricing)
  167. li
  168. a(
  169. href='#'
  170. data-ol-currencyCode-switch=currencyCode
  171. ) #{currencyCode} #{settings.localizedPlanPricing[currencyCode]['symbol']}
  172. mixin plan_switch(location)
  173. ul.nav.nav-pills
  174. li.active(data-ol-view-tab='monthly')
  175. a.btn.btn-default-outline(
  176. href="#"
  177. ) #{translate("monthly")}
  178. li(data-ol-view-tab='annual')
  179. a.btn.btn-default-outline(
  180. href="#"
  181. ) #{translate("annual")}
  182. li(data-ol-view-tab='student')
  183. a.btn.btn-default-outline(
  184. href="#"
  185. ) #{translate("special_price_student")}
  186. mixin allCardsAndControls(controlsRowSpaced, listLocation)
  187. - var location = listLocation ? 'card_' + listLocation : 'card'
  188. .row.top-switch(class=(controlsRowSpaced ? "row-spaced" : ""))
  189. .col-md-6.col-md-offset-3
  190. +plan_switch('card')
  191. .col-md-2.text-right
  192. +currency_dropdown
  193. .row
  194. .col-md-10.col-md-offset-1
  195. .row
  196. for view in ['monthly', 'annual']
  197. .card-group.text-centered(data-ol-view=view hidden=(view==='annual'))
  198. .col-md-4
  199. .card.card-first
  200. .card-header
  201. h2 #{translate("personal")}
  202. h5.tagline #{translate("tagline_personal")}
  203. .circle
  204. +price_personal
  205. +features_personal(location)
  206. .col-md-4
  207. .card.card-highlighted
  208. .best-value
  209. strong #{translate('best_value')}
  210. .card-header
  211. h2 #{translate("collaborator")}
  212. h5.tagline #{translate("tagline_collaborator")}
  213. .circle
  214. +price_collaborator
  215. +features_collaborator(location)
  216. .col-md-4
  217. .card.card-last
  218. .card-header
  219. h2 #{translate("professional")}
  220. h5.tagline #{translate("tagline_professional")}
  221. .circle
  222. +price_professional
  223. +features_professional(location)
  224. .card-group.text-centered(hidden data-ol-view='student')
  225. .col-md-4
  226. .card.card-first
  227. .card-header
  228. h2 #{translate("free")}
  229. h5.tagline #{translate("tagline_free")}
  230. .circle #{translate("free")}
  231. +features_free(location)
  232. .col-md-4
  233. .card.card-highlighted
  234. +card_student_annual(location)
  235. .col-md-4
  236. .card.card-last
  237. +card_student_monthly(location)