newest.go 406 B

1234567891011121314151617181920212223
  1. package pages
  2. import (
  3. core "codeberg.org/vnpower/pixivfe/v2/core/webapi"
  4. "github.com/gofiber/fiber/v2"
  5. )
  6. func NewestPage(c *fiber.Ctx) error {
  7. worktype := c.Query("type", "illust")
  8. r18 := c.Query("r18", "false")
  9. works, err := core.GetNewestArtworks(c, worktype, r18)
  10. if err != nil {
  11. return err
  12. }
  13. return c.Render("pages/newest", fiber.Map{
  14. "Items": works,
  15. "Title": "Newest works",
  16. })
  17. }