Skip to content

Instantly share code, notes, and snippets.

@ahmadajmi
Last active August 2, 2022 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmadajmi/81da4b46fdcaf571b59d26fa08737e79 to your computer and use it in GitHub Desktop.
Save ahmadajmi/81da4b46fdcaf571b59d26fa08737e79 to your computer and use it in GitHub Desktop.
{{!--
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