mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
Index: add newest works
This commit is contained in:
@@ -75,6 +75,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="border-neutral-700 opacity-100 rounded mb-0">
|
||||
|
||||
<div class="col-12 mt-3">
|
||||
<h2>Newest works</h2>
|
||||
<div class="row row-cols-2 row-cols-md-4 row-cols-lg-6 g-4">
|
||||
{{- include "fragments/small-tn" .Data.Newest }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{- else }}
|
||||
|
||||
<!-- Otherwise, the user is logged in, show the full landing page -->
|
||||
@@ -178,6 +188,15 @@
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
<hr class="border-neutral-700 opacity-100 rounded mb-0">
|
||||
|
||||
<div class="col-12 mt-3">
|
||||
<h2>Newest works</h2>
|
||||
<div class="row row-cols-2 row-cols-md-4 row-cols-lg-6 g-4">
|
||||
{{- include "fragments/small-tn" .Data.Newest }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
+3
-3
@@ -43,14 +43,13 @@ type LandingArtworks struct {
|
||||
|
||||
// VnPower: sort alphabetically
|
||||
type Pages struct {
|
||||
|
||||
Pixivision []Pixivision `json:"pixivision"`
|
||||
Follow []int `json:"follow"`
|
||||
Recommended RecommendedSection `json:"recommend"`
|
||||
RecommendedByTag []RecommendByTag `json:"recommendByTag"`
|
||||
// Commented out fields that aren't currently implemented in the frontend
|
||||
// EditorRecommended []any `json:"editorRecommend"`
|
||||
// UserRecommended []any `json:"recommendUser"`
|
||||
// RecommendedUsers []RecommendedUser `json:"recommendUser"`
|
||||
// Commission []any `json:"completeRequestIds"`
|
||||
// TrendingTag []TrendingTag `json:"trendingTags"`
|
||||
//BoothFollows []BoothFollow `json:"boothFollowItemIds"`
|
||||
@@ -58,7 +57,7 @@ type Pages struct {
|
||||
//ContestResult []Contest `json:"contestResult"`
|
||||
//FavoriteTags []any `json:"myFavoriteTags"`
|
||||
//MyPixiv []any `json:"mypixiv"`
|
||||
//NewPost []any `json:"newPost"`
|
||||
Newest []string `json:"newPost"`
|
||||
//"ranking",
|
||||
//"sketchLiveFollowIds",
|
||||
//"sketchLivePopularIds",
|
||||
@@ -152,6 +151,7 @@ func GetLanding(auditor *audit.Auditor, r *http.Request, mode string, isLoggedIn
|
||||
}
|
||||
|
||||
landing.Rankings, err = ctx.fetchRankings(mode)
|
||||
landing.Newest = populateArtworks(pages.Newest, artworks)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user