From 2566e314e8351ffbceae9a2688d90a5c811d49e5 Mon Sep 17 00:00:00 2001
From: FChannel <=>
Date: Fri, 22 Jan 2021 21:12:26 -0800
Subject: client to server conversion

---
 static/nposts.html | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 static/nposts.html

(limited to 'static/nposts.html')

diff --git a/static/nposts.html b/static/nposts.html
new file mode 100644
index 0000000..2296df5
--- /dev/null
+++ b/static/nposts.html
@@ -0,0 +1,51 @@
+{{ define "header" }}
+<script src="/static/js/posts.js"></script>
+{{ end }}
+
+
+{{ define "content" }}
+{{ $board := .Board }}
+<hr>
+<ul style="margin: 0; padding: 0; display: inline">
+  <li style="display: inline"><a href="/{{ $board.Name }}/catalog">[Catalog]</a></li>      
+  <li style="display: inline"><a href="#bottom">[Bottom]</a></li>
+  <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li>
+</ul>
+
+{{ template "posts" . }}
+
+<hr>
+<ul style="margin: 0; padding: 0; display: inline">
+  <li style="display: inline"><a href="/{{ $board.Name }}/catalog">[Catalog]</a></li>
+  <li style="display: inline"><a id="bottom" href="#top">[Top]</a></li>
+  <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li>
+</ul>
+<hr>
+{{ if gt .TotalPage 0 }}
+{{ $totalPage := .TotalPage }}
+<ul style="float: right; margin: 0; padding: 0; display: inline">
+  {{ $page := .CurrentPage }}      
+  {{ if gt $page 0 }}
+  <li style="display: inline"><button onclick="previous('{{$board.Name }}', '{{ $page }}')">Previous</button></li>
+  {{ end }}
+  {{ range $i, $e := .Pages }}
+  {{ if eq $i $page}}
+  <li style="display: inline"><a href="/{{ $board.Name }}/{{ $i }}"><b>[{{ $i }}]</b></a></li>
+  {{ else }}
+  <li style="display: inline"><a href="/{{ $board.Name }}/{{ $i }}">[{{ $i }}]</a></li>              
+  {{ end }}
+  {{ end }}
+  {{ if lt .CurrentPage .TotalPage }}
+  <li style="display: inline"><button onclick="next('{{ $board.Name }}','{{ $totalPage }}' ,'{{ $page }}')">next</button></li>
+  {{ end }}
+</ul>
+{{ end }}
+{{ end }}
+
+{{ define "script" }}
+<script src="/static/js/footerscript.js"></script>
+<script>
+  viewLink("{{ .Board.Name }}", "{{ .Board.Actor }}")
+
+</script>    
+{{ end }}
-- 
cgit v1.2.3