mirror of
https://github.com/ZetaKebab/kesper.git
synced 2025-08-03 04:37:38 +00:00
Redesign templates
This commit is contained in:
@ -33,16 +33,34 @@ which templates loop over to generate a list of posts. --}}
|
||||
{{/unless}}
|
||||
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="post-card-image-link" href="{{url}}">
|
||||
{{#primary_tag}}
|
||||
{{#if feature_image}}
|
||||
{{!-- This is a responsive image, it loads different sizes depending on device
|
||||
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
|
||||
<img class="post-card-image"
|
||||
srcset="{{img_url feature_image size="s"}} 300w,
|
||||
{{img_url feature_image size="m"}} 600w,
|
||||
{{img_url feature_image size="l"}} 1000w,
|
||||
{{img_url feature_image size="xl"}} 2000w"
|
||||
sizes="(max-width: 1000px) 400px, 800px"
|
||||
src="{{img_url feature_image size="m"}}"
|
||||
alt="{{#if primary_tag}}{{primary_tag}}{{else}}{{title}}{{/if}}"
|
||||
loading="lazy"
|
||||
/>
|
||||
{{/if}}
|
||||
{{/primary_tag}}
|
||||
</a>
|
||||
{{/if}}
|
||||
|
||||
|
||||
|
||||
<div class="post-card-content">
|
||||
|
||||
<a class="post-card-content-link" href="{{url}}">
|
||||
<header class="post-card-header">
|
||||
<div class="post-card-tags">
|
||||
{{#primary_tag}}
|
||||
<span class="post-card-primary-tag">{{name}}</span>
|
||||
{{/primary_tag}}
|
||||
{{#if featured}}
|
||||
<span class="post-card-featured">{{> "icons/fire"}} Featured</span>
|
||||
{{/if}}
|
||||
@ -58,16 +76,13 @@ which templates loop over to generate a list of posts. --}}
|
||||
{{title}}
|
||||
</h2>
|
||||
</header>
|
||||
{{#if excerpt}}
|
||||
<div class="post-card-excerpt">{{excerpt}}</div>
|
||||
{{/if}}
|
||||
</a>
|
||||
{{#if excerpt}}
|
||||
<div class="post-card-excerpt">{{excerpt}}</div>
|
||||
{{/if}}
|
||||
|
||||
<footer class="post-card-meta">
|
||||
<time class="post-card-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
|
||||
{{#if reading_time}}
|
||||
<span class="post-card-meta-length">{{reading_time}}</span>
|
||||
{{/if}}
|
||||
<time class="post-card-meta-date" datetime="{{date format="D MMMM YYYY"}}">{{date format="D MMMM YYYY"}}</time>
|
||||
{{#if @site.comments_enabled}}
|
||||
{{comment_count}}
|
||||
{{/if}}
|
||||
|
Reference in New Issue
Block a user