From 7383f23e7639a673ef7c00a3a4146a0e4395eee5 Mon Sep 17 00:00:00 2001 From: VnPower Date: Thu, 8 Jun 2023 15:31:57 +0700 Subject: [PATCH] Update: I have decided not to complicate stuff with meta tags --- template/header.html | 16 ++-------------- views/routes.go | 16 +--------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/template/header.html b/template/header.html index bdfbb16..01cbce6 100644 --- a/template/header.html +++ b/template/header.html @@ -3,25 +3,13 @@ {{ if not .Title }} PixivFE - {{ else }} - {{ .Title }} - PixivFE - + {{ . }} - PixivFE {{ end }} + - {{ if .Image }} - - - {{ end }} - - - - - - - diff --git a/views/routes.go b/views/routes.go index 45ff042..f8fa3d3 100644 --- a/views/routes.go +++ b/views/routes.go @@ -13,13 +13,6 @@ import ( var PC *handler.PixivClient -type Context struct { - Title string - Url string - Description string - Image string -} - func artwork_page(c *gin.Context) { id := c.Param("id") if _, err := strconv.Atoi(id); err != nil { @@ -50,19 +43,12 @@ func artwork_page(c *gin.Context) { }) } - context := Context{ - illust.Title, - c.Request.Host + c.Request.URL.Path, - string(illust.Description), - illust.Images[0].Large, - } - c.HTML(http.StatusOK, "artwork.html", gin.H{ "Illust": illust, "Related": related, "Artist": artist_info, "Comments": comments, - "Context": context, + "Title": illust.Title, }) }