Style tags table
This commit is contained in:
parent
d9b6d4fbb8
commit
531a7622ee
|
@ -1,9 +1,13 @@
|
||||||
{% if page.tags %}
|
{% if page.tags %}
|
||||||
<div class="tags">
|
<div>
|
||||||
{% for tag in page.tags %}
|
<p>
|
||||||
<a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}" class="blue">
|
Tags:
|
||||||
{{- tag -}}
|
{% for tag in page.tags|sort %}
|
||||||
</a>
|
<a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}" class="blue">
|
||||||
{% endfor %}
|
{{- tag -}}
|
||||||
|
</a>
|
||||||
|
{%- if not loop.last %},{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -5,10 +5,27 @@ title: Tags
|
||||||
use:
|
use:
|
||||||
- posts_tags
|
- posts_tags
|
||||||
---
|
---
|
||||||
<h2>Tags</h2>
|
<h1>Blog Tags</h1>
|
||||||
|
|
||||||
<ul>
|
<div class="table-responsive">
|
||||||
{% for tag,posts in data.posts_tags %}
|
<table class="table">
|
||||||
<li><a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}">{{ tag }}</a></li>
|
<thead>
|
||||||
{% endfor %}
|
<tr>
|
||||||
</ul>
|
<th>Tag</th>
|
||||||
|
<th>Number of posts</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for tag, posts in data.posts_tags %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="{{ site.url }}/blog/tags/{{ tag|url_encode(true) }}">
|
||||||
|
{{ tag }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>{{ posts|length }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
Reference in a new issue