add logo and some design improvements
This commit is contained in:
parent
ad0368b745
commit
4a7a7e6cf4
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -12,12 +12,23 @@
|
|||
<style>{{ CSS .User.StyleSheet }}</style>
|
||||
{{- end -}}
|
||||
|
||||
<script>
|
||||
var data = {
|
||||
user: JSON.parse('{{ Marshal .User }}'),
|
||||
webdavURL: "{{ .WebDavURL }}",
|
||||
baseURL: "{{.BaseURL}}",
|
||||
prefixURL:"{{ .PrefixURL }}"
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- TODO: remove this one after moving the JS to ^^ -->
|
||||
<script>
|
||||
var user = JSON.parse('{{ Marshal .User }}'),
|
||||
webdavURL = "{{ .WebDavURL }}",
|
||||
baseURL = "{{.BaseURL}}",
|
||||
prefixURL = "{{ .PrefixURL }}";
|
||||
</script>
|
||||
|
||||
<script src="{{ .BaseURL }}/_internal/js/common.js" defer></script>
|
||||
{{- if .IsDir }}
|
||||
<script src="{{ .BaseURL }}/_internal/js/listing.js" defer></script>
|
||||
|
@ -30,7 +41,11 @@
|
|||
<body>
|
||||
<header>
|
||||
<div id="top-bar">
|
||||
<div><p>File Manager</p></div>
|
||||
<svg id="content" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 144 144">
|
||||
<circle cx="72" cy="72" r="72" fill="#2979ff"/>
|
||||
<circle cx="72" cy="72" r="48" fill="#40c4ff"/>
|
||||
<circle cx="72" cy="72" r="24" fill="#fff"/>
|
||||
</svg>
|
||||
<div id="search">
|
||||
<i class="material-icons" title="Search">search</i>
|
||||
<input type="text" aria-label="Write here to search" placeholder="Search or execute a command...">
|
||||
|
@ -40,9 +55,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="action" id="logout" tabindex="0" role="button" aria-label="Log out">
|
||||
<i class="material-icons" title="Logout">exit_to_app</i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="bottom-bar">
|
||||
|
@ -85,10 +98,14 @@
|
|||
</div>
|
||||
|
||||
<nav id="sidebar">
|
||||
<a class="action" href="{{ .BaseURL }}">
|
||||
<a class="action" href="{{ .BaseURL }}/">
|
||||
<i class="material-icons">folder</i>
|
||||
<span>My Files</span>
|
||||
</a>
|
||||
<div class="action" id="logout" tabindex="0" role="button" aria-label="Log out">
|
||||
<i class="material-icons" title="Logout">exit_to_app</i>
|
||||
<span>Logout</span>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
|
@ -107,6 +124,6 @@
|
|||
|
||||
{{ template "templates" . }}
|
||||
|
||||
<footer>Served with <a rel="noopener noreferrer" href="https://caddyserver.com">Caddy</a> and <a rel="noopener noreferrer" href="https://github.com/hacdias/caddy-filemanager">File Manager</a>.</footer>
|
||||
<footer>Served with <a rel="noopener noreferrer" href="https://github.com/hacdias/caddy-filemanager">File Manager</a>.</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
3
http.go
3
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:
|
||||
|
|
Loading…
Reference in New Issue