feat: add basic site
This commit is contained in:
36
templates/macros/macros.html
Normal file
36
templates/macros/macros.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% macro list_posts(pages) %}
|
||||
<ul>
|
||||
{%- for page in pages %}
|
||||
<section class="list-item">
|
||||
<h1 class="title text-peach">
|
||||
<a href={{ page.permalink }}>{{page.title}}</a>
|
||||
</h1>
|
||||
|
||||
<div class="meta">
|
||||
{%- if page.date %}
|
||||
<time>{{ page.date | date(format="%Y-%m-%d") }}</time>
|
||||
{% endif -%}
|
||||
{% if page.draft %}
|
||||
<span class="draft-label">DRAFT</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="blog-summary ">
|
||||
{% if page.description %}
|
||||
{{ page.description }}
|
||||
{% elif page.summary %}
|
||||
{{ page.summary | safe }}…
|
||||
{% else %}
|
||||
{% set hide_read_more = true %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if not hide_read_more %}
|
||||
<a class="readmore text-peach" href={{ page.permalink }}>Read more ⟶</a>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
{% endfor -%}
|
||||
</ul>
|
||||
{% endmacro list_posts %}
|
10
templates/macros/prev.html
Normal file
10
templates/macros/prev.html
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
{% macro page_back_link(page) %}
|
||||
{% set top_section = get_section(path=page.ancestors | last) %}
|
||||
<a class="previous" href="{{ top_section.permalink }}">‹ back</a>
|
||||
{% endmacro page_back_link %}
|
||||
|
||||
{% macro section_back_link(section) %}
|
||||
{% set top_section = get_section(path=section.ancestors | last) %}
|
||||
<a class="previous" href="{{ top_section.permalink }}">‹ back</a>
|
||||
{% endmacro section_back_link %}
|
Reference in New Issue
Block a user