summaryrefslogtreecommitdiff
path: root/app/util.go
diff options
context:
space:
mode:
authorlost+skunk <[email protected]>2024-08-14 19:18:06 +0300
committerlost+skunk <[email protected]>2024-08-14 19:18:06 +0300
commit2f8c35ba322e3c8c6e0bff8f7818d4eedf002928 (patch)
tree3158276fa91553bc87cbb751204d832b3616bfde /app/util.go
parent513543cc7a24330e3d9ce96d3b55e4726397af50 (diff)
downloadskunky-art-2f8c35ba322e3c8c6e0bff8f7818d4eedf002928.tar.gz
skunky-art-2f8c35ba322e3c8c6e0bff8f7818d4eedf002928.tar.bz2
skunky-art-2f8c35ba322e3c8c6e0bff8f7818d4eedf002928.zip
user favourites
Diffstat (limited to 'app/util.go')
-rw-r--r--app/util.go59
1 files changed, 59 insertions, 0 deletions
diff --git a/app/util.go b/app/util.go
index a5b978d..8e8ef6e 100644
--- a/app/util.go
+++ b/app/util.go
@@ -16,6 +16,8 @@ import (
)
/* INTERNAL */
+var wr = io.WriteString
+
func exit(msg string, code int) {
println(msg)
os.Exit(code)
@@ -50,6 +52,63 @@ func RefreshInstances() {
}
// some crap for frontend
+type skunkyart struct {
+ Writer http.ResponseWriter
+
+ Args url.Values
+ Page int
+ Type rune
+ Atom bool
+
+ BasePath, Endpoint string
+ Query, QueryRaw string
+
+ Templates struct {
+ About struct {
+ Proxy bool
+ Nsfw bool
+ Instances []settings
+ }
+
+ SomeList string
+ DDStrips string
+ Deviation struct {
+ Post devianter.Post
+ Related string
+ StringTime string
+ Tags string
+ Comments string
+ }
+
+ GroupUser struct {
+ GR devianter.GRuser
+ Admins string
+ Group bool
+ CreationDate string
+
+ About struct {
+ A devianter.About
+
+ DescriptionFormatted string
+ Interests, Social string
+ Comments string
+ BG string
+ BGMeta devianter.Deviation
+ }
+
+ Gallery struct {
+ Folders string
+ Pages int
+ List string
+ }
+ }
+ Search struct {
+ Content devianter.Search
+ List string
+ }
+ }
+}
+
func (s skunkyart) ExecuteTemplate(file, dir string, data any) {
var buf strings.Builder
tmp := template.New(file)