Wp2ghost/GhostTheme/fernweh/partials/sidebar.hbs

55 lines
2.4 KiB
Handlebars
Raw Normal View History

2026-10-14 19:12:29 +02:00
{{!-- Seitenleiste der Beitragsübersicht: Über uns, Banner, empfohlene Beiträge, Themen --}}
<aside class="sidebar">
{{#if @custom.about_image}}
<section class="widget widget--about">
{{#if @custom.about_url}}<a href="{{@custom.about_url}}">{{/if}}
<img class="widget__portrait" loading="lazy" src="{{img_url @custom.about_image size="s"}}" alt="{{t "About us"}}">
{{#if @custom.about_url}}</a>{{/if}}
<h2 class="widget__title">{{#if @custom.about_url}}<a href="{{@custom.about_url}}">{{t "About us"}}</a>{{else}}{{t "About us"}}{{/if}}</h2>
{{#if @custom.about_text}}<p class="widget__text">{{@custom.about_text}}</p>{{/if}}
</section>
{{else if @custom.about_text}}
<section class="widget widget--about">
<h2 class="widget__title">{{#if @custom.about_url}}<a href="{{@custom.about_url}}">{{t "About us"}}</a>{{else}}{{t "About us"}}{{/if}}</h2>
<p class="widget__text">{{@custom.about_text}}</p>
</section>
{{/if}}
{{#if @custom.banner_image}}
<section class="widget">
<a class="banner" {{#if @custom.banner_url}}href="{{@custom.banner_url}}"{{/if}}>
<img loading="lazy" src="{{img_url @custom.banner_image size="s"}}" alt="{{@custom.banner_title}}">
{{#if @custom.banner_title}}<span class="banner__title">{{@custom.banner_title}}</span>{{/if}}
</a>
</section>
{{/if}}
{{!-- Empfohlene Beiträge; gibt es keine, stehen hier die neuesten --}}
{{#get "posts" filter="featured:true" limit="4"}}
<section class="widget">
<h2 class="widget__title">{{t "Featured"}}</h2>
{{> "sidebar-posts"}}
</section>
{{else}}
{{#get "posts" limit="4"}}
<section class="widget">
<h2 class="widget__title">{{t "Latest posts"}}</h2>
{{> "sidebar-posts"}}
</section>
{{/get}}
{{/get}}
{{#get "tags" limit="12" include="count.posts" order="count.posts desc" filter="visibility:public"}}
<section class="widget">
<h2 class="widget__title">{{t "Topics"}}</h2>
<ul class="tag-index">
{{#foreach tags}}
<li><a href="{{url}}">{{name}}</a><span class="meta">{{count.posts}}</span></li>
{{/foreach}}
</ul>
</section>
{{/get}}
</aside>