Skip to content
Snippets Groups Projects
Commit 0d33e23c authored by Julien Schmidt's avatar Julien Schmidt
Browse files

use single template for index pages

parent 41ad6222
No related merge requests found
{{ define "main" }}
<header>
<h1>
{{ .Title }}
</h1>
</header>
<div class="">
{{ .Content }}
</div>
<main aria-role="main">
<header>
<h1>{{.Title}}</h1>
{{ with .Params.subtitle }}
<span class="subtitle">{{.}}</span>
{{ end }}
</header>
<div class="container">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{.Content}}
</div>
<aside>
<h3>Next Office Hours</h3><!-- TODO: translate -->
<ul>
{{ range getJSON "https://sprechstunden.stusta.mhn.de/appointments.json"}}
<li>{{ dateFormat "Monday, Jan 2, 2006 15:04" (int .start) }}-{{ dateFormat "15:04" (int .end) }}</li>
{{ end }}
</ul>
</aside>
</main>
{{ end }}
{{ define "main" }}
<main aria-role="main">
<header class="homepage-header">
<h1>{{.Title}}</h1>
{{ with .Params.subtitle }}
<span class="subtitle">{{.}}</span>
{{ end }}
</header>
<div class="homepage-content">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{.Content}}
</div>
<aside>
<h3>Next Office Hours</h3><!-- TODO: translate -->
<ul>
{{ range getJSON "https://sprechstunden.stusta.mhn.de/appointments.json"}}
<li>{{ dateFormat "Monday, Jan 2, 2006 15:04" (int .start) }}-{{ dateFormat "15:04" (int .end) }}</li>
{{ end }}
</ul>
</aside>
</main>
{{ end }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment