mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Improve history UI and non-history route speed
This commit is contained in:
@@ -438,9 +438,12 @@
|
||||
{{ if .ViewPage }} {{ .RenderedPage }} {{ end }}
|
||||
{{ if .EditPage }} <textarea autofocus placeholder="Start typing, it will save automatically." id="userInput">{{ .RawPage }}</textarea>{{ end }}
|
||||
{{ if .HistoryPage }}
|
||||
<h1>History</h1>
|
||||
<ul>
|
||||
{{range $i, $e := .Versions}}
|
||||
<li>Version {{index $.VersionsText $i}} <a href="/{{ $.Page }}/view?version={{$e}}">View</a> <a href="/{{ $.Page }}/list?version={{$e}}">List</a> <a href="/{{ $.Page }}/raw?version={{$e}}">Raw</a></li>
|
||||
<li style="list-style: none;">
|
||||
<a href="/{{ $.Page }}/view?version={{$e}}">View</a> <a href="/{{ $.Page }}/list?version={{$e}}">List</a> <a href="/{{ $.Page }}/raw?version={{$e}}">Raw</a>
|
||||
{{index $.VersionsText $i}} ({{if lt (index $.VersionsChangeSums $i) 0}}<span style="color:red">{{else}}<span style="color:green">+{{end}}{{index $.VersionsChangeSums $i}}</span>)</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user