From 4a7a7e6cf40e46522d8c8da79c23f585eda01f68 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Mon, 26 Jun 2017 21:09:03 +0100 Subject: [PATCH] add logo and some design improvements --- _assets/css/styles.css | 28 +++------------------------- _assets/templates/base.tmpl | 29 +++++++++++++++++++++++------ http.go | 3 +++ 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/_assets/css/styles.css b/_assets/css/styles.css index e921b8c2..35bc825f 100644 --- a/_assets/css/styles.css +++ b/_assets/css/styles.css @@ -347,11 +347,6 @@ header a:hover { color: inherit; } -header p i { - font-size: 1em !important; - color: rgba(255, 255, 255, .31); -} - header>div { display: flex; width: 100%; @@ -359,17 +354,6 @@ header>div { align-items: center; } -header p { - display: inline-block; - margin: 0; - vertical-align: middle; -} - -header p a, -header p a:hover { - color: inherit; -} - header .action span { display: none; } @@ -432,11 +416,10 @@ main { height: 4em; } -#top-bar>div:nth-child(1) { +#top-bar svg { + height: 2.5em; margin-right: 1em; - font-weight: 500; - font-size: 1.5em; - line-height: 2; + vertical-align: middle; } @@ -575,9 +558,7 @@ main { * * * * * * * * * * * * * * * */ #bottom-bar { - background-color: #fafafa; border-top: 1px solid rgba(0, 0, 0, 0.075); - /* border-bottom: 1px solid rgba(0, 0, 0, 0.075); */ height: 3.8em; } @@ -1161,9 +1142,6 @@ footer a:hover { .mobile-only { display: inherit !important; } - #top-bar>div:nth-child(1) { - display: none; - } #bottom-bar>*:first-child { max-width: calc(100% - 16em) !important; } diff --git a/_assets/templates/base.tmpl b/_assets/templates/base.tmpl index fec41f43..3fe1a53e 100644 --- a/_assets/templates/base.tmpl +++ b/_assets/templates/base.tmpl @@ -12,12 +12,23 @@ {{- end -}} + + + + {{- if .IsDir }} @@ -30,7 +41,11 @@
-

File Manager

+ + + + +
-
- exit_to_app -
+
@@ -85,10 +98,14 @@
@@ -107,6 +124,6 @@ {{ template "templates" . }} - + diff --git a/http.go b/http.go index 69275577..542a705d 100644 --- a/http.go +++ b/http.go @@ -95,6 +95,9 @@ func (m *FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, er code, err = download(w, r, f) case !f.IsDir && r.URL.Query().Get("checksum") != "": code, err = checksum(w, r, f) + case r.URL.Query().Get("raw") == "true" && !f.IsDir: + http.ServeFile(w, r, f.Path) + code, err = 0, nil case f.IsDir: code, err = serveListing(w, r, m, u, f) default: