81 lines
3 KiB
Handlebars
81 lines
3 KiB
Handlebars
{{!< default}}
|
|
{{!--
|
|
Beitragsübersicht. Auf der Startseite (Seite 1) steht der neueste Beitrag als großes Bild
|
|
über die volle Breite, darunter zwei große Karten, die Reiseziele, die Themenblöcke und
|
|
die übrigen Beiträge. Ab Seite 2 nur die Beiträge.
|
|
--}}
|
|
<main class="site-main container">
|
|
|
|
{{#is "home"}}
|
|
{{#foreach posts from="1" to="1"}}
|
|
<article class="hero{{#unless feature_image}} hero--plain{{/unless}}">
|
|
{{#if feature_image}}
|
|
<img class="hero__image"
|
|
srcset="{{img_url feature_image size="m"}} 750w,
|
|
{{img_url feature_image size="l"}} 1140w,
|
|
{{img_url feature_image size="xl"}} 1920w"
|
|
sizes="(max-width: 1240px) 100vw, 1200px"
|
|
src="{{img_url feature_image size="l"}}"
|
|
alt="">
|
|
{{/if}}
|
|
<div class="hero__text">
|
|
{{#primary_tag}}<a class="hero__tag" href="{{url}}">{{name}}</a>{{/primary_tag}}
|
|
<h2 class="hero__title"><a href="{{url}}">{{title}}</a></h2>
|
|
{{#if custom_excerpt}}<p class="hero__excerpt">{{custom_excerpt}}</p>{{/if}}
|
|
<time class="hero__date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="D. MMMM YYYY"}}</time>
|
|
</div>
|
|
</article>
|
|
{{/foreach}}
|
|
|
|
<div class="post-grid post-grid--two post-grid--lead">
|
|
{{#foreach posts from="2" to="3"}}
|
|
{{> "post-card" sizes="(max-width: 640px) 100vw, 600px"}}
|
|
{{/foreach}}
|
|
</div>
|
|
|
|
{{> "destinations"}}
|
|
|
|
{{#if @custom.home_tags}}
|
|
{{#get "tags" filter=(concat "slug:[" @custom.home_tags "]") limit="6"}}
|
|
{{#foreach tags}}{{> "tag-section"}}{{/foreach}}
|
|
{{/get}}
|
|
{{else}}
|
|
{{#get "tags" limit="3" include="count.posts" order="count.posts desc" filter="visibility:public"}}
|
|
{{#foreach tags}}{{> "tag-section"}}{{/foreach}}
|
|
{{/get}}
|
|
{{/if}}
|
|
|
|
<section class="section">
|
|
<header class="section__header">
|
|
<h2 class="section__title">{{t "More posts"}}</h2>
|
|
</header>
|
|
<div class="post-grid">
|
|
{{#foreach posts from="4"}}
|
|
{{> "post-card"}}
|
|
{{/foreach}}
|
|
</div>
|
|
</section>
|
|
{{else}}
|
|
<section class="section">
|
|
<header class="section__header">
|
|
<h1 class="section__title">{{t "Latest posts"}}</h1>
|
|
</header>
|
|
<div class="post-grid">
|
|
{{#foreach posts}}
|
|
{{> "post-card"}}
|
|
{{/foreach}}
|
|
</div>
|
|
</section>
|
|
{{/is}}
|
|
|
|
{{pagination}}
|
|
|
|
{{#is "home"}}
|
|
{{#if @custom.about_text}}
|
|
{{> "about"}}
|
|
{{else if @custom.about_image}}
|
|
{{> "about"}}
|
|
{{/if}}
|
|
{{/is}}
|
|
|
|
</main>
|