Permalink
Browse files

add: number of tags and categories 分类及标签数统计

Show the number of tags and categories in tag cloud page.
在标签云页面中显示分类数和标签数。
  • Loading branch information...
MOxFIVE committed Dec 1, 2015
1 parent 8f00171 commit 56abe4226454571335a62120ab404792f274437f
Showing with 18 additions and 0 deletions.
  1. +18 −0 layout/_partial/page.ejs
View
@@ -38,6 +38,9 @@
<%- list_categories({
depth: 1,
}) %>
<p class="count"></p>
<div class="tags">
<%- tagcloud({
min_font: 16,
@@ -90,5 +93,20 @@
border-bottom: 2px solid black;
text-decoration: none;
}
#count > span {
margin: auto .2em;
font-weight: bold;
}
</style>
<!-- Count tags and categories -->
<script src="http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
<p id="count">
已有<span><script>document.write($(".category-list-item").length)</script></span>个分类,
共计<span><script>document.write($(".tags > a").length)</script></span>个标签。
</p>
<script>
$('#count').appendTo('.count');
</script>
<% } %>

0 comments on commit 56abe42

Please sign in to comment.