Skip to content

Commit

Permalink
themes: add urlstat
Browse files Browse the repository at this point in the history
  • Loading branch information
changkun committed Feb 6, 2021
1 parent 8083a3f commit 50cdca9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions themes/research/layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
{{ end }}

<ul>
{{ range .Paginator.Pages }}
<li>
<div class="post-title">
{{ range .Paginator.Pages }}
<li>
<div class="post-title">
{{ if eq $listtitle "Posts" }}
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
{{ else }}
<a href="{{ .RelPermalink }}">{{.Title }}</a>
<a href="{{ .RelPermalink }}">{{.Title }}</a>
{{ end }}
</div>
</li>
{{ end }}
</div>
</li>
{{ end }}
</ul>
{{ partial "pagination.html" . }}
</main>
Expand Down
11 changes: 1 addition & 10 deletions themes/research/layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<article>
<h1 class="title">{{ .Title }}</h1>
<b><time>{{ .Date.Format (default "2006-01-02 15:04:05" .Site.Params.dateFmt) }}</time></b>
<span>PV/UV:<span id="urlstat-page-pv"></span>/<span id="urlstat-page-uv"></span></span>
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">#{{ . }}</a>
{{ end }}
Expand All @@ -13,14 +14,4 @@ <h1 class="title">{{ .Title }}</h1>
</main>
{{ partial "sidebar.html" . }}
{{ partial "scripts" .}}

<!-- comments -->
<script src="https://utteranc.es/client.js"
repo="golang-design/research"
issue-term="pathname"
label="comments"
theme="preferred-color-scheme"
crossorigin="anonymous"
async>
</script>>
{{ end }}
9 changes: 9 additions & 0 deletions themes/research/layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@
});
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML' async></script>
<script src="https://utteranc.es/client.js"
repo="golang-design/research"
issue-term="pathname"
label="comments"
theme="preferred-color-scheme"
crossorigin="anonymous"
async>
</script>
<script async src="//changkun.de/urlstat/client.js"></script>

0 comments on commit 50cdca9

Please sign in to comment.