From 08df67a48ef8e3ebe605bf866f5a9516fccf4aaa 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 Former-commit-id: 916036cffb778b05ff84d480a9da8efc009f10b2 [formerly 8de4733a98a66e0eb5a9ddd1d1a53386ff530e84] [formerly 5c61518b266a64e96e94849149474872a24140e6 [formerly 4a7a7e6cf40e46522d8c8da79c23f585eda01f68]] Former-commit-id: fd9c83b3a4cbbacb94e52880eb5239068793e1d3 [formerly ea245824e0def3fe308a6c6abe38cc4b60844849] Former-commit-id: 0072b82addcaa2b103cca604b34bda0913be6c43 --- _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: