summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2020-02-11 19:38:49 +0100
committerache <ache@ache.one>2020-02-11 19:38:49 +0100
commitfd455b04fd31a84cfd666b21f5814cd7d48c92d1 (patch)
tree742cba532e32cd1f669a614c010d9081aaa7aed4
parentUse template for xml (diff)
New paths
-rw-r--r--server.go12
-rw-r--r--src/dir.tmpl (renamed from dir.html)4
-rw-r--r--src/request.tmpl (renamed from xml.tmpl)0
-rw-r--r--static/ban.svg (renamed from test.svg)0
-rw-r--r--static/pink.svg (renamed from pink.svg)0
5 files changed, 8 insertions, 8 deletions
diff --git a/server.go b/server.go
index d00bd6e..1bc72d2 100644
--- a/server.go
+++ b/server.go
@@ -423,16 +423,16 @@ func main() {
"formatSize": normaliseSize,
"formatName": normaliseName,
}
- tmpl = template.Must(template.New("dir.html").Funcs(fmap).ParseFiles("dir.html"))
- tmplXML = template.Must(template.New("xml.tmpl").Funcs(fmap).ParseFiles("xml.tmpl"))
+ tmpl = template.Must(template.New("dir.tmpl").Funcs(fmap).ParseFiles("src/dir.tmpl"))
+ tmplXML = template.Must(template.New("request.tmpl").Funcs(fmap).ParseFiles("src/request.tmpl"))
baseWd,_ := os.Getwd();
- http.HandleFunc("/pink.svg", func(w http.ResponseWriter, r *http.Request) {
- http.ServeFile(w, r, baseWd + "/pink.svg")
+ http.HandleFunc("/pink_davy.svg", func(w http.ResponseWriter, r *http.Request) {
+ http.ServeFile(w, r, baseWd + "/static/pink.svg")
});
- http.HandleFunc("/test.svg", func(w http.ResponseWriter, r *http.Request) {
- http.ServeFile(w, r, baseWd + "/test.svg")
+ http.HandleFunc("/ban_davy.svg", func(w http.ResponseWriter, r *http.Request) {
+ http.ServeFile(w, r, baseWd + "/static/ban.svg")
})
if err := os.Chdir(dir) ; err != nil {
diff --git a/dir.html b/src/dir.tmpl
index 95bbdcf..9c864f7 100644
--- a/dir.html
+++ b/src/dir.tmpl
@@ -390,7 +390,7 @@ window.addEventListener('load', onPageLoad, false);
</script>
<style>
body {
- background: url(pink.svg);
+ background: url(/pink_davy.svg);
padding-left: 10%;
padding-right: 10%;
@@ -431,7 +431,7 @@ body {
.header {
padding: 15%;
margin-top: -17px;
- background: url(test.svg);
+ background: url(/ban_davy.svg);
background-size: contain;
background-repeat: no-repeat;
}
diff --git a/xml.tmpl b/src/request.tmpl
index 1b67212..1b67212 100644
--- a/xml.tmpl
+++ b/src/request.tmpl
diff --git a/test.svg b/static/ban.svg
index bd3655d..bd3655d 100644
--- a/test.svg
+++ b/static/ban.svg
diff --git a/pink.svg b/static/pink.svg
index 55f4952..55f4952 100644
--- a/pink.svg
+++ b/static/pink.svg