File clean up and template progress
This commit is contained in:
parent
a90d43108d
commit
99e7a30d40
22805 changed files with 2842 additions and 1355016 deletions
22
partials/article/card.hbs
Normal file
22
partials/article/card.hbs
Normal file
|
@ -0,0 +1,22 @@
|
|||
{{!--
|
||||
Re-usable card for linking to posts
|
||||
--}}
|
||||
|
||||
<article class="relative {{post_class}}">
|
||||
{{#if feature_image}}
|
||||
<div class="absolute top-3 left-3">{{> "article/tags" }}</div>
|
||||
<a href={{url}} aria-hidden="true">
|
||||
<img class="w-full mb-5"
|
||||
data-srcset="{{> srcset}}"
|
||||
data-sizes="auto"
|
||||
src="{{img_url feature_image size="m"}}"
|
||||
srcset="{{> srcset}}"
|
||||
sizes="auto"
|
||||
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{/if}}">
|
||||
</a>
|
||||
{{else}}
|
||||
<div class="top-3 left-3 mb-2">{{> "article/tags" }}</div>
|
||||
{{/if}}
|
||||
<a class="text-lg block" href={{url}} aria-label="Read article entitled: {{title}}" title="Read article entitled: {{title}}">{{title}}</a>
|
||||
<span class="text-xs text-slate-500"><time itemprop="datePublished" datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time> <span class="bull">•</span> {{reading_time}}</span>
|
||||
</article>
|
19
partials/article/list.hbs
Normal file
19
partials/article/list.hbs
Normal file
|
@ -0,0 +1,19 @@
|
|||
<article class="flex flex-row items-center h-20 border-b border-b-neutral-800 p-3 transition ease-in hover:bg-zinc-800 duration-300 hover:rounded {{post_class}}">
|
||||
{{#if feature_image}}
|
||||
<a class="w-44 mr-7 h-full shrink-0 overflow-hidden rounded" href={{url}} aria-hidden="true">
|
||||
<img class="mt-0 mb-0 relative -top-1/3"
|
||||
data-srcset="{{img_url feature_image size='s'}} 400w"
|
||||
data-sizes="auto"
|
||||
src="{{img_url feature_image size='s'}}"
|
||||
srcset="{{img_url feature_image size='s'}} 400w"
|
||||
sizes="auto"
|
||||
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{/if}}">
|
||||
</a>
|
||||
{{/if}}
|
||||
<div class="grow">
|
||||
{{> "article/tags" size="sm"}}
|
||||
<time class="text-xxs text-blue-600 font-bold mr-3 mt-2" itemprop="datePublished" datetime="{{date format="YYYY-MM-DD"}}">{{date format="MMM D"}}</time>
|
||||
<a class="no-underline font-light italic text-sm tracking-widest text-stone-200 mr-5" href={{url}} aria-label="Read article entitled: {{title}}" title="Read article entitled: {{title}}">{{title}}</a>
|
||||
</div>
|
||||
<span class="shrink-0 text-slate-500 text-xs italic">{{reading_time}}</span>
|
||||
</article>
|
|
@ -4,14 +4,14 @@
|
|||
{{#match size "=" "sm"}}
|
||||
{{#foreach tags limit="3"}}
|
||||
<a href="{{url}}" title="{{name}}" class="text-slate-200 text-xxs italic border rounded-full no-underline border-white py-1 px-2 mr-2 tag tag-{{slug}}">
|
||||
{{> "components/tags/accent"}}
|
||||
{{> "tag/accent"}}
|
||||
{{name}}
|
||||
</a>
|
||||
{{/foreach}}
|
||||
{{else}}
|
||||
{{#foreach tags limit="3"}}
|
||||
<a href="{{url}}" title="{{name}}" class="text-slate-200 text-xs italic border rounded-full no-underline border-white py-3 px-5 mr-3 tag tag-{{slug}}">
|
||||
{{> "components/tags/accent"}}
|
||||
{{> "tag/accent"}}
|
||||
{{name}}
|
||||
</a>
|
||||
{{/foreach}}
|
||||
|
@ -19,7 +19,6 @@
|
|||
{{else}}
|
||||
{{#foreach tags limit="3"}}
|
||||
<a href="{{url}}" title="{{name}}" class="text-slate-800 text-xxs italic border rounded-full no-underline border-white py-1 px-2 mr-2 bg-white tag tag-{{slug}}">
|
||||
{{> "components/tags/accent"}}
|
||||
{{name}}
|
||||
</a>
|
||||
{{/foreach}}
|
|
@ -1,25 +0,0 @@
|
|||
{{!--
|
||||
Re-usable card for linking to posts
|
||||
--}}
|
||||
|
||||
<article class="gh-card {{post_class}}">
|
||||
<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="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
|
||||
/>
|
||||
{{/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 text-stone-100">{{title}}</h2>
|
||||
<p>{{excerpt}}</p>
|
||||
<strong>Read more</strong>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
40
partials/tag/card.hbs
Normal file
40
partials/tag/card.hbs
Normal file
|
@ -0,0 +1,40 @@
|
|||
{{#if show_description}}
|
||||
{{#if description}}
|
||||
<article class="border border-slate-800 rounded overflow-hidden pb-3 hover:scale-105 ease-in transition duration-300 {{#unless feature_image}}pt-3{{/unless}}">
|
||||
{{#if feature_image}}
|
||||
<a href={{url}} aria-hidden="true">
|
||||
<img class="w-full mb-3"
|
||||
data-srcset="{{> srcset}}"
|
||||
data-sizes="auto"
|
||||
src="{{img_url feature_image size="s"}}"
|
||||
srcset="{{> srcset}}"
|
||||
sizes="auto"
|
||||
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{/if}}">
|
||||
</a>
|
||||
{{/if}}
|
||||
<a href='{{ url }}'>
|
||||
<h2 class="px-3 text-lg">{{ name }}</h2>
|
||||
</a>
|
||||
<section class="prose prose-invert mt-2 px-3">
|
||||
{{description}}
|
||||
</section>
|
||||
</article>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<article class="border border-slate-800 rounded overflow-hidden pb-3 hover:scale-105 ease-in transition duration-300 {{#unless image}}pt-3{{/unless}}">
|
||||
{{#if feature_image}}
|
||||
<a href={{url}} aria-hidden="true">
|
||||
<img class="w-full mb-3"
|
||||
data-srcset="{{> srcset}}"
|
||||
data-sizes="auto"
|
||||
src="{{img_url feature_image size="s"}}"
|
||||
srcset="{{> srcset}}"
|
||||
sizes="auto"
|
||||
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{/if}}">
|
||||
</a>
|
||||
{{/if}}
|
||||
<a href='{{ url }}'>
|
||||
<h2 class="px-3 text-lg">{{ name }}</h2>
|
||||
</a>
|
||||
</article>
|
||||
{{/if}}
|
Loading…
Add table
Add a link
Reference in a new issue