diff --git a/.gitignore b/.gitignore index f8570a4397f29573a951604cabb93db9762f742c..4be66ce40856ad87d29687b0f69c0c1134d00d39 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.idea/ /vendor/ -/node_modules/ \ No newline at end of file +/node_modules/ +/assets/css/ \ No newline at end of file diff --git a/assets/sass/style.sass b/assets/sass/style.sass index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..26b7ceeab3c06f8088fa48d34594e5a1e958827d 100644 --- a/assets/sass/style.sass +++ b/assets/sass/style.sass @@ -0,0 +1,29 @@ +* + font-family: Verdana, Arial, sans-serif + +body + display: flex + flex-direction: column + align-items: center + +table + max-width: 720px + width: 100% + border-collapse: collapse + th + background: rgba(52, 68, 84, 1.0) + color: #ffffff + tr + background: rgba(52, 68, 84, 0.2) + font-size: 13px + &:nth-child(2n) + background: rgba(52, 68, 84, 0.1) + &.small-followup + tbody + background: rgba(52, 68, 84, 0.2) + tr + background: none + tr:not(:first-child) + font-size: 10px + &:nth-child(2n) + background: rgba(52, 68, 84, 0.1) \ No newline at end of file diff --git a/main.go b/main.go index dfa5fdcb8f4eb53bdf4039de2137813d01f08b38..e28d42ee3714ff30a83207f922a7e85601d803eb 100644 --- a/main.go +++ b/main.go @@ -112,7 +112,7 @@ func main() { panic(err) } - assets := http.FileServer(http.Dir("assets")) + http.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("assets")))) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { _, channel := path.Split(r.URL.Path) if strings.HasPrefix(channel, "#") { @@ -193,10 +193,6 @@ func main() { handleError(err) return } - } else { - w.Header().Set("Vary", "Accept-Encoding") - w.Header().Set("Cache-Control", "public, max-age=31536000") - assets.ServeHTTP(w, r) } }) diff --git a/templates/statistics.html b/templates/statistics.html index a4945aaeeb281b7b46104b6f58dcc52714acaf1b..ce1c33fead964c8a13b59358c75326babcd870d1 100644 --- a/templates/statistics.html +++ b/templates/statistics.html @@ -20,7 +20,6 @@ <meta name="apple-mobile-web-app-status-bar-style" content="#FFC107"> <link href="/assets/css/style.css" rel="stylesheet"> -<p>Total: {{.Lines}} Lines, {{.Words}} Words, {{printf "%.1f" .WordsPerLine}} Words per Line</p> <table> <thead> @@ -48,7 +47,7 @@ </tbody> </table> -<table> +<table class="small-followup"> <thead> <tr> <th>Big numbers</th>