From b21affc9a724d8c9d9bcbf05136bcb0128a42292 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 19 Oct 2020 14:17:35 +0530 Subject: Added English site and a redirect page --- main.go | 12 ++++++++++-- static/css/main.css | 8 ++++---- templates/en.index.html | 18 ++++++++++++++++++ templates/jp.index.html | 2 +- templates/redirect.index.html | 11 +++++++++++ 5 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 templates/en.index.html create mode 100644 templates/redirect.index.html diff --git a/main.go b/main.go index d7354e3..b7f035a 100644 --- a/main.go +++ b/main.go @@ -19,12 +19,20 @@ func main() { router := gin.New() router.Use(gin.Logger()) - router.LoadHTMLGlob("templates/*.html") + router.LoadHTMLGlob("templates/*") router.Static("/static", "static") - router.GET("/", func(c *gin.Context) { + router.GET("/en", func(c *gin.Context) { + c.HTML(http.StatusOK, "en.index.html", nil) + }) + + router.GET("/jp", func(c *gin.Context) { c.HTML(http.StatusOK, "jp.index.html", nil) }) + router.GET("/", func(c *gin.Context) { + c.HTML(http.StatusOK, "redirect.index.html", nil) + }) + router.Run(":" + port) } diff --git a/static/css/main.css b/static/css/main.css index b263761..7b1f20b 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -2,7 +2,7 @@ body { background-color: #000000; } -#jp-body { +#orig-body { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -95%); @@ -11,17 +11,17 @@ body { } -#jp-body * { +#orig-body * { text-align: center; color: #ffffff; } -#jp-body #name { +#orig-body #name { width: 65%; color: #ff0000; } -#jp-body #send { +#orig-body #send { background-color: #C0C8CA; color: #000000; position: absolute; diff --git a/templates/en.index.html b/templates/en.index.html new file mode 100644 index 0000000..8005882 --- /dev/null +++ b/templates/en.index.html @@ -0,0 +1,18 @@ + + + + Hell Correspondence + + + +
+

What is your grudge?

+ +
+ +
+ + +
+ + diff --git a/templates/jp.index.html b/templates/jp.index.html index 520be85..4ea5d2b 100644 --- a/templates/jp.index.html +++ b/templates/jp.index.html @@ -6,7 +6,7 @@ -
+

あなたの怨み、晴らします。

diff --git a/templates/redirect.index.html b/templates/redirect.index.html new file mode 100644 index 0000000..63b279b --- /dev/null +++ b/templates/redirect.index.html @@ -0,0 +1,11 @@ + + + + + + -- cgit v1.2.3