diff options
Diffstat (limited to 'src/http/tpl/posts.html')
-rw-r--r-- | src/http/tpl/posts.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/http/tpl/posts.html b/src/http/tpl/posts.html index 2fa336d..0df166a 100644 --- a/src/http/tpl/posts.html +++ b/src/http/tpl/posts.html @@ -1,11 +1,11 @@ {{ define "body" }} - {{ $page := .GetQueryIntValue "p" 0 -}} + {{ $page := .GetQueryIntValue "page" 0 -}} {{ $getPostsRes := .GetPosts $page 20 -}} {{ if gt $page 0 }} <p> - <a href="?p={{ .Add $page -1 }}">< < Previous Page</a> + <a href="{{ .RootURL.Posts.Page (.Add $page -1) }}">< < Previous Page</a> </p> {{ else }} <p> @@ -17,7 +17,7 @@ <ul> {{ range $getPostsRes.Posts }} <li> - <strong><a href="{{ PostURL .ID }}"> + <strong><a href="{{ $.RootURL.Post .ID }}"> {{ .PublishedAt.Format "2006-01-02" }} - {{ .Title }} </a></strong> {{ if .Description }} @@ -29,7 +29,7 @@ {{ if $getPostsRes.HasMore }} <p> - <a href="?p={{ .Add $page 1 }}">Next Page > ></a> + <a href="{{ .RootURL.Posts.Page (.Add $page 1) }}">Next Page > ></a> </p> {{ end }} |