forked from CCCHH/ccchh-website
Create CCCHH theme
This commit is contained in:
parent
8394b08524
commit
2d267ba9fe
23 changed files with 629 additions and 1 deletions
50
themes/ccchh/layouts/index.html
Normal file
50
themes/ccchh/layouts/index.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
{{ define "main" }}
|
||||
<main class="container" 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>
|
||||
|
||||
{{- $events := where (.Site.GetPage "blog").Pages ".Params.kind" "event" }}
|
||||
{{- $upcoming := where $events ".Params.date" "ge" now }}
|
||||
{{ if $upcoming}}
|
||||
<div class="announcements">
|
||||
<h3>Neuigkeiten</h3>
|
||||
{{- range $upcoming.ByDate }}
|
||||
<div class="announcement">
|
||||
<p><a href="{{ .Permalink }}">{{ .Date.Format "2006-01-02" }}: {{ .Title }}</a>
|
||||
{{ .Summary }}
|
||||
{{- if .Truncated }}
|
||||
<a href="{{ .RelPermalink }}">Read More…</a>
|
||||
{{- end }}
|
||||
</p>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{- $home_sections := .Site.GetPage "/home" }}
|
||||
{{- range sort ($home_sections.Resources.Match "*.md") ".Name" }}
|
||||
<div class="section">
|
||||
<h3>{{ .Title }}</h3>
|
||||
{{ .Content -}}
|
||||
|
||||
{{- with .Params.Resources }}
|
||||
<div class="flex-grid">
|
||||
{{- range . }}
|
||||
{{- $img := $home_sections.Resources.GetMatch (printf "%s" .src) }}
|
||||
<div class="img-link"><a href="{{ .params.url }}"><img src="{{ $img.Permalink }}" class="box-image" alt=""></a></div>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</main>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue