_plans_page_mixins.pug 7.6 KB

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