From 2b302678650520750863ae19f7a940219646225c Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Fri, 5 Feb 2021 21:01:24 +0530 Subject: coded a server to serve the startpage locally --- startpage/background.jpg | Bin 0 -> 522763 bytes startpage/backgrounds/Ansel.jpg | Bin 482937 -> 0 bytes startpage/backgrounds/Aqua.jpg | Bin 1881728 -> 0 bytes startpage/backgrounds/Chika.jpg | Bin 573932 -> 0 bytes startpage/backgrounds/Girl-at-station.jpg | Bin 340648 -> 0 bytes startpage/backgrounds/Girl.jpg | Bin 199689 -> 0 bytes startpage/backgrounds/Hitagi.png | Bin 556795 -> 0 bytes startpage/backgrounds/Kaguya.jpg | Bin 188863 -> 0 bytes startpage/backgrounds/Komachi.png | Bin 185672 -> 0 bytes startpage/backgrounds/Konosuba-waifus.png | Bin 2227037 -> 0 bytes startpage/backgrounds/Mai-station.jpg | Bin 2005186 -> 0 bytes startpage/backgrounds/Mai.jpg | Bin 1018478 -> 0 bytes startpage/backgrounds/Megumin-and-Aqua.jpg | Bin 3380865 -> 0 bytes startpage/backgrounds/Megumin-and-Emilia.jpg | Bin 360133 -> 0 bytes startpage/backgrounds/Megumin-redBG.png | Bin 724268 -> 0 bytes startpage/backgrounds/Megumin.png | Bin 200282 -> 0 bytes startpage/backgrounds/Mizuhara.png | Bin 613929 -> 0 bytes startpage/backgrounds/Rain.jpg | Bin 651929 -> 0 bytes startpage/backgrounds/Shrine-in-sky.png | Bin 1493233 -> 0 bytes startpage/backgrounds/Sky.png | Bin 6994708 -> 0 bytes startpage/backgrounds/Station.jpg | Bin 188067 -> 0 bytes startpage/backgrounds/Tifa.png | Bin 4471274 -> 0 bytes startpage/backgrounds/Yukino-sitting-ground.png | Bin 2557825 -> 0 bytes startpage/backgrounds/Yukino-twintails.jpg | Bin 522763 -> 0 bytes startpage/backgrounds/Yukino.png | Bin 686328 -> 0 bytes startpage/backgrounds/Zero-Tsu.png | Bin 2620190 -> 0 bytes startpage/backgrounds/falling-from-sky.png | Bin 1784787 -> 0 bytes startpage/backgrounds/mm.png | Bin 1815592 -> 0 bytes startpage/backgrounds/walking-in-rain.jpg | Bin 1398716 -> 0 bytes startpage/index.html | 74 ++++++++++++++---------- startpage/server.go | 22 +++++++ startpage/styles.css | 70 ---------------------- 32 files changed, 66 insertions(+), 100 deletions(-) create mode 100644 startpage/background.jpg delete mode 100644 startpage/backgrounds/Ansel.jpg delete mode 100644 startpage/backgrounds/Aqua.jpg delete mode 100644 startpage/backgrounds/Chika.jpg delete mode 100644 startpage/backgrounds/Girl-at-station.jpg delete mode 100644 startpage/backgrounds/Girl.jpg delete mode 100644 startpage/backgrounds/Hitagi.png delete mode 100644 startpage/backgrounds/Kaguya.jpg delete mode 100644 startpage/backgrounds/Komachi.png delete mode 100644 startpage/backgrounds/Konosuba-waifus.png delete mode 100644 startpage/backgrounds/Mai-station.jpg delete mode 100644 startpage/backgrounds/Mai.jpg delete mode 100644 startpage/backgrounds/Megumin-and-Aqua.jpg delete mode 100644 startpage/backgrounds/Megumin-and-Emilia.jpg delete mode 100644 startpage/backgrounds/Megumin-redBG.png delete mode 100644 startpage/backgrounds/Megumin.png delete mode 100644 startpage/backgrounds/Mizuhara.png delete mode 100644 startpage/backgrounds/Rain.jpg delete mode 100644 startpage/backgrounds/Shrine-in-sky.png delete mode 100644 startpage/backgrounds/Sky.png delete mode 100644 startpage/backgrounds/Station.jpg delete mode 100644 startpage/backgrounds/Tifa.png delete mode 100644 startpage/backgrounds/Yukino-sitting-ground.png delete mode 100644 startpage/backgrounds/Yukino-twintails.jpg delete mode 100644 startpage/backgrounds/Yukino.png delete mode 100644 startpage/backgrounds/Zero-Tsu.png delete mode 100644 startpage/backgrounds/falling-from-sky.png delete mode 100644 startpage/backgrounds/mm.png delete mode 100644 startpage/backgrounds/walking-in-rain.jpg create mode 100644 startpage/server.go delete mode 100644 startpage/styles.css (limited to 'startpage') diff --git a/startpage/background.jpg b/startpage/background.jpg new file mode 100644 index 00000000..3e8476f3 Binary files /dev/null and b/startpage/background.jpg differ diff --git a/startpage/backgrounds/Ansel.jpg b/startpage/backgrounds/Ansel.jpg deleted file mode 100644 index f10a5a81..00000000 Binary files a/startpage/backgrounds/Ansel.jpg and /dev/null differ diff --git a/startpage/backgrounds/Aqua.jpg b/startpage/backgrounds/Aqua.jpg deleted file mode 100644 index b4af4418..00000000 Binary files a/startpage/backgrounds/Aqua.jpg and /dev/null differ diff --git a/startpage/backgrounds/Chika.jpg b/startpage/backgrounds/Chika.jpg deleted file mode 100644 index 7a381ca8..00000000 Binary files a/startpage/backgrounds/Chika.jpg and /dev/null differ diff --git a/startpage/backgrounds/Girl-at-station.jpg b/startpage/backgrounds/Girl-at-station.jpg deleted file mode 100644 index f20afb2f..00000000 Binary files a/startpage/backgrounds/Girl-at-station.jpg and /dev/null differ diff --git a/startpage/backgrounds/Girl.jpg b/startpage/backgrounds/Girl.jpg deleted file mode 100644 index b4ef26ef..00000000 Binary files a/startpage/backgrounds/Girl.jpg and /dev/null differ diff --git a/startpage/backgrounds/Hitagi.png b/startpage/backgrounds/Hitagi.png deleted file mode 100644 index 6aeb7065..00000000 Binary files a/startpage/backgrounds/Hitagi.png and /dev/null differ diff --git a/startpage/backgrounds/Kaguya.jpg b/startpage/backgrounds/Kaguya.jpg deleted file mode 100644 index 0617483e..00000000 Binary files a/startpage/backgrounds/Kaguya.jpg and /dev/null differ diff --git a/startpage/backgrounds/Komachi.png b/startpage/backgrounds/Komachi.png deleted file mode 100644 index 14ae8746..00000000 Binary files a/startpage/backgrounds/Komachi.png and /dev/null differ diff --git a/startpage/backgrounds/Konosuba-waifus.png b/startpage/backgrounds/Konosuba-waifus.png deleted file mode 100644 index 1d84758d..00000000 Binary files a/startpage/backgrounds/Konosuba-waifus.png and /dev/null differ diff --git a/startpage/backgrounds/Mai-station.jpg b/startpage/backgrounds/Mai-station.jpg deleted file mode 100644 index 1a0c1d2b..00000000 Binary files a/startpage/backgrounds/Mai-station.jpg and /dev/null differ diff --git a/startpage/backgrounds/Mai.jpg b/startpage/backgrounds/Mai.jpg deleted file mode 100644 index 5cfd0021..00000000 Binary files a/startpage/backgrounds/Mai.jpg and /dev/null differ diff --git a/startpage/backgrounds/Megumin-and-Aqua.jpg b/startpage/backgrounds/Megumin-and-Aqua.jpg deleted file mode 100644 index 889bff71..00000000 Binary files a/startpage/backgrounds/Megumin-and-Aqua.jpg and /dev/null differ diff --git a/startpage/backgrounds/Megumin-and-Emilia.jpg b/startpage/backgrounds/Megumin-and-Emilia.jpg deleted file mode 100644 index 639ca0e6..00000000 Binary files a/startpage/backgrounds/Megumin-and-Emilia.jpg and /dev/null differ diff --git a/startpage/backgrounds/Megumin-redBG.png b/startpage/backgrounds/Megumin-redBG.png deleted file mode 100644 index e60dc328..00000000 Binary files a/startpage/backgrounds/Megumin-redBG.png and /dev/null differ diff --git a/startpage/backgrounds/Megumin.png b/startpage/backgrounds/Megumin.png deleted file mode 100644 index a4e6eea8..00000000 Binary files a/startpage/backgrounds/Megumin.png and /dev/null differ diff --git a/startpage/backgrounds/Mizuhara.png b/startpage/backgrounds/Mizuhara.png deleted file mode 100644 index edcc16db..00000000 Binary files a/startpage/backgrounds/Mizuhara.png and /dev/null differ diff --git a/startpage/backgrounds/Rain.jpg b/startpage/backgrounds/Rain.jpg deleted file mode 100644 index 8a3c7eaa..00000000 Binary files a/startpage/backgrounds/Rain.jpg and /dev/null differ diff --git a/startpage/backgrounds/Shrine-in-sky.png b/startpage/backgrounds/Shrine-in-sky.png deleted file mode 100644 index e8f849eb..00000000 Binary files a/startpage/backgrounds/Shrine-in-sky.png and /dev/null differ diff --git a/startpage/backgrounds/Sky.png b/startpage/backgrounds/Sky.png deleted file mode 100644 index b32fc342..00000000 Binary files a/startpage/backgrounds/Sky.png and /dev/null differ diff --git a/startpage/backgrounds/Station.jpg b/startpage/backgrounds/Station.jpg deleted file mode 100644 index d1c9f9c6..00000000 Binary files a/startpage/backgrounds/Station.jpg and /dev/null differ diff --git a/startpage/backgrounds/Tifa.png b/startpage/backgrounds/Tifa.png deleted file mode 100644 index 812ed2f3..00000000 Binary files a/startpage/backgrounds/Tifa.png and /dev/null differ diff --git a/startpage/backgrounds/Yukino-sitting-ground.png b/startpage/backgrounds/Yukino-sitting-ground.png deleted file mode 100644 index 62bfa5f4..00000000 Binary files a/startpage/backgrounds/Yukino-sitting-ground.png and /dev/null differ diff --git a/startpage/backgrounds/Yukino-twintails.jpg b/startpage/backgrounds/Yukino-twintails.jpg deleted file mode 100644 index 3e8476f3..00000000 Binary files a/startpage/backgrounds/Yukino-twintails.jpg and /dev/null differ diff --git a/startpage/backgrounds/Yukino.png b/startpage/backgrounds/Yukino.png deleted file mode 100644 index fe303dac..00000000 Binary files a/startpage/backgrounds/Yukino.png and /dev/null differ diff --git a/startpage/backgrounds/Zero-Tsu.png b/startpage/backgrounds/Zero-Tsu.png deleted file mode 100644 index 78d55996..00000000 Binary files a/startpage/backgrounds/Zero-Tsu.png and /dev/null differ diff --git a/startpage/backgrounds/falling-from-sky.png b/startpage/backgrounds/falling-from-sky.png deleted file mode 100644 index 9c28435f..00000000 Binary files a/startpage/backgrounds/falling-from-sky.png and /dev/null differ diff --git a/startpage/backgrounds/mm.png b/startpage/backgrounds/mm.png deleted file mode 100644 index 8bb630ef..00000000 Binary files a/startpage/backgrounds/mm.png and /dev/null differ diff --git a/startpage/backgrounds/walking-in-rain.jpg b/startpage/backgrounds/walking-in-rain.jpg deleted file mode 100644 index 095b68fe..00000000 Binary files a/startpage/backgrounds/walking-in-rain.jpg and /dev/null differ diff --git a/startpage/index.html b/startpage/index.html index 334f2035..18b2dd2e 100644 --- a/startpage/index.html +++ b/startpage/index.html @@ -1,32 +1,54 @@ - - + Welcome, Vidhu Kant! - - -
-

- Welcome, Vidhu Kant! -

- -

- Time: -

-
+ +
+ {{ .time }}
- - - -
- + - - diff --git a/startpage/server.go b/startpage/server.go new file mode 100644 index 00000000..b2eef0ca --- /dev/null +++ b/startpage/server.go @@ -0,0 +1,22 @@ +package main + +import ( + "github.com/gin-gonic/gin" + "net/http" + "time" +) + +func main() { + router := gin.New() + router.LoadHTMLGlob("/home/zt/.config/startpage/index.html") + router.Static("main", "/home/zt/.config/startpage/") + + router.GET("/", func (c *gin.Context) { + time := time.Now().Format("15:04 02 Jan (Monday)") + c.HTML(http.StatusOK, "index.html", gin.H{ + "time": time, + }) + }) + + router.Run(":8081") +} diff --git a/startpage/styles.css b/startpage/styles.css deleted file mode 100644 index 92db46e5..00000000 --- a/startpage/styles.css +++ /dev/null @@ -1,70 +0,0 @@ -.center { text-align: center; } -body { - margin: 7px; - background-color: #111111; - background-image: url('bg5.jxg'), url("shttps://raw.githubusercontent.com/MikunoNaka/dots/master/startpage/bg5.jpg"); - background-repeat: no-repeat; - background-size: cover; -} - -.content { - border-radius: 6px; - background: #2326273f; - padding: 10px 24px; - margin: 3%; -} - -.content #title { - font-size: 44px; -} - -#time-container h2 { - font-size: 32px; - color: #f50a69; - margin-right: 510px; - margin-left: 510px; - padding: 5px 0px; - background-color: #23262719; - border-radius: 50px; -} - - - -.content h1 { - color: #FFFFFF; -} - - -#bottom-nav-container { - margin: -7px; - background-color: #3333330d; - overflow: hidden; - position: fixed; - bottom: 6px; - width: 100%; - padding: 13px 0px 22px 0px; -} - -.bottom-nav-item p { - display: inline; - color: #FFFFFF; -} - -#nav-links { - max-width: 96%; - margin: 3%; - padding: 12px 12px 12px 12px; - background-color: #FCFCFCdd; - border: 2px solid #232627; - border-radius: 90px 90px 90px 90px; -} - -#nav-links a { - color: #FFFFFF; - background-color: #5b76b7; - text-decoration: none; - padding: 8px 18px; - border-radius: 20px; - margin-right: 3px; - margin-left: 3px; -} -- cgit v1.2.3