Migrate from Bazel
This commit is contained in:
commit
016dbd0814
59 changed files with 7044 additions and 0 deletions
37
themes/retro-future/templates/section.html
Normal file
37
themes/retro-future/templates/section.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ section.title }} · {{ config.title }}{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="page-title">{{ section.title }}</h1>
|
||||
|
||||
{% if section.content %}
|
||||
<div class="section-content">
|
||||
{{ section.content | safe }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if section.pages %}
|
||||
<ul class="post-list">
|
||||
{% for page in section.pages %}
|
||||
<li class="post-list__item">
|
||||
<h2 class="post-list__title">
|
||||
<a href="{{ page.permalink }}">{{ page.title }}</a>
|
||||
</h2>
|
||||
{% 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 %}
|
||||
<p class="post-list__series">Part of the series: <a href="{{ parent_section.permalink }}">{{ parent_section.title }}</a></p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if page.description %}
|
||||
<p class="post-list__description">{{ page.description }}</p>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue