diff options
-rw-r--r-- | main.go | 12 | ||||
-rw-r--r-- | static/css/main.css | 8 | ||||
-rw-r--r-- | templates/en.index.html | 18 | ||||
-rw-r--r-- | templates/jp.index.html | 2 | ||||
-rw-r--r-- | templates/redirect.index.html | 11 |
5 files changed, 44 insertions, 7 deletions
@@ -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 @@ +<!DOCTYPE html> +<html> + <head> + <title>Hell Correspondence</title> + <link rel="stylesheet" type="text/css" href="static/css/main.css"> + </head> + <body> + <div id="orig-body"> + <h1>What is your grudge?</h1> + + <form> + <input type="text" id="name" name="name"> + </form> + + <button type="button" id="send">Send</button> + </div> + </body> +</html> 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 @@ </head> <body> <!--<br><br><br><br><br><br><br><br><br><br><br> --> - <div id="jp-body"> + <div id="orig-body"> <h1>あなたの怨み、晴らします。</h1> <form> 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 @@ +<!DOCTYPE html> +<html> + <head> + <script> + function Redirect() { + window.location = "/en"; + } + setTimeout('Redirect()', 10) + </script> + </head> +</html> |