mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
Refactor code
This commit is contained in:
@@ -90,6 +90,20 @@ type UserBrief struct {
|
||||
Avatar string `json:"imageBig"`
|
||||
}
|
||||
|
||||
type ArtworkBrief struct {
|
||||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
ArtistID string `json:"userId"`
|
||||
ArtistName string `json:"userName"`
|
||||
ArtistAvatar string `json:"profileImageUrl"`
|
||||
Thumbnail string `json:"url"`
|
||||
Pages int `json:"pageCount"`
|
||||
XRestrict int `json:"xRestrict"`
|
||||
AiType int `json:"aiType"`
|
||||
Bookmarked any `json:"bookmarkData"`
|
||||
IllustType int `json:"illustType"`
|
||||
}
|
||||
|
||||
type Illust struct {
|
||||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
|
||||
@@ -7,19 +7,6 @@ import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
type ArtworkBrief struct {
|
||||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
ArtistID string `json:"userId"`
|
||||
ArtistName string `json:"userName"`
|
||||
ArtistAvatar string `json:"profileImageUrl"`
|
||||
Thumbnail string `json:"url"`
|
||||
Pages int `json:"pageCount"`
|
||||
XRestrict int `json:"xRestrict"`
|
||||
AiType int `json:"aiType"`
|
||||
Bookmarked any `json:"bookmarkData"`
|
||||
}
|
||||
|
||||
func GetNewestArtworks(c *fiber.Ctx, worktype string, r18 string) ([]ArtworkBrief, error) {
|
||||
token := session.GetToken(c)
|
||||
URL := http.GetNewestArtworksURL(worktype, r18, "0")
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width="48px" height="48px"><g fill-opacity="0" fill="#000000" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,256v-256h256v256z" id="bgRectangle"></path></g><g fill="#ffffff" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><g transform="scale(4,4)"><path d="M22.521,29.862h-3.431c-0.886,0 -1.603,-0.718 -1.603,-1.603v-5.905c0,-0.97 0.607,-1.828 1.522,-2.151c2.225,-0.786 6.172,-3.122 6.823,-9.871c0.096,-0.996 0.911,-1.77 1.912,-1.77h6.391c0.872,0 1.579,0.707 1.579,1.579v9.302h6.468c0.886,0 1.603,0.718 1.603,1.603v7.213c0,0.886 -0.718,1.603 -1.603,1.603h-6.468v10.422c0,2.368 1.144,3.275 2.233,3.275c0.858,0 2.344,-0.375 3.437,-0.689c0.773,-0.222 1.526,0.075 1.848,0.956c0.322,0.881 2.045,5.833 2.045,5.833c0.315,0.899 -0.008,1.891 -0.787,2.44c-1.475,1.04 -4.248,2.463 -8.38,2.463c-6.418,0 -13.589,-2.852 -13.589,-13.494c0,-2.114 0,-11.206 0,-11.206z"></path></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -1,4 +1,5 @@
|
||||
<div class="artwork-additional">
|
||||
|
||||
{{ if .XRestrict != 0 }}
|
||||
<div class="artwork-profanity-label">
|
||||
<span>{{ if .XRestrict == 1 }}R-18{{ else }}R-18G{{ end }}</span>
|
||||
@@ -6,7 +7,7 @@
|
||||
{{ end }} {{ if .Pages > 1 }}
|
||||
<div class="artwork-page-count"><span>⧉ {{ .Pages }}</span></div>
|
||||
{{ end }}
|
||||
{{ if .IsUgoira }}
|
||||
{{ if .IllustType == 2 }}
|
||||
<div class="artwork-page-count"><span>▶</span></div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user