mirror-index-ng/layouts/index.html

79 lines
2.7 KiB
HTML

{{ define "meta" }}
<meta property="og:title" content="{{ .Site.Title }}" />
<meta property="og:type" content="website" />
<meta property="og:description" content="{{ .Site.Params.Description | markdownify | plainify }}" />
<meta name="description" content="{{ .Site.Title }}" />
{{ end }}
{{ define "main" }}
<div id="center">
<header id="nav">
<img class="logo" src="/include/logo-icon.svg">
<div class="title">
<h1 class="club-name">University of Waterloo</h1>
<br>
<h1 class="club-name">Computer Science Club</h1>
<h2 class="site-name">Open Source Software Mirror</h2>
<br>
<h2 class="mef">
Funded by
<img src="/include/mef_logo.png" alt="MEF Logo">
<a href="https://uwaterloo.ca/math-endowment-fund">Mathematics Endowment Fund</a>
</h2>
</div>
<ul class="links hide-on-single-col">
<li><a class="link" href="https://csclub.uwaterloo.ca">Home</a></li>
<li><a class="link" href="https://wiki.csclub.uwaterloo.ca">Wiki</a></li>
<li><a class="link current">Mirror</a></li>
</ul>
</header>
<main>
<div id="left">
{{ partial "project_table" . }}
</div>
<div id="right" class="news">
<h2>Mirror News</h2>
<ul>
{{ range (where .Site.Pages "Section" "news") }}
{{ range .Pages }}
<li>
<span class="news-date">{{ .Date.Format "2006-01-02" }}</span>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
{{ end }}
<a href="/news" style="display: block; margin-top: .8em; text-align: end">All News</a>
</ul>
<h2>Contact Us</h2>
<dl>
<dt>Contact Syscom by Email</dt>
<dd><a href="mailto:syscom@csclub.uwaterloo.ca">syscom@csclub.uwaterloo.ca</a></dd>
<dt>IRC</dt>
<dd><a href="https://web.libera.chat/#chat-with-syscom">#chat-with-syscom on Libera.Chat</a></dd>
<dt>Discord</dt>
<dd><a href="https://discord.gg/pHfYBCg">#chat-with-syscom on CSC Discord</a></dd>
</dl>
</div>
</main>
{{ partial "footer" }}
</div>
<script src="https://unpkg.com/htmx.org@1.9.2"></script>
<script>
const sleep = ms => new Promise(r => setTimeout(r, ms));
const update_project_table = setInterval(async function() {
await htmx.ajax('GET', '/include/project_table.html',
{target:'#project-table', swap:'outerHTML swap:2s settle:2s'});
refresh_indicator = document.getElementById('refresh-indicator');
refresh_indicator.style = "opacity: 1"
await sleep(2*1000);
refresh_indicator.style = "opacity: 0"
}, 60*1000);
</script>
{{ end }}