From 873ea3b352402635599251bbf2f628fb8f907fa5 Mon Sep 17 00:00:00 2001 From: Emile Date: Sun, 15 Mar 2020 22:54:42 +0100 Subject: corrected the static / asset fuckup --- hosted/assets/css/theme.css | 165 ++++++++++++++++++++++++++++++++++++++++++++ hosted/static/css/theme.css | 165 -------------------------------------------- hosted/tmpl/index.html | 2 +- src/http/http.go | 6 +- 4 files changed, 169 insertions(+), 169 deletions(-) create mode 100644 hosted/assets/css/theme.css delete mode 100644 hosted/static/css/theme.css diff --git a/hosted/assets/css/theme.css b/hosted/assets/css/theme.css new file mode 100644 index 0000000..49beb12 --- /dev/null +++ b/hosted/assets/css/theme.css @@ -0,0 +1,165 @@ +* { padding: 0; margin: 0; } +body { + font-family: sans-serif; + text-rendering: optimizespeed; + background-color: #ffffff; +} +a { + color: #006ed3; + text-decoration: none; +} +a:hover, +h1 a:hover { + color: #319cff; +} +header, +#summary { + padding-left: 5%; + padding-right: 5%; +} +th:first-child, +td:first-child { + width: 5%; +} +th:last-child, +td:last-child { + width: 5%; +} +header { + padding-top: 25px; + padding-bottom: 15px; + background-color: #f2f2f2; +} +h1 { + font-size: 20px; + font-weight: normal; + white-space: nowrap; + overflow-x: hidden; + text-overflow: ellipsis; + color: #999; +} +h1 a { + color: #000; + margin: 0 4px; +} +h1 a:hover { + text-decoration: underline; +} +h1 a:first-child { + margin: 0; +} +main { + display: block; +} +.meta { + font-family: Verdana, sans-serif; + border-bottom: 1px solid #9C9C9C; + padding-top: 10px; + padding-bottom: 10px; +} +.meta-item { + margin-right: 1em; +} +#filter { + float: right; + /* padding: 4px; */ + border: 1px solid #CCC; +} +table { + width: 100%; + border-collapse: collapse; +} +tr { + border-bottom: 1px dashed #dadada; +} +tbody tr:hover { + background-color: #ffffec; +} +th, +td { + text-align: left; + padding: 10px 0; +} +th { + padding-top: 15px; + padding-bottom: 15px; + font-size: 16px; + white-space: nowrap; +} +th a { + color: black; +} +th svg { + vertical-align: middle; +} +td { + white-space: nowrap; + font-size: 14px; +} +td:nth-child(2) { + width: 80%; +} +td:nth-child(3) { + padding: 0 20px 0 20px; +} +th:nth-child(4), +td:nth-child(4) { + text-align: right; +} +td:nth-child(2) svg { + position: absolute; +} +td .name, +td .goup { + margin-left: 1.75em; + word-break: break-all; + overflow-wrap: break-word; + white-space: pre-wrap; +} +.icon { + margin-right: 5px; +} +.icon.sort { + display: inline-block; + width: 1em; + height: 1em; + position: relative; + top: .2em; +} +.icon.sort .top { + position: absolute; + left: 0; + top: -1px; +} +.icon.sort .bottom { + position: absolute; + bottom: -1px; + left: 0; +} +footer { + padding: 40px 20px; + font-size: 12px; + text-align: center; +} +@media (max-width: 600px) { + .hideable { + display: none; + } + td:nth-child(2) { + width: auto; + } + th:nth-child(3), + td:nth-child(3) { + padding-right: 5%; + text-align: right; + } + h1 { + color: #000; + } + h1 a { + margin: 0; + } + #filter { + max-width: 100px; + } +} \ No newline at end of file diff --git a/hosted/static/css/theme.css b/hosted/static/css/theme.css deleted file mode 100644 index 49beb12..0000000 --- a/hosted/static/css/theme.css +++ /dev/null @@ -1,165 +0,0 @@ -* { padding: 0; margin: 0; } -body { - font-family: sans-serif; - text-rendering: optimizespeed; - background-color: #ffffff; -} -a { - color: #006ed3; - text-decoration: none; -} -a:hover, -h1 a:hover { - color: #319cff; -} -header, -#summary { - padding-left: 5%; - padding-right: 5%; -} -th:first-child, -td:first-child { - width: 5%; -} -th:last-child, -td:last-child { - width: 5%; -} -header { - padding-top: 25px; - padding-bottom: 15px; - background-color: #f2f2f2; -} -h1 { - font-size: 20px; - font-weight: normal; - white-space: nowrap; - overflow-x: hidden; - text-overflow: ellipsis; - color: #999; -} -h1 a { - color: #000; - margin: 0 4px; -} -h1 a:hover { - text-decoration: underline; -} -h1 a:first-child { - margin: 0; -} -main { - display: block; -} -.meta { - font-family: Verdana, sans-serif; - border-bottom: 1px solid #9C9C9C; - padding-top: 10px; - padding-bottom: 10px; -} -.meta-item { - margin-right: 1em; -} -#filter { - float: right; - /* padding: 4px; */ - border: 1px solid #CCC; -} -table { - width: 100%; - border-collapse: collapse; -} -tr { - border-bottom: 1px dashed #dadada; -} -tbody tr:hover { - background-color: #ffffec; -} -th, -td { - text-align: left; - padding: 10px 0; -} -th { - padding-top: 15px; - padding-bottom: 15px; - font-size: 16px; - white-space: nowrap; -} -th a { - color: black; -} -th svg { - vertical-align: middle; -} -td { - white-space: nowrap; - font-size: 14px; -} -td:nth-child(2) { - width: 80%; -} -td:nth-child(3) { - padding: 0 20px 0 20px; -} -th:nth-child(4), -td:nth-child(4) { - text-align: right; -} -td:nth-child(2) svg { - position: absolute; -} -td .name, -td .goup { - margin-left: 1.75em; - word-break: break-all; - overflow-wrap: break-word; - white-space: pre-wrap; -} -.icon { - margin-right: 5px; -} -.icon.sort { - display: inline-block; - width: 1em; - height: 1em; - position: relative; - top: .2em; -} -.icon.sort .top { - position: absolute; - left: 0; - top: -1px; -} -.icon.sort .bottom { - position: absolute; - bottom: -1px; - left: 0; -} -footer { - padding: 40px 20px; - font-size: 12px; - text-align: center; -} -@media (max-width: 600px) { - .hideable { - display: none; - } - td:nth-child(2) { - width: auto; - } - th:nth-child(3), - td:nth-child(3) { - padding-right: 5%; - text-align: right; - } - h1 { - color: #000; - } - h1 a { - margin: 0; - } - #filter { - max-width: 100px; - } -} \ No newline at end of file diff --git a/hosted/tmpl/index.html b/hosted/tmpl/index.html index 2cfa2c8..a1bbb26 100644 --- a/hosted/tmpl/index.html +++ b/hosted/tmpl/index.html @@ -7,7 +7,7 @@ - + diff --git a/src/http/http.go b/src/http/http.go index 1ab3afb..195a0f6 100644 --- a/src/http/http.go +++ b/src/http/http.go @@ -18,9 +18,9 @@ func Server() { r := mux.NewRouter() // static js / css hosting - static := r.PathPrefix("/static/").Subrouter() - fs := http.FileServer(http.Dir("./hosted/static")) - static.PathPrefix("/").Handler(http.StripPrefix("/static/", fs)) + assets := r.PathPrefix("/assets/").Subrouter() + fs := http.FileServer(http.Dir("./hosted/assets")) + assets.PathPrefix("/").Handler(http.StripPrefix("/assets/", fs)) r.HandleFunc("/download", downloadHandler).Methods("GET") -- cgit 1.4.1