Commit 911923fde1
911923fde11ed1e0efbc56f851f9b50e5e48665d
parent: 191984b31e
Unsigned
lost+skunk <skunky@ebloid.ru> · 2024-11-15 19:43 UTC
ы
Layout: unified · split
INSTANCES.md
+1 −1
| @@ -2,7 +2,7 @@ JSON variant should be used from master — https://git.macaw.me/skunky/SkunkyAr |
| 2 | |
2 | |
| 3 | |Instance|Yggdrasil|I2P|Tor|NSFW|Proxifying|Modified Sources|Country| |
3 | |Instance|Yggdrasil|I2P|Tor|NSFW|Proxifying|Modified Sources|Country| |
| 4 | |:------:|:-------:|:-:|:-:|:--:|:--------:|:--------------:|:-----:| |
4 | |:------:|:-------:|:-:|:-:|:--:|:--------:|:--------------:|:-----:| |
| 5 | |[skunky.ebloid.ru](https://skunky.ebloid.ru/art)|[Yes](http://[201:eba5:d1fc:bf7b:cfcb:a811:4b8b:7ea3]/art)|No|No| No | Yes | No | Russia | |
5 | |[ls.404.mn](https://ls.404.mn/skunkyart)|[Yes](http://[201:f137:d1ac:920e:cd42:bfd1:1e83:da1d]/skunkyart)|No|No| No | Yes | No | Germany | |
| 6 | |[clovius.club](https://skunky.clovius.club)|No|No|No| Yes | Yes | No | Sweden | |
6 | |[clovius.club](https://skunky.clovius.club)|No|No|No| Yes | Yes | No | Sweden | |
| 7 | |[bloat.cat](https://skunky.bloat.cat)|No|No|No| Yes | Yes | No | Germany | |
7 | |[bloat.cat](https://skunky.bloat.cat)|No|No|No| Yes | Yes | No | Germany | |
| 8 | |[lumaeris.com](https://skunkyart.lumaeris.com)|No|No|No| Yes | Yes | No | Germany | |
8 | |[lumaeris.com](https://skunkyart.lumaeris.com)|No|No|No| Yes | Yes | No | Germany | |
README.md
+5 −1
| @@ -1,6 +1,10 @@ |
| |
1 | > [!NOTE] |
| |
2 | > Currently, due to school, I cannot actively develop this project :( |
| |
3 | > However, this does not mean that development has stopped. Just wait for the summer. For questions, write either to the Matrix room or to me in DM. |
| |
4 | |
| 1 | <img src="static/images/logo.png" alt="SkunkyArt" title="SkunkyArt Logo" width="20%" loading="lazy"/> |
5 | <img src="static/images/logo.png" alt="SkunkyArt" title="SkunkyArt Logo" width="20%" loading="lazy"/> |
| 2 | |
6 | |
| 3 | [](https://go.kde.org/matrix/#/#skunkyart:ebloid.ru) |
7 | [](https://go.kde.org/matrix/#/#skunkyart:ls.404.mn) |
| 4 | |
8 | |
| 5 | Instances: [`INSTANCES.md`](/skunky/SkunkyArt/src/branch/master/INSTANCES.md) |
9 | Instances: [`INSTANCES.md`](/skunky/SkunkyArt/src/branch/master/INSTANCES.md) |
| 6 | |
10 | |
app/parsers.go
+1 −1
| @@ -46,7 +46,7 @@ func (s skunkyart) ParseComments(c devianter.Comments, daError devianter.Error) |
| 46 | |
46 | |
| 47 | if x.Parent > 0 { |
47 | if x.Parent > 0 { |
| 48 | cmmts.WriteString(` In reply to <a href="`) |
48 | cmmts.WriteString(` In reply to <a href="`) |
| 49 | cmmts.WriteString(Path) |
49 | cmmts.WriteString(s._pth) |
| 50 | cmmts.WriteString("#") |
50 | cmmts.WriteString("#") |
| 51 | cmmts.WriteString(strconv.Itoa(x.Parent)) |
51 | cmmts.WriteString(strconv.Itoa(x.Parent)) |
| 52 | cmmts.WriteString(`">`) |
52 | cmmts.WriteString(`">`) |
app/router.go
+5 −4
| @@ -9,7 +9,9 @@ import ( |
| 9 | "strings" |
9 | "strings" |
| 10 | ) |
10 | ) |
| 11 | |
11 | |
| 12 | var Host, Path string |
12 | var Host string |
| |
13 | |
| |
14 | // var Path *string |
| 13 | |
15 | |
| 14 | func Router() { |
16 | func Router() { |
| 15 | parsepath := func(path string) map[int]string { |
17 | parsepath := func(path string) map[int]string { |
| @@ -54,15 +56,14 @@ func Router() { |
| 54 | |
56 | |
| 55 | // функция, что управляет всем |
57 | // функция, что управляет всем |
| 56 | handle := func(w http.ResponseWriter, r *http.Request) { |
58 | handle := func(w http.ResponseWriter, r *http.Request) { |
| 57 | Path = r.URL.Path |
59 | path := parsepath(r.URL.Path) |
| 58 | path := parsepath(Path) |
| |
| 59 | Host = "http://" + r.Host |
60 | Host = "http://" + r.Host |
| 60 | |
| |
| 61 | if h := r.Header["X-Forwarded-Proto"]; len(h) != 0 && h[0] == "https" { |
61 | if h := r.Header["X-Forwarded-Proto"]; len(h) != 0 && h[0] == "https" { |
| 62 | Host = "https://" + r.Host |
62 | Host = "https://" + r.Host |
| 63 | } |
63 | } |
| 64 | |
64 | |
| 65 | var skunky = skunkyart{Version: Release.Version} |
65 | var skunky = skunkyart{Version: Release.Version} |
| |
66 | skunky._pth = r.URL.Path |
| 66 | |
67 | |
| 67 | skunky.Args = r.URL.Query() |
68 | skunky.Args = r.URL.Query() |
| 68 | arg := skunky.Args.Get |
69 | arg := skunky.Args.Get |
app/util.go
+2 −1
| @@ -63,6 +63,7 @@ type instanceAbout struct { |
| 63 | |
63 | |
| 64 | type skunkyart struct { |
64 | type skunkyart struct { |
| 65 | Writer http.ResponseWriter |
65 | Writer http.ResponseWriter |
| |
66 | _pth string |
| 66 | |
67 | |
| 67 | Args url.Values |
68 | Args url.Values |
| 68 | Page int |
69 | Page int |
| @@ -274,7 +275,7 @@ func (s skunkyart) NavBase(c DeviationList) string { |
| 274 | prevrev := func(msg string, page int, onpage bool) { |
275 | prevrev := func(msg string, page int, onpage bool) { |
| 275 | if !onpage { |
276 | if !onpage { |
| 276 | list.WriteString(`<a href="`) |
277 | list.WriteString(`<a href="`) |
| 277 | list.WriteString(Path) |
278 | list.WriteString(s._pth) |
| 278 | list.WriteString(`?p=`) |
279 | list.WriteString(`?p=`) |
| 279 | list.WriteString(strconv.Itoa(page)) |
280 | list.WriteString(strconv.Itoa(page)) |
| 280 | if s.Type != 0 { |
281 | if s.Type != 0 { |
static/html/about.htm
+2 −2
| @@ -6,7 +6,7 @@ |
| 6 | <p> |
6 | <p> |
| 7 | SkunkyArt is an alternative frontend for deviantart.com, written in Go. |
7 | SkunkyArt is an alternative frontend for deviantart.com, written in Go. |
| 8 | </p> |
8 | </p> |
| 9 | <h3><a href="https://go.kde.org/matrix/#/#skunkyart:ebloid.ru" target="_blank">Room in [matrix]</a></h3> |
9 | <h3><a href="https://go.kde.org/matrix/#/#skunkyart:ls.404.mn" target="_blank">Room in [matrix]</a></h3> |
| 10 | <b>Instance settings:</b> |
10 | <b>Instance settings:</b> |
| 11 | <ul> |
11 | <ul> |
| 12 | <li><b>NSFW</b>: <span class="about-{{.Templates.About.Nsfw}}">{{if .Templates.About.Nsfw}}YES{{else}}NO{{end}}</span></li> |
12 | <li><b>NSFW</b>: <span class="about-{{.Templates.About.Nsfw}}">{{if .Templates.About.Nsfw}}YES{{else}}NO{{end}}</span></li> |
| @@ -44,6 +44,6 @@ |
| 44 | {{end}} |
44 | {{end}} |
| 45 | </ul> |
45 | </ul> |
| 46 | </details> |
46 | </details> |
| 47 | <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/v{{.Version}}" target="_blank">SkunkyArt v{{.Version}}</a></p> |
47 | <p>Copyright <a href="https://go.kde.org/matrix/#/@softpigeones:ls.404.mn" target="_blank">lost+skunk</a>, X11. <a href="https://git.macaw.me/skunky/skunkyart/src/tag/v{{.Version}}" target="_blank">SkunkyArt v{{.Version}}</a></p> |
| 48 | </main> |
48 | </main> |
| 49 | </html> |
49 | </html> |