темплейты в бинарнике и улучшенная система кеша

This commit is contained in:
lost+skunk 2024-08-13 15:59:52 +03:00
parent 4db018fb7f
commit 1537da9b16
29 changed files with 555 additions and 303 deletions

49
static/html/about.htm Normal file
View file

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
{{template "head" .}}
<main>
{{template "header" .}}
<p>
SkunkyArt is an alternative frontend for deviantart.com, written in Go.
</p>
<h3><a href="https://go.kde.org/matrix/#/#skunkyart:ebloid.ru" target="_blank">Room in Matrix</a></h3>
<b>Instance settings:</b>
<ul>
<li><b>NSFW</b>: <span class="about-{{.Templates.About.Nsfw}}">{{if .Templates.About.Nsfw}}YES{{else}}NO{{end}}</span></li>
<li><b>Proxyfing</b>: <span class="about-{{.Templates.About.Proxy}}">{{if .Templates.About.Proxy}}YES{{else}}NO{{end}}</span></li>
</ul>
<details>
<summary><b>Instances:</b></summary>
<ul>
{{range .Templates.About.Instances}}
<li><u><b>{{.Title}}</b></u>:
<ul>
<li><b>Country</b>: {{.Country}}</li>
<li><b>URLs</b>: </li>
<ul>
{{if ne .Urls.I2P ""}}
<li><b>I2P</b>: <a href="{{.Urls.I2P}}">Yes</a></li>
{{end}}
{{if ne .Urls.Ygg ""}}
<li><b>Ygg</b>: <a href="{{.Urls.Ygg}}">Yes</a></li>
{{end}}
{{if ne .Urls.Tor ""}}
<li><b>Tor</b>: <a href="{{.Urls.Tor}}">Yes</a></li>
{{end}}
{{if ne .Urls.Clearnet ""}}
<li><b>Clearnet</b>: <a href="{{.Urls.Clearnet}}">{{.Urls.Clearnet}}</a></li>
{{end}}
</ul>
<li><b>Settings</b>: </li>
<ul>
<li><b>NSFW</b>: <span class="about-{{.Settings.Nsfw}}">{{if .Settings.Nsfw}}YES{{else}}NO{{end}}</span></li>
<li><b>Proxyfing</b>: <span class="about-{{.Settings.Proxy}}">{{if .Settings.Proxy}}YES{{else}}NO{{end}}</span></li>
</ul>
</ul>
</li>
{{end}}
</ul>
</details>
<p>Copyright <a href="https://go.kde.org/matrix/#/@softpigeones:ebloid.ru" target="_blank">lost+skunk</a>, X11. <a href="https://git.macaw.me/skunky/skunkyart/src/tag/v1.3.1" target="_blank">SkunkyArt v1.3.1</a></p>
</main>
</html>