Небольшие изменения в гуе + (возможно) устранённый баг с комментами
This commit is contained in:
parent
ff4f1a2422
commit
99fe9cf964
@ -131,13 +131,13 @@ func (s skunkyart) GRUser() {
|
|||||||
case "group_admins":
|
case "group_admins":
|
||||||
var htm strings.Builder
|
var htm strings.Builder
|
||||||
for _, z := range x.ModuleData.GroupAdmins.Results {
|
for _, z := range x.ModuleData.GroupAdmins.Results {
|
||||||
htm.WriteString(`<p><img src="`)
|
htm.WriteString(`<div class="admin"><img src="`)
|
||||||
htm.WriteString(UrlBuilder("media", "emojitar", z.User.Username, "?type=a"))
|
htm.WriteString(UrlBuilder("media", "emojitar", z.User.Username, "?type=a"))
|
||||||
htm.WriteString(`"><a href="`)
|
htm.WriteString(`"><a href="`)
|
||||||
htm.WriteString(UrlBuilder("group_user", "?type=about&q=", z.User.Username))
|
htm.WriteString(UrlBuilder("group_user", "?type=about&q=", z.User.Username))
|
||||||
htm.WriteString(`">`)
|
htm.WriteString(`">`)
|
||||||
htm.WriteString(z.User.Username)
|
htm.WriteString(z.User.Username)
|
||||||
htm.WriteString(`</a></p>`)
|
htm.WriteString(`</a></div>`)
|
||||||
}
|
}
|
||||||
group.Admins += htm.String()
|
group.Admins += htm.String()
|
||||||
}
|
}
|
||||||
@ -158,8 +158,18 @@ func (s skunkyart) GRUser() {
|
|||||||
for _, x := range gallery.Content.Gruser.Page.Modules {
|
for _, x := range gallery.Content.Gruser.Page.Modules {
|
||||||
if l := len(x.ModuleData.Folders.Results); l != 0 {
|
if l := len(x.ModuleData.Folders.Results); l != 0 {
|
||||||
var folders strings.Builder
|
var folders strings.Builder
|
||||||
folders.WriteString(`<h3 class="folders">Folders: `)
|
folders.WriteString(`<h1 id="folders"><a href="#folder">#</a> Folders</h1><div class="folders"><br>`)
|
||||||
for n, x := range x.ModuleData.Folders.Results {
|
for _, x := range x.ModuleData.Folders.Results {
|
||||||
|
folders.WriteString(`<div class="block folder-item">`)
|
||||||
|
|
||||||
|
folders.WriteString(`<a href="`)
|
||||||
|
folders.WriteString(s.ConvertDeviantArtUrlToSkunkyArt(x.Thumb.Url))
|
||||||
|
folders.WriteString(`"><img loading="lazy" src="`)
|
||||||
|
folders.WriteString(s.ParseMedia(x.Thumb.Media))
|
||||||
|
folders.WriteString(`" title="`)
|
||||||
|
folders.WriteString(x.Thumb.Title)
|
||||||
|
folders.WriteString(`"></a><br>`)
|
||||||
|
|
||||||
folders.WriteString(`<a href="?folder=`)
|
folders.WriteString(`<a href="?folder=`)
|
||||||
folders.WriteString(strconv.Itoa(x.FolderId))
|
folders.WriteString(strconv.Itoa(x.FolderId))
|
||||||
folders.WriteString("&q=")
|
folders.WriteString("&q=")
|
||||||
@ -169,11 +179,10 @@ func (s skunkyart) GRUser() {
|
|||||||
folders.WriteString(`">`)
|
folders.WriteString(`">`)
|
||||||
folders.WriteString(x.Name)
|
folders.WriteString(x.Name)
|
||||||
folders.WriteString(`</a>`)
|
folders.WriteString(`</a>`)
|
||||||
if n+1 < l {
|
|
||||||
folders.WriteString(" | ")
|
folders.WriteString("</div>")
|
||||||
}
|
|
||||||
}
|
}
|
||||||
folders.WriteString("</h3>")
|
folders.WriteString(`</div><h1 id="content"><a href="#content">#</a> Content</h1>`)
|
||||||
group.Gallery.Folders = folders.String()
|
group.Gallery.Folders = folders.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,6 +234,10 @@ func (s skunkyart) Deviation(author, postname string) {
|
|||||||
post.Tags += tag.String()
|
post.Tags += tag.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if post.Post.Comments.Total <= 50 {
|
||||||
|
post.Post.Comments.Cursor = ""
|
||||||
|
}
|
||||||
|
|
||||||
post.Comments = s.ParseComments(devianter.CommentsFunc(id, post.Post.Comments.Cursor, s.Page, 1))
|
post.Comments = s.ParseComments(devianter.CommentsFunc(id, post.Post.Comments.Cursor, s.Page, 1))
|
||||||
|
|
||||||
s.ExecuteTemplate("html/deviantion.htm", &s)
|
s.ExecuteTemplate("html/deviantion.htm", &s)
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
"templates-dir": "html",
|
"templates-dir": "html",
|
||||||
"wixmp-proxy": "http://127.0.0.1:8080",
|
"wixmp-proxy": "http://127.0.0.1:8080",
|
||||||
"proxy": true,
|
"proxy": true,
|
||||||
"nsfw": false
|
"nsfw": true
|
||||||
}
|
}
|
@ -81,7 +81,7 @@ form input, button, select {
|
|||||||
border: 3px solid #4d27d6;
|
border: 3px solid #4d27d6;
|
||||||
transition: 400ms;
|
transition: 400ms;
|
||||||
}
|
}
|
||||||
.block img {
|
.block img, .admins .admin img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.block p {
|
.block p {
|
||||||
@ -95,3 +95,21 @@ form input, button, select {
|
|||||||
.ubg img {
|
.ubg img {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
|
.folders {
|
||||||
|
display: flex
|
||||||
|
}
|
||||||
|
.folder-item {
|
||||||
|
background-color: #060820;
|
||||||
|
border: 3px solid #060820;
|
||||||
|
}
|
||||||
|
.admins {
|
||||||
|
display: flex
|
||||||
|
}
|
||||||
|
.admins .admin {
|
||||||
|
margin-left: 1%;
|
||||||
|
background-color: #011522;
|
||||||
|
padding: 3px;
|
||||||
|
word-break: break-all;
|
||||||
|
text-align: center;
|
||||||
|
width: 5%;
|
||||||
|
}
|
@ -57,7 +57,9 @@
|
|||||||
|
|
||||||
{{if ne .Templates.GroupUser.Admins ""}}
|
{{if ne .Templates.GroupUser.Admins ""}}
|
||||||
<h3 id="admins"><a href="#admins">#</a> Group admins</h3>
|
<h3 id="admins"><a href="#admins">#</a> Group admins</h3>
|
||||||
|
<div class="admins">
|
||||||
{{.Templates.GroupUser.Admins}}
|
{{.Templates.GroupUser.Admins}}
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if ne .Templates.GroupUser.About.Interests ""}}
|
{{if ne .Templates.GroupUser.About.Interests ""}}
|
||||||
|
Loading…
Reference in New Issue
Block a user