diff --git a/assets/views/fragments/pixivisionArticles.jet.html b/assets/views/fragments/pixivisionArticles.jet.html
deleted file mode 100644
index fa31b56..0000000
--- a/assets/views/fragments/pixivisionArticles.jet.html
+++ /dev/null
@@ -1,35 +0,0 @@
-{{- range _, article := . }}
-
{{- Mode := isset(Queries.mode) ? Queries.mode : "all" }}
diff --git a/assets/views/pixivisionIndex.jet.html b/assets/views/pixivisionIndex.jet.html
index 8916252..1d535fd 100644
--- a/assets/views/pixivisionIndex.jet.html
+++ b/assets/views/pixivisionIndex.jet.html
@@ -5,8 +5,41 @@
-
- {{- include "fragments/pixivisionArticles" .Data }}
+ {{- range _, article := .Data }}
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+ {{parseTimeCustomFormat(article.Date, "2006-01-02")}}
+
+
+
+
+
+ {{- end }}
diff --git a/core/index.go b/core/index.go
index f3ff470..db96586 100644
--- a/core/index.go
+++ b/core/index.go
@@ -29,19 +29,14 @@ type LandingArtworks struct {
Newest []ArtworkBrief
Rankings []ArtworkBrief
Users []ArtworkBrief
- // NOTE: a Pixivision field *does* exist in the GetLandingURL response, but it is incomplete,
- // containing only the id, title, thumbnailUrl, and url fields
- // As such, we need to retrieve the full-fat Pixivision field by calling PixivisionGetHomepage
- // Pixivision []Pixivision
- Pixivision []PixivisionArticle
+ Pixivision []Pixivision
RecommendByTags []RecommendedTags
}
func GetLanding(r *http.Request, mode string) (*LandingArtworks, error) {
var pages struct {
- // NOTE: commented out for the reason above
- // Pixivision []Pixivision `json:"pixivision"`
- Follow []int `json:"follow"`
+ Pixivision []Pixivision `json:"pixivision"`
+ Follow []int `json:"follow"`
Recommended struct {
IDs []string `json:"ids"`
} `json:"recommend"`
@@ -100,20 +95,7 @@ func GetLanding(r *http.Request, mode string) (*LandingArtworks, error) {
}
// Parse everything
- // Fetch full pixivision data
- pixivisionArticles, err := PixivisionGetHomepage(r, "1") // Fetch the first page
- if err != nil {
- return &landing, err
- }
-
- // Apply ProxyImageUrl to each Thumbnail
- for i := range pixivisionArticles {
- pixivisionArticles[i].Thumbnail = session.ProxyImageUrl(r, pixivisionArticles[i].Thumbnail)
- }
-
- // Assign the fetched pixivision articles to the landing struct
- landing.Pixivision = pixivisionArticles
- fmt.Println("Pixivision JSON:", gjson.Get(pagesStr, "pixivision"))
+ landing.Pixivision = pages.Pixivision
landing.Following = make([]ArtworkBrief, len(pages.Follow))
for _, i := range pages.Follow {