From aa15d59e35523c7210e962ab367e56f68467317b Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 20 Apr 2021 15:46:06 +0530 Subject: styled the form and completed the mechanism to only render page on midnight --- main.go | 3 ++- static/css/old/style.css | 5 +++++ static/css/style.css | 43 +++++++++++++++++++++++++++++++++++++++++-- static/scripts/CheckTime.js | 4 ++++ templates/en.index.html | 1 + templates/index.html | 6 ++++++ templates/jp.index.html | 1 + 7 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 static/scripts/CheckTime.js diff --git a/main.go b/main.go index 837dce2..0e75be7 100644 --- a/main.go +++ b/main.go @@ -22,7 +22,8 @@ func main() { router.Static("/media", "static/media") - //router.Static("/scripts", "static/scripts") + router.Static("/scripts", "static/scripts") + router.Static("/old/scripts", "static/scripts") // serve classic themed pages router.GET("/old", func (c *gin.Context) { diff --git a/static/css/old/style.css b/static/css/old/style.css index 281322d..d7326bf 100644 --- a/static/css/old/style.css +++ b/static/css/old/style.css @@ -27,6 +27,10 @@ input[type=text] { margin: 0; box-sizing: border-box; color: red; + + border-radius: 3px; + border: none; + outline: none; } input[type=submit] { @@ -39,4 +43,5 @@ input[type=submit] { input[type=submit]:hover { background-color: #A0A8C8; + border: none; } diff --git a/static/css/style.css b/static/css/style.css index fa54eee..5b367d6 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -12,6 +12,27 @@ body { margin-bottom: 2.5rem; background-color: #222526; overflow: hidden; + + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; +} + +.navbar p, +.navbar nav { + display: inline-block; + margin: auto 2rem; +} + +.navbar p { + font-size: 2rem; +} + +nav a { + color: pink; + text-decoration: none; + padding: 0.5rem; } .root { @@ -45,6 +66,13 @@ form input { input[type=text] { height: 2rem; box-sizing: border-box; + outline: none; + + color: #FF0000; +} + +input[type=text]:hover { + outline-color: red; } #submit-button { @@ -79,9 +107,20 @@ h1, h3 { @media only screen and (max-device-width: 480px) { .content { - margin: auto; + margin: auto; } form { - width: 100%; + width: 100%; } + .navbar p, + .navbar nav { + display: inline-block; + margin: auto 0.5rem; + } + nav a { + margin: 0; + } + .navbar p { + font-size: 2rem; + } } diff --git a/static/scripts/CheckTime.js b/static/scripts/CheckTime.js new file mode 100644 index 0000000..7c806c5 --- /dev/null +++ b/static/scripts/CheckTime.js @@ -0,0 +1,4 @@ +var timeHours = new Date().getHours(); +if (timeHours != 00) { + window.location = "about:blank" +} diff --git a/templates/en.index.html b/templates/en.index.html index a948e84..115c56a 100644 --- a/templates/en.index.html +++ b/templates/en.index.html @@ -4,6 +4,7 @@ Hell Correspondence +
diff --git a/templates/index.html b/templates/index.html index c1c06fc..0a93a47 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,9 +4,15 @@ Hell Correspondence (new ver.) +
diff --git a/templates/jp.index.html b/templates/jp.index.html index 08ac0b1..6e44f39 100644 --- a/templates/jp.index.html +++ b/templates/jp.index.html @@ -4,6 +4,7 @@ Hell Correspondence +
-- cgit v1.2.3