aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlost+skunk <[email protected]>2024-11-15 22:43:27 +0300
committerlost+skunk <[email protected]>2024-11-15 22:43:27 +0300
commit911923fde11ed1e0efbc56f851f9b50e5e48665d (patch)
treed7b9b9b8738aee1843a647285bbc5877044c071a
parent191984b31ef228c4077904a2831a2af593352670 (diff)
downloadskunky-art-911923fde11ed1e0efbc56f851f9b50e5e48665d.tar.gz
skunky-art-911923fde11ed1e0efbc56f851f9b50e5e48665d.tar.bz2
skunky-art-911923fde11ed1e0efbc56f851f9b50e5e48665d.zip
ы
-rw-r--r--INSTANCES.md2
-rw-r--r--README.md6
-rw-r--r--app/parsers.go2
-rw-r--r--app/router.go9
-rw-r--r--app/util.go3
-rw-r--r--static/html/about.htm4
6 files changed, 16 insertions, 10 deletions
diff --git a/INSTANCES.md b/INSTANCES.md
index 32b0e50..c9a198a 100644
--- a/INSTANCES.md
+++ b/INSTANCES.md
@@ -2,7 +2,7 @@ JSON variant should be used from master — https://git.macaw.me/skunky/SkunkyAr
|Instance|Yggdrasil|I2P|Tor|NSFW|Proxifying|Modified Sources|Country|
|:------:|:-------:|:-:|:-:|:--:|:--------:|:--------------:|:-----:|
-|[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 |
+|[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 |
|[clovius.club](https://skunky.clovius.club)|No|No|No| Yes | Yes | No | Sweden |
|[bloat.cat](https://skunky.bloat.cat)|No|No|No| Yes | Yes | No | Germany |
|[lumaeris.com](https://skunkyart.lumaeris.com)|No|No|No| Yes | Yes | No | Germany |
diff --git a/README.md b/README.md
index b61b0bd..f4b1b14 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,10 @@
+> [!NOTE]
+> Currently, due to school, I cannot actively develop this project :(
+> 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.
+
<img src="static/images/logo.png" alt="SkunkyArt" title="SkunkyArt Logo" width="20%" loading="lazy"/>
-[![Matrix room](https://img.shields.io/badge/matrix-000000?style=for-the-badge&logo=Matrix&logoColor=white)](https://go.kde.org/matrix/#/#skunkyart:ebloid.ru)
+[![Matrix room](https://img.shields.io/badge/matrix-000000?style=for-the-badge&logo=Matrix&logoColor=white)](https://go.kde.org/matrix/#/#skunkyart:ls.404.mn)
Instances: [`INSTANCES.md`](/skunky/SkunkyArt/src/branch/master/INSTANCES.md)
diff --git a/app/parsers.go b/app/parsers.go
index b7f15fd..192a88d 100644
--- a/app/parsers.go
+++ b/app/parsers.go
@@ -46,7 +46,7 @@ func (s skunkyart) ParseComments(c devianter.Comments, daError devianter.Error)
if x.Parent > 0 {
cmmts.WriteString(` In reply to <a href="`)
- cmmts.WriteString(Path)
+ cmmts.WriteString(s._pth)
cmmts.WriteString("#")
cmmts.WriteString(strconv.Itoa(x.Parent))
cmmts.WriteString(`">`)
diff --git a/app/router.go b/app/router.go
index eddf0a9..c7dd623 100644
--- a/app/router.go
+++ b/app/router.go
@@ -9,7 +9,9 @@ import (
"strings"
)
-var Host, Path string
+var Host string
+
+// var Path *string
func Router() {
parsepath := func(path string) map[int]string {
@@ -54,15 +56,14 @@ func Router() {
// функция, что управляет всем
handle := func(w http.ResponseWriter, r *http.Request) {
- Path = r.URL.Path
- path := parsepath(Path)
+ path := parsepath(r.URL.Path)
Host = "http://" + r.Host
-
if h := r.Header["X-Forwarded-Proto"]; len(h) != 0 && h[0] == "https" {
Host = "https://" + r.Host
}
var skunky = skunkyart{Version: Release.Version}
+ skunky._pth = r.URL.Path
skunky.Args = r.URL.Query()
arg := skunky.Args.Get
diff --git a/app/util.go b/app/util.go
index 9c8d400..6ece2e8 100644
--- a/app/util.go
+++ b/app/util.go
@@ -63,6 +63,7 @@ type instanceAbout struct {
type skunkyart struct {
Writer http.ResponseWriter
+ _pth string
Args url.Values
Page int
@@ -274,7 +275,7 @@ func (s skunkyart) NavBase(c DeviationList) string {
prevrev := func(msg string, page int, onpage bool) {
if !onpage {
list.WriteString(`<a href="`)
- list.WriteString(Path)
+ list.WriteString(s._pth)
list.WriteString(`?p=`)
list.WriteString(strconv.Itoa(page))
if s.Type != 0 {
diff --git a/static/html/about.htm b/static/html/about.htm
index eac4e47..f6502af 100644
--- a/static/html/about.htm
+++ b/static/html/about.htm
@@ -6,7 +6,7 @@
<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>
+ <h3><a href="https://go.kde.org/matrix/#/#skunkyart:ls.404.mn" 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>
@@ -44,6 +44,6 @@
{{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/v{{.Version}}" target="_blank">SkunkyArt v{{.Version}}</a></p>
+ <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>
</main>
</html>