IMPROVEMENT: give a jsonp api to return the number of moments and fix incorrect count for a certain section.
This commit is contained in:
parent
6c14c1355f
commit
5ad98eeadb
2 changed files with 6 additions and 2 deletions
4
layouts/_default/list.js.js
Normal file
4
layouts/_default/list.js.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
function showMomentCount() { {{ $a := where $.Site.RegularPages "Section" .Section}}{{ if .IsHome }}{{ $a = $.Site.RegularPages }}{{ end }}
|
||||
document.getElementById("momentCount").innerHTML = {{ len $a }};
|
||||
}
|
||||
showMomentCount()
|
Loading…
Add table
Add a link
Reference in a new issue