btcp-digital-store/views/_access.pug

18 lines
597 B
Plaintext

- token_url = urlpath + "?token=" + access.token
- down_url = token_url + '&download'
- view_url = token_url + '&view'
- expiry_str = new Date(access.expiry*1000).toUTCString()
p Thank you for paying. You can access the purchased file below:
p
a.btn.btn-primary(href=down_url) Download
= ' '
a.btn.btn-secondary(href=view_url) View
p.text-muted.
Your access will expire #[span(data-countdown-to=access.expiry, title=expiry_str) at #{ expiry_str }].
Until then, you can return to this page to access the file #[a(href=token_url) using this link].
script(src='_assets/countdown.js')