|
| 1 | +--- |
| 2 | +--- |
| 3 | + |
| 4 | +<html> |
| 5 | + <head> |
| 6 | + {% include head.html %} |
| 7 | + </head> |
| 8 | + <body> |
| 9 | + {% include header.html %} |
| 10 | + <div class="container"> |
| 11 | + <div class="page-header" id="conf-title"> |
| 12 | + <div class="row"> |
| 13 | + <div class="col-sm-12"> |
| 14 | + <h1> |
| 15 | + <span id="conf-title-href" href="/conference/{{page.title | slugify}}-{{page.year}}">{{page.title}} {{page.year}}</span> |
| 16 | + <span id="twitter-box"><a href="https://twitter.com/share" class="twitter-share-button" data-text="Countdown to the #{{ page.title }}{{ page.year }} deadline!" data-show-count="false" style="font-size:13px;">Tweet</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script></span> |
| 17 | + </h1> |
| 18 | + {% if page.full_name %} |
| 19 | + <h3 id="conf-full-name">{{page.full_name}} |
| 20 | + </h3> |
| 21 | + {% endif %} |
| 22 | + </div> |
| 23 | + </div> |
| 24 | + <div class="row"> |
| 25 | + <div class="col-sm-12" id="conf-subs"> |
| 26 | + <span id="conf-subs" title="Conference subjects"> |
| 27 | + {% assign subs = page.sub | split: "," %} |
| 28 | + {% for sub in subs %} |
| 29 | + <span class="{{sub}}-tag badge badge-light conf-sub conf-{{sub}}"> |
| 30 | + {% for tp in site.data.types %} |
| 31 | + {% if sub == tp.sub %} |
| 32 | + {{tp.name}} |
| 33 | + {% endif %} |
| 34 | + {% endfor %} |
| 35 | + </span> |
| 36 | + {% endfor %} |
| 37 | + </span> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + </div> |
| 41 | + <div id="page-content"> |
| 42 | + <div id="conf-key-facts" class="row"> |
| 43 | + <div class="col-12"> |
| 44 | + <img src="/static/img/084-calendar.svg" class="badge-link" /> |
| 45 | + <span id="conf-date">{{page.date}}</span> |
| 46 | + </div> |
| 47 | + <div class="col-12"> |
| 48 | + <img src="/static/img/072-location.svg" class="badge-link" /> |
| 49 | + <a id="conf-place" target="_blank" href="{% if page.place == 'Online' %}#{% else %}https://maps.google.com/?q={{page.place}}{% endif %}">{{page.place}}</a> |
| 50 | + </div> |
| 51 | + <div class="col-12"> |
| 52 | + <img src="/static/img/203-earth.svg" class="badge-link" /> |
| 53 | + <a id="conf-website" target="_blank" href="{{page.link}}">{{page.link}}</a> |
| 54 | + </div> |
| 55 | + {% if page.cfplink %} |
| 56 | + <div class="col-12"> |
| 57 | + <img src="/static/img/035-file-text.svg" class="badge-link" /> |
| 58 | + <a id="conf-cfplink" target="_blank" href="{{page.cfplink}}">Call for Participation</a> |
| 59 | + </div> |
| 60 | + {% endif %} |
| 61 | + {% if page.twitter %} |
| 62 | + <div class="col-12"> |
| 63 | + <img src="/static/img/407-twitter.svg" class="badge-link" /> |
| 64 | + <a id="conf-twitter" target="_blank" href="https://twitter.com/{{page.twitter}}">@{{page.twitter}}</a> |
| 65 | + </div> |
| 66 | + {% endif %} |
| 67 | + {% if page.mastodon %} |
| 68 | + <div class="col-12"> |
| 69 | + <img src="/static/img/407-mastodon.svg" class="badge-link" /> |
| 70 | + <a id="conf-mastodon" target="_blank" href="{{page.mastodon}}">Mastodon</a> |
| 71 | + </div> |
| 72 | + {% endif %} |
| 73 | + </div> |
| 74 | + <div id="conf-deadline-info" class="row"> |
| 75 | + <div class="meta deadline col-12 col-md-6"> |
| 76 | + Download Conference deadline: |
| 77 | + </div> |
| 78 | + <div id="conference-deadline" class="calendar meta col-sm-12 col-md-6"></div> |
| 79 | + <div class="meta deadline col-12 col-md-6"> |
| 80 | + Deadline in timezone from conference website: |
| 81 | + </div> |
| 82 | + <div class="meta col-sm-12 col-md-6"> |
| 83 | + <span class="deadline-time"></span> |
| 84 | + </div> |
| 85 | + <div class="meta col-sm-12 col-md-6"> |
| 86 | + Deadline in your local <span class="local-timezone"></span> timezone: |
| 87 | + </div> |
| 88 | + <div class="local-timezone-hide meta col-sm-12 col-md-6"> |
| 89 | + <span class="deadline-local-time"></span> |
| 90 | + </div> |
| 91 | + </div> |
| 92 | + <div id="conf-deadline-timer" class="row"> |
| 93 | + <div id="cfp-timer" class="col-12 conf-timer">{% if page.cfp == "TBA" %}TBA{%endif%} |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + </div> |
| 97 | + <hr> |
| 98 | + <footer> |
| 99 | + {% include footer.html %} |
| 100 | + </footer> |
| 101 | + </div> |
| 102 | + <script type="text/javascript" charset="utf-8"> |
| 103 | + $(function() { |
| 104 | + // Timezone deadline shenanigans |
| 105 | + var url = new URL(window.location); |
| 106 | + var conf = url.searchParams.get('id'); |
| 107 | + |
| 108 | + var DateTime = luxon.DateTime; |
| 109 | + var today = DateTime.now(); |
| 110 | + |
| 111 | + {% include load_data.js %} |
| 112 | + {% include utils.js %} |
| 113 | + |
| 114 | + $('.local-timezone').text(today.toFormat('z')); |
| 115 | + |
| 116 | + // other |
| 117 | + |
| 118 | + {% if page.cfp == "TBA" %} |
| 119 | + $('#cfp-timer').html("TBA"); |
| 120 | + $('.deadline-time').html("TBA"); |
| 121 | + $('.deadline-local-time').html("TBA"); |
| 122 | + {% else %} |
| 123 | + |
| 124 | + // Use specified timezone for deadlines if available else use AoE timezone |
| 125 | + {% if page.timezone %} |
| 126 | + var confDeadline = DateTime.fromSQL("{{page.cfp}}", {zone: "{{page.timezone}}"}); |
| 127 | + {% else %} |
| 128 | + var confDeadline = DateTime.fromSQL("{{page.cfp}}", {zone: "UTC-12"}); |
| 129 | + {% endif %} |
| 130 | + |
| 131 | + // check if timezone is valid otherwise replace by system timezone |
| 132 | + if (confDeadline.invalid) { |
| 133 | + var confDeadline = DateTime.fromSQL("{{page.cfp}}"); |
| 134 | + console.log("Invalid timezone. Using system timezone instead."); |
| 135 | + } |
| 136 | + |
| 137 | + // add calendar |
| 138 | + var conferenceDeadlineCalendar = createCalendarFromObject({ |
| 139 | + id: '{{page.id}}', |
| 140 | + title: '{{page.title}} {{page.year}} deadline', |
| 141 | + date: confDeadline.toJSDate(), |
| 142 | + duration: 60, |
| 143 | + }) |
| 144 | + document.querySelector('#conference-deadline').appendChild(conferenceDeadlineCalendar); |
| 145 | + |
| 146 | + // render countdown timer |
| 147 | + $('#cfp-timer').countdown(confDeadline.toJSDate(), function(event) { |
| 148 | + $(this).html(event.strftime('%D days %Hh %Mm %Ss')); |
| 149 | + }); |
| 150 | + |
| 151 | + // render deadline conference time |
| 152 | + {% if page.timezone %} |
| 153 | + $('.deadline-time').html(confDeadline.setZone("{{page.timezone}}").toLocaleString(DateTime.DATETIME_HUGE_WITH_SECONDS)); |
| 154 | + {% else %} |
| 155 | + $('.deadline-time').html(confDeadline.setZone("UTC-12").toLocaleString(DateTime.DATETIME_HUGE_WITH_SECONDS)); |
| 156 | + {% endif %} |
| 157 | + |
| 158 | + // render deadline in local timezone |
| 159 | + $('.deadline-local-time').html(confDeadline.setZone('system').toLocaleString(DateTime.DATETIME_HUGE_WITH_SECONDS)); |
| 160 | + |
| 161 | + {% endif %} |
| 162 | + |
| 163 | + }); |
| 164 | + </script> |
| 165 | + </body> |
| 166 | +</html> |
0 commit comments