scribd.github.io/_includes/post-hero.html

88 lines
3.6 KiB
HTML

<!-- Assign theme colors based of the project team -->
<!-- See include below for logic and color.scss for available themes -->
{% include team-color-logic.html %}
<section class="hero theme-{{ theme | default: "midnight" }}">
<div class="hero__container container container-offset">
<header class="hero__header">
<!-- Post Title -->
<h1 class="hero__title" itemprop="name headline">{{ page.title | escape }}</h1>
<!-- Post Metadata -->
<ul class="hero__meta">
<!-- Post Author -->
{%- if page.author -%}
<li class="hero__meta-item author media">
<!-- Author Avatar -->
{%- if site.data.authors[page.author].github -%}
<img class="hero__meta-avatar"
srcset="https://github.com/{{ site.data.authors[page.author].github}}.png?size=48,
https://github.com/{{ site.data.authors[page.author].github}}.png?size=96 2x"
src="https://github.com/{{ site.data.authors[page.author].github}}.png?size=48" role="presentation" alt="">
{%- endif -%}
<div class="media-body">
<strong>Author</strong><br>
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">
{%- if site.data.authors[page.author] -%}
{{ site.data.authors[page.author].name}}
{%- else -%}
{{ page.author }}
{%- endif -%}
</span>
</span>
</div>
</li>
{%- endif -%}
{%- if page.authors -%}
<li class="hero__meta-item author media">
<div class="media-body">
<strong>Author</strong><br>
{%- for author in page.authors -%}
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">
{%- if site.data.authors[author] -%}
{{ site.data.authors[author].name}}
{%- else -%}
{{ author }}
{%- endif -%}
{% if forloop.last %}{% else %},{% endif %}
</span>
</span>
{%- endfor -%}
</div>
</li>
{%- endif -%}
<!-- Post Date -->
{%- if page.date -%}
<li class="hero__meta-item published">
<strong>Published</strong><br>
<time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{%- assign date_format = site.date_format -%}
{{ page.date | date: date_format }}
</time>
</li>
{%- endif -%}
{%- if page.team -%}
<!-- Team Info -->
<li class="hero__meta-item category">
<strong>Team</strong><br>
<span>{{ page.team }}</span>
</li>
{%- endif -%}
</ul>
</header>
</div>
{% include logo-texture.html %}
</section>