mirror of
https://github.com/kirsle/kirsle.net
synced 2024-12-22 15:09:29 +00:00
Render the new blog tags partial in the nav bar
This commit is contained in:
parent
8f41a13b4a
commit
c1fb1057d9
|
@ -82,8 +82,8 @@
|
|||
<li>» <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>
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
{# Custom category list for kirsle.net <ul>-based design #}
|
||||
<ul>
|
||||
<li>» <a href="{{ url_for('blog.archive') }}">Blog Archives</a></li>
|
||||
{% for tag in tags %}
|
||||
{% if not tag["small"] %}
|
||||
<li>» <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>» <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>¤ <a href="#" onClick="$('#blog_show_less').hide(); $('#blog_show_more').show(1000); return false">Show more...</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
20
www/blog/tags.partial.gohtml
Normal file
20
www/blog/tags.partial.gohtml
Normal file
|
@ -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>» <a href="/blog/archive">Blog Archives</a></li>
|
||||
{{ range .Tags }}
|
||||
{{ if ge .Count 8 }}
|
||||
<li>» <a href="/tagged/{{ .Name }}">{{ .Name }}</a>
|
||||
<small>({{ .Count }})</small></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<li>» <a href="/tagged">View all tags</a></li>
|
||||
</ul>
|
||||
{{ end }}
|
Loading…
Reference in New Issue
Block a user