mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 19:22:57 +00:00
updates on #18
This commit is contained in:
parent
c29d066842
commit
aa7d4f69ef
@ -1,3 +1,4 @@
|
|||||||
|
a
|
||||||
/* NORMALIZE CSS */
|
/* NORMALIZE CSS */
|
||||||
|
|
||||||
html {
|
html {
|
||||||
@ -673,6 +674,50 @@ header .only-side {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header #prev:hover + .prev-links,
|
||||||
|
header .prev-links:hover {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#prev {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
header .prev-links {
|
||||||
|
position: absolute;
|
||||||
|
color: #7d7d7d;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background: #fff;
|
||||||
|
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
||||||
|
border-radius: .2em;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
left: 1.5em;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
header .prev-links a {
|
||||||
|
padding: .5em;
|
||||||
|
border-bottom: 1px solid #f5f5f5;
|
||||||
|
transition: .2s ease all;
|
||||||
|
}
|
||||||
|
|
||||||
|
header .prev-links a:first-child {
|
||||||
|
border: 0;
|
||||||
|
border-bottom-right-radius: .5em;
|
||||||
|
border-bottom-left-radius: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
header .prev-links a:last-child {
|
||||||
|
border-top-right-radius: .5em;
|
||||||
|
border-top-left-radius: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
header .prev-links a:hover {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
.action {
|
.action {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 0.2em;
|
margin: 0 0.2em;
|
||||||
@ -1117,4 +1162,4 @@ i.spin {
|
|||||||
column-count: 1;
|
column-count: 1;
|
||||||
column-gap: 0;
|
column-gap: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,26 +17,33 @@
|
|||||||
<header>
|
<header>
|
||||||
<div>
|
<div>
|
||||||
{{ $lnk := .PreviousLink }}
|
{{ $lnk := .PreviousLink }}
|
||||||
{{ if ne $lnk ""}}
|
|
||||||
<a href="{{ $lnk }}">
|
|
||||||
{{ end }}
|
|
||||||
<div class="action{{ if eq $lnk ""}} disabled{{ end }}" id="prev">
|
<div class="action{{ if eq $lnk ""}} disabled{{ end }}" id="prev">
|
||||||
|
{{ if ne $lnk ""}}
|
||||||
|
<a href="{{ $lnk }}">
|
||||||
|
{{ end }}
|
||||||
<i class="material-icons" title="Previous">subdirectory_arrow_left</i>
|
<i class="material-icons" title="Previous">subdirectory_arrow_left</i>
|
||||||
</div>
|
{{ if ne $lnk ""}}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ if ne $lnk ""}}
|
{{ if ne $lnk ""}}
|
||||||
</a>
|
<ul class="prev-links">
|
||||||
{{ end }}
|
{{ range $link, $name := .BreadcrumbMap }}
|
||||||
|
<a href="{{ $link }}"><li>{{ $name }}</li></a>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<div class="action" id="open-nav">
|
<div class="action" id="open-nav">
|
||||||
<i class="material-icons" title="Menu">menu</i>
|
<i class="material-icons" title="Menu">menu</i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ if eq .Config.AbsoluteURL "" }}/{{ else }}{{ .Config.AbsoluteURL }}{{ end }}">
|
|
||||||
{{ if .Config.HugoEnabled }}Hugo{{ else }}File Manager{{ end }}
|
|
||||||
</a>
|
|
||||||
{{ if ne .Name "/"}}
|
{{ if ne .Name "/"}}
|
||||||
<i class="material-icons">chevron_right</i>{{ .Name }}
|
{{ .Name }}
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
@ -50,6 +57,7 @@
|
|||||||
<div class="action{{ if eq $lnk ""}} disabled{{ end }}" id="prev">
|
<div class="action{{ if eq $lnk ""}} disabled{{ end }}" id="prev">
|
||||||
<i class="material-icons" title="Previous">subdirectory_arrow_left</i>
|
<i class="material-icons" title="Previous">subdirectory_arrow_left</i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if ne $lnk ""}}
|
{{ if ne $lnk ""}}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -46,6 +46,10 @@ func (i Info) BreadcrumbMap() map[string]string {
|
|||||||
|
|
||||||
parts := strings.Split(lpath, "/")
|
parts := strings.Split(lpath, "/")
|
||||||
for i, part := range parts {
|
for i, part := range parts {
|
||||||
|
if i == len(parts)-1 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if i == 0 && part == "" {
|
if i == 0 && part == "" {
|
||||||
// Leading slash (root)
|
// Leading slash (root)
|
||||||
result["/"] = "/"
|
result["/"] = "/"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user