diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | go.mod | 5 | ||||
-rw-r--r-- | go.sum | 53 | ||||
-rwxr-xr-x | hell-link | bin | 0 -> 12650595 bytes | |||
-rw-r--r-- | main.go | 44 | ||||
-rw-r--r-- | static/css/new.main.css | 111 | ||||
-rw-r--r-- | static/css/old/style.css | 42 | ||||
-rw-r--r-- | static/media/HG.png | bin | 0 -> 149549 bytes | |||
-rw-r--r-- | static/media/HG2.png | bin | 0 -> 77249 bytes | |||
-rw-r--r-- | static/media/image-big.png | bin | 0 -> 347647 bytes | |||
-rw-r--r-- | static/media/index.png | bin | 0 -> 5097 bytes | |||
-rw-r--r-- | templates/en.index.html | 17 | ||||
-rw-r--r-- | templates/jp.index.html | 17 | ||||
-rw-r--r-- | templates/new.index.html | 54 |
15 files changed, 345 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/README.md b/README.md new file mode 100644 index 0000000..d281ef0 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# KE-website @@ -0,0 +1,5 @@ +module hell-link + +go 1.15 + +require github.com/gin-gonic/gin v1.6.3 @@ -0,0 +1,53 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/hell-link b/hell-link Binary files differnew file mode 100755 index 0000000..b604d0e --- /dev/null +++ b/hell-link @@ -0,0 +1,44 @@ +package main + +import ( + "github.com/gin-gonic/gin" + "net/http" + //"os" + "fmt" +) + +func main() { + // Set Gin to production mode + // gin.SetMode(gin.ReleaseMode) + var port string = "8080" +// var port string = os.Getenv("PORT") + router := gin.New() + router.Use(gin.Logger()) + router.LoadHTMLGlob("templates/*") + + // css static routes + router.Static("/css", "static/css") + router.Static("/old/css", "static/css/old") + // js static routes + /*router.Static("/scripts", "static/scripts") + router.Static("/media", "static/media")*/ + + // serve classic themed pages + router.GET("/old", func (c *gin.Context) { + c.Redirect(http.StatusMovedPermanently, "/old/en") + }) + router.GET("/old/en", func (c *gin.Context) { + c.HTML(http.StatusOK, "en.index.html", nil) + }) + router.GET("/old/jp", func (c *gin.Context) { + c.HTML(http.StatusOK, "jp.index.html", nil) + }) + + router.POST("/old/submit", func (c *gin.Context) { + // do something else plz + var name string = c.PostForm("name") + fmt.Println(name) + }) + + router.Run(":" + port) +} diff --git a/static/css/new.main.css b/static/css/new.main.css new file mode 100644 index 0000000..403d1e4 --- /dev/null +++ b/static/css/new.main.css @@ -0,0 +1,111 @@ +body { + background-color: #232627; +} + +strong { + color: red; +} + +.navbar { + background-color: #222526; + overflow: hidden; +} + +.navbar a { + float: right; + display: block; + color: #9e00ff; + text-align: right; +/* padding: 30px 50px;*/ + padding: 30px 8%; + text-decoration: none; + font-size: 24; +} + +.navbar #logo { + float: left; + padding: 0px 0px; +} + +.navbar .hamburger-icon { + display: none; +} + +/*hamburger menu shit*/ +@media screen and (max-width: 481px) { + .navbar a:not(:first-child) {display: none;} + .navbar a.hamburger-icon { + float: right; + display: block; + } +} + +@media screen and (max-width: 481px) { + .navbar.responsive {position: relative;} + .navbar.responsive a.hamburger-icon { +/* display: none;*/ + position: relative; + right: 0; + top: 0; + padding: 30px 8%; + float:right; + } + .navbar.responsive a { + float: right; + display: block; + text-align: center; + padding: 30px 8%; + } +} + +/*Navbar is done*/ +.body { + background-image: url("HG.png"); + background-repeat: no-repeat; + background-position: left top; + text-align: center; + margin-left: 4%; +} + +.body h1, h3 { + color: #f0f0f0; + background-color: #23262766; + display: inline; + padding: 1px 1px; +} + +.rightflex { + float: right; + margin-right: 10%; +} + +.form { + padding: 9%; +} + +#send { + margin-left: 6%; + color: #000000; + background-color: #ff0057; + border: 1px solid #e30808; + border-radius: 8px; + padding: 1% 5%; + transition-duration: 0.4s; +} + +#send:hover { + background-color: #ff0000; +} + +#name { + color: #ff0000; +} + +.big { + font-size: 20px; + padding: 4px 4px; +} + +.subtext { + margin-top: 3%; +} diff --git a/static/css/old/style.css b/static/css/old/style.css new file mode 100644 index 0000000..281322d --- /dev/null +++ b/static/css/old/style.css @@ -0,0 +1,42 @@ +@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap'); + +body { + background-color: #000000; + color: #FFFFFF; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + margin: 0; +} + +* { + font-family: 'Roboto', sans-serif; + text-align: center; +} + +form { + display: flex; + flex-direction: column; + align-items: center; +} + +input[type=text] { + height: 1.5rem; + width: 200px; + margin: 0; + box-sizing: border-box; + color: red; +} + +input[type=submit] { + background-color: #C0C8CA; + color: #000000; + width: 3.5rem; + height: 1.7rem; + margin: 1.3rem; +} + +input[type=submit]:hover { + background-color: #A0A8C8; +} diff --git a/static/media/HG.png b/static/media/HG.png Binary files differnew file mode 100644 index 0000000..ff657d1 --- /dev/null +++ b/static/media/HG.png diff --git a/static/media/HG2.png b/static/media/HG2.png Binary files differnew file mode 100644 index 0000000..d5ed4e8 --- /dev/null +++ b/static/media/HG2.png diff --git a/static/media/image-big.png b/static/media/image-big.png Binary files differnew file mode 100644 index 0000000..44bb792 --- /dev/null +++ b/static/media/image-big.png diff --git a/static/media/index.png b/static/media/index.png Binary files differnew file mode 100644 index 0000000..edb81a5 --- /dev/null +++ b/static/media/index.png diff --git a/templates/en.index.html b/templates/en.index.html new file mode 100644 index 0000000..a948e84 --- /dev/null +++ b/templates/en.index.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> + <title>Hell Correspondence</title> + <link rel="stylesheet" type="text/css" href="css/style.css" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> +</head> +<body> + <div> + <form method="post" action="submit"> + <label for="name-input"><h1>What is your grudge?</h1></label> + <input type="text" id="name-input" name="name" /> + <input type="submit" id="submit-button" name="submit" value="send" /> + </form> + </div> +</body> +</html> diff --git a/templates/jp.index.html b/templates/jp.index.html new file mode 100644 index 0000000..08ac0b1 --- /dev/null +++ b/templates/jp.index.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> + <title>Hell Correspondence</title> + <link rel="stylesheet" type="text/css" href="css/style.css"> + <meta name="viewport" content="width=device-width, initial-scale=1" /> +</head> +<body> + <div> + <form method="post" action="submit"> + <label for="name-input"><h1>あなたの怨み、晴らします。</h1></label> + <input type="text" id="name-input" name="name" /> + <input type="submit" id="submit-button" name="submit" value="送信" /> + </form> + </div> +</body> +</html> diff --git a/templates/new.index.html b/templates/new.index.html new file mode 100644 index 0000000..565b80e --- /dev/null +++ b/templates/new.index.html @@ -0,0 +1,54 @@ +<!DOCTYPE html> +<html> + <head> + <link rel="stylesheet" type="text/css" href="static/css/new.main.css"> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> + <script> + function myFunction() { + var x = document.getElementById("topnavbar"); + if (x.className === "navbar") { + x.className += " responsive"; + } else { + x.className = "navbar"; + } + } + </script> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + <title>(beta)Hell Correspondence</title> + </head> + <body> + <div class="navbar" id="topnavbar"> + <a href="/" class="logo" id="logo"> + <img src="media/index.png" alt="Hell Girl anime version" width="80" height="80"></a> + <a href="javascript:void(0);" class="hamburger-icon" onclick="myFunction()"> + <i class="fa fa-bars"></i></a> + <a href="/en">More</a> + </div> + + + <div class="body" id="body"> + <div class="rightflex"> + <br> + <h1>Enter someone's name to send them to <strong>hell</strong>.</h1></span> + <div class="form" method="POST"> + <input type="text" id="name" name="name"> + <button type="button" id="send">Send</button> + </div> + <div class="subtext"> + <h3 id="subtext1"> + <strong class="big">Notice:</strong> + When you <strong>curse</strong> someone, there will be two holes that you dig... + </h3> + <br> + <h3 id="subtext2"> + One is for the cursed person and the other one is for <strong class="big">yourself. + </h3> + </div> + </div> + + <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> + </div> + <div id="foot"> + </div> + </body> +</html> |