_plans_page_mixins.pug 6.6 KB

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