-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
/
hero.macro.html
29 lines (28 loc) · 1.25 KB
/
hero.macro.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{%- macro hero(params) -%}
<div class="section hero">
<div class="content-container grid">
<div class="span-1-7 content-container">
{%- if params.post -%}
<p class="post__meta">Published {{ params.post.date }} under <a href="/blog/category/{{ params.post.categoryURL }}">{{ params.post.category }}</a></p>
{%- endif -%}
<h1 class="section-title">{{ params.title }}</h1>
<p class="section-supporting-text">
{{ params.supporting_text | safe }}
</p>
{% if params.buttons %}
<div class="eslint-actions">
{% if params.buttons.primary %}
<a href="{{ params.buttons.primary.primaryURL }}" class="c-btn c-btn--primary">{{ params.buttons.primary.primaryText }}</a>
{% endif %}
{% if params.buttons.secondary %}
<a href="{{ params.buttons.secondary.secondaryURL }}" class="c-btn c-btn--secondary">{{ params.buttons.secondary.secondaryText }}</a>
{% endif %}
</div>
{% endif %}
</div>
<div class="span-10-12 hero-ad">
{% include "partials/ad.html" %}
</div>
</div>
</div>
{%- endmacro -%}