Migrate from Bazel
This commit is contained in:
commit
016dbd0814
59 changed files with 7044 additions and 0 deletions
62
themes/retro-future/templates/article.html
Normal file
62
themes/retro-future/templates/article.html
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{% extends "base.html" %}
|
||||
{% import "macros.html" as macros %}
|
||||
|
||||
{% block title %}{{ page.title }} · {{ config.title }}{% endblock title %}
|
||||
|
||||
{% block description %}{{ page.description | default(value=page.summary) | default(value=config.description) }}{% endblock description %}
|
||||
|
||||
{% block content %}
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="page-title">{{ page.title }}</h1>
|
||||
{{ macros::post_meta(page=page) }}
|
||||
{% if page.description %}
|
||||
<p class="post-description">{{ page.description }}</p>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
{% set path_parts = page.relative_path | split(pat="/") %}
|
||||
{% if path_parts | length > 2 %}
|
||||
{% set parent_dir = path_parts | slice(end=-2) | join(sep="/") %}
|
||||
{% set parent_section = get_section(path=parent_dir ~ "/_index.md") %}
|
||||
{% if parent_section and parent_section.extra.series %}
|
||||
<aside class="series-info">
|
||||
<div class="series-info__header">
|
||||
<strong>Part of the series:</strong> <a href="{{ parent_section.permalink }}">{{ parent_section.title }}</a>
|
||||
</div>
|
||||
<nav class="series-info__nav" aria-label="Series navigation">
|
||||
<ol>
|
||||
{% for p in parent_section.pages %}
|
||||
<li {% if p.permalink == page.permalink %}class="current"{% endif %}>
|
||||
<a href="{{ p.permalink }}" {% if p.permalink == page.permalink %}aria-current="page"{% endif %}>{{ p.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</nav>
|
||||
</aside>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="post-content">
|
||||
{{ page.content | safe }}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
{% if page.earlier or page.later %}
|
||||
<nav class="post-navigation" aria-label="Post navigation">
|
||||
{% if page.later %}
|
||||
<div class="post-navigation__prev">
|
||||
<span class="post-navigation__label">← Previous</span>
|
||||
<a href="{{ page.later.permalink }}">{{ page.later.title }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if page.earlier %}
|
||||
<div class="post-navigation__next">
|
||||
<span class="post-navigation__label">Next →</span>
|
||||
<a href="{{ page.earlier.permalink }}">{{ page.earlier.title }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue