1
0
Bifurcation 0

Render the new blog tags partial in the nav bar

master
Noah 2017-12-02 15:39:39 -08:00
Parent 8f41a13b4a
révision c1fb1057d9
3 fichiers modifiés avec 22 ajouts et 30 suppressions

Voir le fichier

@ -82,8 +82,8 @@
<li>&#0187; <a href="/contact">Contact Me</a></li>
</ul>
<div class="k-section">Channels</div>
TBD
<div class="k-section">Blog Tags</div>
{{ RenderTags .Request false }}
<div class="k-section">Creativity</div>
<ul>

Voir le fichier

@ -1,28 +0,0 @@
{# Custom category list for kirsle.net <ul>-based design #}
<ul>
<li>&#0187; <a href="{{ url_for('blog.archive') }}">Blog Archives</a></li>
{% for tag in tags %}
{% if not tag["small"] %}
<li>&#0187; <a href="{{ url_for('blog.category', category=tag['category']) }}">{{ tag['category'] }}</a>
<small>({{ tag['count'] }})</small></li>
{% endif %}
{% endfor %}
</ul>
{% if has_small %}
<div id="blog_show_more" style="display: none">
<ul>
{% for tag in tags %}
{% if tag["small"] %}
<li>&#0187; <a href="{{ url_for('blog.category', category=tag['category']) }}">{{ tag['category'] }}</a>
<small>({{ tag['count'] }})</small></li>
{% endif %}
{% endfor %}
</ul>
</div>
<div id="blog_show_less" style="display: block">
<ul>
<li>&#0164; <a href="#" onClick="$('#blog_show_less').hide(); $('#blog_show_more').show(1000); return false">Show more...</a></li>
</ul>
</div>
{% endif %}

Voir le fichier

@ -0,0 +1,20 @@
{{ if .IndexView }}
Sorted by most frequently used:
<ul>
{{ range .Tags }}
<li><a href="/tagged/{{ .Name }}">{{ .Name }}</a> ({{ .Count }})</li>
{{ end }}
</ul>
{{ else }}
<ul>
<li>&#0187; <a href="/blog/archive">Blog Archives</a></li>
{{ range .Tags }}
{{ if ge .Count 8 }}
<li>&#0187; <a href="/tagged/{{ .Name }}">{{ .Name }}</a>
<small>({{ .Count }})</small></li>
{{ end }}
{{ end }}
<li>&#0187; <a href="/tagged">View all tags</a></li>
</ul>
{{ end }}