themes/ehc/templates/home.html
69 Zeilen · 2.8 KB · HTML
| 1 | {{define "title"}}{{.Site.Title}}{{end}} |
| 2 | {{define "content"}} |
| 3 | |
| 4 | {{if eq .Page 1}} |
| 5 | <div class="hero-image"> |
| 6 | <!-- <img src="/images/ehc/we-are-family-team-short.webp" alt="EHC Essen (Ruhr) e.V. - We Are Family"> --> |
| 7 | <img src="/images/ehc/we-are-family-v2.webp" alt="EHC Essen (Ruhr) e.V. - We Are Family"> |
| 8 | </div> |
| 9 | |
| 10 | <section class="partner-section"> |
| 11 | <div class="section-head"> |
| 12 | <h2>Unsere Partner</h2> |
| 13 | <a href="/sites/partner/" class="all-link">Alle Partner anzeigen →</a> |
| 14 | </div> |
| 15 | |
| 16 | <!-- Partner-Karussell-Widget; lädt /static/data/partners.json --> |
| 17 | <div id="partner-carousel" data-visible="3" data-interval="3500" aria-label="Partner Karussell"></div> |
| 18 | <div id="partner-carousel-dots" class="carousel-dots"></div> |
| 19 | <script src="/static/js/partner-carousel.js" defer></script> |
| 20 | </section> |
| 21 | {{end}} |
| 22 | |
| 23 | <section class="section"> |
| 24 | <div class="section-head"> |
| 25 | <h2>News</h2> |
| 26 | {{if gt .TotalPages 1}}<a href="{{pageURL 2}}" class="all-link">Ältere News →</a>{{end}} |
| 27 | </div> |
| 28 | |
| 29 | <div class="post-list"> |
| 30 | {{range .Posts}} |
| 31 | <article class="post-card"> |
| 32 | {{if .GetCover}} |
| 33 | <a href="/posts/{{.Slug}}/" class="post-card-cover"> |
| 34 | <img src="{{.GetCover}}" alt="{{.Title}}" loading="lazy"> |
| 35 | </a> |
| 36 | {{end}} |
| 37 | <div class="post-card-body"> |
| 38 | <div class="post-card-meta"> |
| 39 | <time datetime="{{isoDate .Date.Time}}">{{formatDate .Date.Time}}</time> |
| 40 | <div class="post-tags"> |
| 41 | {{range .Tags}}<a href="/tags/{{lower .}}/" class="tag">{{.}}</a>{{end}} |
| 42 | </div> |
| 43 | </div> |
| 44 | <h2 class="post-card-title"><a href="/posts/{{.Slug}}/">{{.Title}}</a></h2> |
| 45 | <p class="post-card-preview">{{.GetPreview}}</p> |
| 46 | <a href="/posts/{{.Slug}}/" class="read-more">Weiterlesen →</a> |
| 47 | </div> |
| 48 | </article> |
| 49 | {{end}} |
| 50 | </div> |
| 51 | </section> |
| 52 | |
| 53 | {{if gt .TotalPages 1}} |
| 54 | <nav class="pagination"> |
| 55 | {{if gt .Page 1}}<a href="{{pageURL (sub .Page 1)}}" class="pagination-btn pagination-prev">← Neuere</a> |
| 56 | {{else}}<span class="pagination-btn pagination-prev disabled">← Neuere</span>{{end}} |
| 57 | <div class="pagination-pages"> |
| 58 | {{range paginationRange $.Page $.TotalPages}} |
| 59 | {{if isEllipsis .}}<span class="pagination-ellipsis">…</span> |
| 60 | {{else if eq . $.Page}}<span class="pagination-num active">{{.}}</span> |
| 61 | {{else}}<a href="{{pageURL .}}" class="pagination-num">{{.}}</a>{{end}} |
| 62 | {{end}} |
| 63 | </div> |
| 64 | {{if lt .Page .TotalPages}}<a href="{{pageURL (add .Page 1)}}" class="pagination-btn pagination-next">Ältere →</a> |
| 65 | {{else}}<span class="pagination-btn pagination-next disabled">Ältere →</span>{{end}} |
| 66 | </nav> |
| 67 | {{end}} |
| 68 | |
| 69 | {{end}} |