_plans_page_mixins.pug 7.6 KB

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