Refactor
Splitting up files
This commit is contained in:
parent
ab990b71f1
commit
7c4eefd66b
10 changed files with 188 additions and 191 deletions
25
partials/card.hbs
Normal file
25
partials/card.hbs
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{!--
|
||||
Re-usable card for linking to posts
|
||||
--}}
|
||||
|
||||
<article class="gh-card {{post_class}} {{#if feature_image}}with-image{{else}}no-image{{/if}}">
|
||||
<a class="gh-card-link" href="{{url}}">
|
||||
{{#if feature_image}}
|
||||
<img class="gh-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, 700px"
|
||||
src="{{img_url feature_image size="m"}}"
|
||||
alt="{{title}}"
|
||||
/>
|
||||
{{/if}}
|
||||
<div class="gh-card-content">
|
||||
<span class="gh-card-meta"><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time> <span class="bull">•</span> {{reading_time}}</span>
|
||||
<h2 class="gh-card-title">{{title}}</h2>
|
||||
<p>{{excerpt}}</p>
|
||||
<strong>Read more</strong>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
Loading…
Add table
Add a link
Reference in a new issue