basho/custom-account.hbs
2025-06-11 22:59:02 +10:00

140 lines
5.3 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{!< default}}
{{#post}}
{{#if @member.paid}}
<div class="account-section{{>partial_mode}}">
<div class="account-header archive-section is-image">
<div class="account-image archive-image global-image">
{{>icons/site/user}}
{{#if @member.avatar_image}}
<img src="{{@member.avatar_image}}">
{{/if}}
</div>
<h1 class="archive-title global-title">{{#if @member.name}}{{@member.name}}{{else}}{{t "Your account"}}{{/if}}</h1>
<p class="archive-excerpt global-excerpt">
{{#if custom_excerpt}}
{{custom_excerpt}}
{{else}}
{{t "Nice, youre a paying subscriber! Youve an active account with access to all posts."}}
{{/if}}
</p>
{{#foreach @member.subscriptions}}
<div class="account-details">
<div class="account-details-wrap global-radius">
<h2 class="account-details-title">{{t "Account details"}}</h2>
<div class="account-details-content">
<div class="account-detail-column">
<div>
<label class="account-detail-heading">{{t "Email address"}}</label>
<span class="account-detail-content">{{@member.email}}</span>
</div>
<div>
<label class="account-detail-heading">{{t "Your plan"}}</label>
<span class="account-detail-content">{{tier.name}}{{price plan}}/{{plan.interval}}</span>
</div>
</div>
<div class="account-detail-column">
<div>
<label class="account-detail-heading">{{t "Card"}}</label>
<span class="account-detail-content">**** **** **** {{default_payment_card_last4}}</span>
</div>
<div>
<label class="account-detail-heading">
{{#if cancel_at_period_end}}
{{t "Expires"}}
{{else}}
{{t "Next bill date"}}
{{/if}}
</label>
<span class="account-detail-content">{{date current_period_end format="DD MMM YYYY"}}</span>
</div>
</div>
{{#if cancel_at_period_end}}
<small class="account-alert-expired">
{{t "Your subscription will expire on"}}{{date current_period_end format="DD MMMM YYYY"}}. {{t "If you change your mind in the meantime you can turn auto-renew back on to continue your subscription."}}
</small>
{{/if}}
<div class="account-signout-wrap">
<span class="account-signout global-button" data-members-signout>{{t "Sign out"}}</span>
</div>
</div>
</div>
<div class="account-buttons">
<a href="javascript:" class="account-button" data-portal="account">{{t "Account settings"}}</a>
{{cancel_link class="account-button" errorClass="cancel-error global-alert" cancelLabel=(t "Cancel subscription") continueLabel=(t "Continue subscription")}}
<a href="javascript:" class="account-button-billing" data-members-edit-billing>
{{t "Edit billing info"}} <span>&rarr;</span>
</a>
</div>
</div>
{{/foreach}}
</div>
</div>
{{#get "posts" limit="6" filter="visibility:[members,paid,tiers]+feature_image:-null" include="authors" as |special_posts|}}
{{#if special_posts}}
{{>related label=(t "The latest posts {start-bold}only for subscribers{end-bold}" start-bold="<span>" end-bold="</span>")}}
{{/if}}
{{/get}}
{{else if @member}}
<div class="account-section{{>partial_mode}}">
<div class="account-header archive-section is-image">
<div class="account-image archive-image global-image">
{{>icons/site/user}}
{{#if @member.avatar_image}}
<img src="{{@member.avatar_image}}">
{{/if}}
</div>
<h1 class="archive-title global-title">{{#if @member.name}}{{@member.name}}{{else}}{{t "Your account"}}{{/if}}</h1>
<p class="archive-excerpt global-excerpt">
{{#if custom_excerpt}}
{{custom_excerpt}}
{{else}}
{{#if @site.paid_members_enabled}}
{{t "Currently, youre not a paying subscriber. Youve an active account with access to posts for subscribers only."}}
{{else}}
{{t "Youve an active account with access to posts for subscribers."}}
{{/if}}
{{/if}}
</p>
<div class="account-details">
<div class="account-details-wrap global-radius">
<h2 class="account-details-title">{{t "Account details"}}</h2>
<div class="account-details-content">
<div class="account-detail-column">
<div>
<label class="account-detail-heading">{{t "Email address"}}</label>
<span class="account-detail-content">{{@member.email}}</span>
</div>
</div>
{{#if @site.paid_members_enabled}}
<div class="account-detail-column">
<div>
<label class="account-detail-heading">{{t "Your plan"}}</label>
<span class="account-detail-content">{{t "Free"}}</span>
</div>
</div>
{{/if}}
<div class="account-signout-wrap">
<span class="account-signout global-button" data-members-signout>{{t "Sign out"}}</span>
</div>
</div>
</div>
<div class="account-buttons">
<a href="javascript:" class="account-button" data-portal="account">{{t "Account settings"}}</a>
</div>
</div>
</div>
</div>
{{#if @site.paid_members_enabled}}
{{>members/tiers}}
{{/if}}
{{#get "posts" limit="6" filter="visibility:[members,paid,tiers]+feature_image:-null" include="authors" as |special_posts|}}
{{#if special_posts}}
{{>related label=(t "The latest posts {start-bold}only for subscribers{end-bold}" start-bold="<span>" end-bold="</span>")}}
{{/if}}
{{/get}}
{{else}}
{{#contentFor "script_js"}}
<script>window.addEventListener("load",function(){window.location='{{@site.url}}'})</script>
{{/contentFor}}
{{/if}}
{{/post}}