Use dynamic list of categories/tags in sidebar, improve page headers
This commit is contained in:
parent
613e17129c
commit
cc1b7d22cb
|
@ -294,7 +294,7 @@ article > header {
|
|||
font-family: $font-title;
|
||||
padding: 0.2em 0.4em;
|
||||
line-height: 1;
|
||||
margin: 0.1em;
|
||||
margin: 0 0.2em 0.2em 0;
|
||||
}
|
||||
|
||||
content .tag {
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
{% extends "site.html" %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Categories</h1>
|
||||
<header>
|
||||
<h1>Categories</h1>
|
||||
</header>
|
||||
|
||||
{% if terms %}
|
||||
<ul>
|
||||
{% for term in terms %}
|
||||
<li>
|
||||
<a href="{{ term.permalink | safe }}">{{ term.name }}</a>({{ term.pages | length }})
|
||||
<a href="{{ term.permalink | safe }}">{{ term.name | title }}</a> ({{ term.pages | length }})
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
{% import "post_macros.html" as post_macros %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Category: {{ term.name }}</h1>
|
||||
<header>
|
||||
<h1>Category: {{ term.name }}</h1>
|
||||
</header>
|
||||
|
||||
{% for page in term.pages %}
|
||||
{{ post_macros::page_in_list(page=page) }}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
{% if page.summary %}
|
||||
<div itemprop="summary">
|
||||
{{ page.summary | safe }}
|
||||
<nav class="readmore"><a itemprop="url" href="{{ page.permalink | safe }}#continue-reading">Read More »</a></nav>
|
||||
<nav class="readmore"><a itemprop="url" href="{{ page.permalink | safe }}#continue-reading">Continue Reading »</a></nav>
|
||||
</div>
|
||||
{% endif %}
|
||||
</article>
|
||||
|
|
|
@ -96,38 +96,37 @@
|
|||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section>
|
||||
<h1><a href="/categories">Categories</a></h1>
|
||||
{# Categories #}
|
||||
{% set categories = get_taxonomy(kind="categories") %}
|
||||
{% if categories.items | length > 0 %}
|
||||
<section>
|
||||
<h1><a href="/categories">Categories</a></h1>
|
||||
<nav itemscope itemtype="http://schema.org/SiteNavigationElement">
|
||||
<ul>
|
||||
<li>
|
||||
<a itemprop="url" href="/categories/dev">
|
||||
<span itemprop="name">Dev</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a itemprop="url" href="#">
|
||||
<span itemprop="name">Releases</span>
|
||||
</a>
|
||||
</li>
|
||||
{% for catgegory in categories.items %}
|
||||
<li>
|
||||
<a itemprop="url" href="{{ catgegory.permalink | safe }}">
|
||||
<span itemprop="name">{{ catgegory.name | title }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</section>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section>
|
||||
<h1><a href="/tags">Tags</a></h1>
|
||||
<div class="tags">
|
||||
<a href="/tags/test" class="tag">test</a>
|
||||
<a href="/tags/test" class="tag">test</a>
|
||||
<a href="/tags/test" class="tag">test</a>
|
||||
<a href="/tags/test" class="tag">test</a>
|
||||
<a href="/tags/test" class="tag">test</a>
|
||||
<a href="/tags/test" class="tag">test</a>
|
||||
<a href="/tags/test" class="tag">test</a>
|
||||
</div>
|
||||
</section>
|
||||
{# Tags #}
|
||||
{% set tags = get_taxonomy(kind="tags") %}
|
||||
{% if tags.items | length > 0 %}
|
||||
<section>
|
||||
<h1><a href="/tags">Tags</a></h1>
|
||||
<div class="tags">
|
||||
{% for tag in tags.items %}
|
||||
<a href="{{ tag.permalink | safe }}" class="tag">{{ tag.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<p class="muted">
|
||||
Copyright © {{ config.title }} {{ now() | date(format="%Y") }}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{% extends "site.html" %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Tags</h1>
|
||||
<header>
|
||||
<h1>Tags</h1>
|
||||
</header>
|
||||
|
||||
{% if terms %}
|
||||
<ul>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{% extends "site.html" %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Tag: {{ term.name }}</h1>
|
||||
<header>
|
||||
<h1>Tag: {{ term.name }}</h1>
|
||||
</header>
|
||||
|
||||
{% for page in term.pages %}
|
||||
{{ post_macros::page_in_list(page=page) }}
|
||||
|
|
Loading…
Reference in New Issue