From d41f2d41c619db7bfb219f40a5361227bbea9450 Mon Sep 17 00:00:00 2001 From: NewName Date: Sun, 22 Dec 2024 22:50:31 +0800 Subject: [PATCH] 1 --- ghproxy/main.go | 3 +-- ghproxy/public/bj.svg | 1 + ghproxy/public/index.html | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 ghproxy/public/bj.svg diff --git a/ghproxy/main.go b/ghproxy/main.go index 8fe4e79..92201e7 100644 --- a/ghproxy/main.go +++ b/ghproxy/main.go @@ -66,8 +66,7 @@ func main() { } }() - router.StaticFile("/", "./public/index.html") - router.StaticFile("/favicon.ico", "./public/favicon.ico") + router.Static("/", "./public") router.NoRoute(handler) err := router.Run(fmt.Sprintf("%s:%d", host, port)) diff --git a/ghproxy/public/bj.svg b/ghproxy/public/bj.svg new file mode 100644 index 0000000..41e1f15 --- /dev/null +++ b/ghproxy/public/bj.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ghproxy/public/index.html b/ghproxy/public/index.html index 51e4926..41c4efd 100644 --- a/ghproxy/public/index.html +++ b/ghproxy/public/index.html @@ -30,6 +30,11 @@ body { background-color: var(--color); + background-image: url('./bj.svg'); + background-position: center; + background-repeat: no-repeat; + background-size: cover; + background-attachment: fixed; color: var(--fontcolor); font-family: 'Misans', Arial, sans-serif; padding: 30px; @@ -98,7 +103,7 @@ left: 0; right: 0; text-align: center; - font-size: 1rem; + font-size: 1.2rem; } pre { @@ -556,4 +561,4 @@ - + \ No newline at end of file