Skip to content

Instantly share code, notes, and snippets.

@ahmadajmi
Last active Aug 2, 2022
Embed
What would you like to do?
{{!--
Used in the post.hbs & page.hbs file
--}}
<header class='c-page-header'>
<div class='{{#if custom_excerpt}}o-grid o-grid--2-columns{{/if}} {{#unless custom_excerpt}}no-custom_excerpt{{/unless}}'>
<div>
<h1 class='c-page-header__heading u-font-heading'>{{ title }}</h1>
{{#match primary_tag.slug 'writing'}}
<time class='u-color-text-secondary u-font-size-small u-mt-8' datetime='{{ date format='YYYY-MM-DD' }}'>{{ date format='MMM D, YYYY' }}</time>
{{/match}}
{{#if tags}}
<div class='c-page-header__tags u-color-text-secondary u-font-size-small u-mt-8'>
{{ tags from='2' separator='&ensp; ✺ &ensp;' autolink='false' }}
</div>
{{/if}}
</div>
{{#if custom_excerpt}}
<p class='c-page-header__subHeading u-font-subHeading'>{{ custom_excerpt }}</p>
{{/if}}
</div>
</header>
<style>
.no-custom_excerpt { grid-template-columns: repeat(1,minmax(0,1fr)); }
.no-custom_excerpt > div { width: 100%; max-width: var(--content-width);margin: auto;padding: 0 var(--grid-margin); }
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment