about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2020-03-15 22:54:42 +0100
committerEmile <hanemile@protonmail.com>2020-03-15 22:54:42 +0100
commit873ea3b352402635599251bbf2f628fb8f907fa5 (patch)
treeb19875a6749b23b8190b9347a32aca6e3d54b2a9
parentd47da2bb3aa37a22f0da428f9b7a5580110902ee (diff)
corrected the static / asset fuckup
-rw-r--r--hosted/assets/css/theme.css (renamed from hosted/static/css/theme.css)0
-rw-r--r--hosted/tmpl/index.html2
-rw-r--r--src/http/http.go6
3 files changed, 4 insertions, 4 deletions
diff --git a/hosted/static/css/theme.css b/hosted/assets/css/theme.css
index 49beb12..49beb12 100644
--- a/hosted/static/css/theme.css
+++ b/hosted/assets/css/theme.css
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 @@
         <meta charset="utf-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
-        <link href="/static/css/theme.css" rel="stylesheet">
+        <link href="/assets/css/theme.css" rel="stylesheet">
     </head>
 
     <body onload='initFilter()'>
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")