Temporary landing page

This commit is contained in:
VnPower 2023-06-05 19:43:31 +07:00
parent 62cafeea11
commit e413a6e14b
Signed by: vnpower
GPG key ID: 881DE3DEB966106C
2 changed files with 20 additions and 13 deletions

6
template/temp.html Normal file
View file

@ -0,0 +1,6 @@
{{ template "header.html" }}
<div class="container">
<p>Landing page is still under construction.</p>
<small>Try pages in the sidebar, at the top left, or search something.</small>
</div>
{{ template "footer.html" }}

View file

@ -28,18 +28,19 @@ func artwork_page(c *gin.Context) {
})
}
// func index_page(c *gin.Context) {
// recommended, _ := handler.GetRecommendedIllust(c)
// ranking, _ := handler.GetRankingIllust(c, "day")
// spotlight := handler.GetSpotlightArticle(c)
// newest, _ := handler.GetNewestIllust(c)
// c.HTML(http.StatusOK, "index.html", gin.H{
// "Recommended": recommended,
// "Rankings": ranking,
// "Spotlights": spotlight,
// "Newest": newest,
// })
// }
func index_page(c *gin.Context) {
// recommended, _ := handler.GetRecommendedIllust(c)
// ranking, _ := handler.GetRankingIllust(c, "day")
// spotlight := handler.GetSpotlightArticle(c)
// newest, _ := handler.GetNewestIllust(c)
// c.HTML(http.StatusOK, "index.html", gin.H{
// "Recommended": recommended,
// "Rankings": ranking,
// "Spotlights": spotlight,
// "Newest": newest,
// })
c.HTML(http.StatusOK, "temp.html", gin.H{})
}
func user_page(c *gin.Context) {
id := c.Param("id")
@ -181,7 +182,7 @@ func SetupRoutes(r *gin.Engine) {
PC = NewPixivClient(5000)
PC.SetSessionID(configs.Configs.PHPSESSID)
PC.SetUserAgent(configs.Configs.UserAgent)
// r.GET("/", index_page)
r.GET("/", index_page)
r.GET("artworks/:id", artwork_page)
r.GET("users/:id", user_page)
r.GET("newest", newestArtworksPage)