aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/regate_pre.tpl
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-04-10 20:44:04 +0000
committerMario <mario@mariovavti.com>2021-04-10 20:44:04 +0000
commitf0e5ce7fd1dae13cc257a8a860fccbc294530776 (patch)
tree050bac84731085a4c8cbc70ae3c9435448dbf11e /view/tpl/regate_pre.tpl
parentea721d380be15d06a9f0974dc98487523fcdfb58 (diff)
downloadvolse-hubzilla-f0e5ce7fd1dae13cc257a8a860fccbc294530776.tar.gz
volse-hubzilla-f0e5ce7fd1dae13cc257a8a860fccbc294530776.tar.bz2
volse-hubzilla-f0e5ce7fd1dae13cc257a8a860fccbc294530776.zip
register: more work on ui/ux
Diffstat (limited to 'view/tpl/regate_pre.tpl')
-rw-r--r--view/tpl/regate_pre.tpl58
1 files changed, 33 insertions, 25 deletions
diff --git a/view/tpl/regate_pre.tpl b/view/tpl/regate_pre.tpl
index adc63b181..7596f6846 100644
--- a/view/tpl/regate_pre.tpl
+++ b/view/tpl/regate_pre.tpl
@@ -1,41 +1,49 @@
-<h2>{{$title}}</h2>
-
-{{$delay_desc.0}}
-<div id="countdown" class="h3"></div>
-
-{{$desc.0}}<br>
-<br>
-{{$desc.1}}<br>
-{{$id}}<br>
-<br>
-{{$desc.2}}<br>
-{{$pin}}<br>
-<br>
-<div class="">
- {{$delay_desc.1}}<br>
- <span id="register_start" data-utc="{{$regdelay}}" class="register_date">
- {{$regdelay}}
- </span>
- &nbsp;&dash;&nbsp;
- <span data-utc="{{$regexpire}}" class="register_date">
- {{$regexpire}}
- </span>
+<div class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ <h2>{{$title}}</h2>
+ </div>
+ <div class="section-content-wrapper">
+ {{if $now}}
+ <div class="section-content-danger-wrapper">
+ <div class="h3">{{$now}}</div>
+ </div>
+ {{else}}
+ <div class="section-content-warning-wrapper">
+ {{$strings.0}}
+ <div id="countdown" class="h3"></div>
+ </div>
+ <div class="section-content-info-wrapper">
+ {{$strings.1}} {{$id}}
+ <div class="h3">{{$pin}}</div>
+ </div>
+ <div class="d-none">
+ {{$strings.2}}<br>
+ <span id="register_start" data-utc="{{$regdelay}}" class="register_date">
+ {{$regdelay}}
+ </span>
+ &nbsp;&dash;&nbsp;
+ <span data-utc="{{$regexpire}}" class="register_date">
+ {{$regexpire}}
+ </span>
+ </div>
+ {{/if}}
+ </div>
</div>
+
<script>
$('.register_date').each( function () {
var date = new Date($(this).data('utc'));
- $(this).html(date.toLocaleString());
+ $(this).html(date.toLocaleString(undefined, {weekday: 'short', hour: 'numeric', minute: 'numeric'}));
});
-
var date = '{{$countdown}}';
-
date = date !== '' ? date : $('#register_start').data('utc');
if(date) {
doCountDown(date, 'countdown');
var x = setInterval(doCountDown, 1000, date, 'countdown');
}
+
function doCountDown(date, id) {
var countDownDate = new Date(date).getTime();
var now = new Date().getTime();