Swap to icon grid instead of individual icons
saves like 3kb :p
This commit is contained in:
+13
-9
@@ -8,12 +8,16 @@
|
||||
<link rel="icon" href="/private/favicon.png?v={{ .Version }}">
|
||||
<title>Browser: {{ .Path }}</title>
|
||||
<style>
|
||||
a.entry[data-type="directory"] div.icon {
|
||||
background-image: url("/private/icon_folder.png?v={{ .Version }}");
|
||||
div.pattern {
|
||||
background-image: url("/private/bg_pattern.png?v={{ .Version }}");
|
||||
}
|
||||
|
||||
a.entry[data-type="directory"]:hover div.icon {
|
||||
background-image: url("/private/icon_folder_open.png?v={{ .Version }}");
|
||||
div.graphic {
|
||||
background-image: url("/private/bg_graphic.png?v={{ .Version }}");
|
||||
}
|
||||
|
||||
a.entry div.icon {
|
||||
background-image: url("/private/icon_grid.png?v={{ .Version }}");
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -45,20 +49,20 @@
|
||||
|
||||
{{ if .Parent }}
|
||||
<a class="entry" data-type="directory" data-ignore="true" href="{{ .Parent }}">
|
||||
<div class="icon"></div>
|
||||
<div class="icon icon-directory"></div>
|
||||
<span class="filename">../</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ range .Item }}
|
||||
{{ if .IsDir }}
|
||||
<a class="entry" data-type="directory" href="{{ EncodeURI .Name }}/" title="{{ .Name }} Modified: {{ .ModTime.Format "2006-01-02 15:04" }}">
|
||||
<div class="icon"></div>
|
||||
<a class="entry" data-type="directory" href="{{ EncodeURI .Name }}/" title="{{ .Name }} Modified: {{ .ModTime.Format " 2006-01-02 15:04" }}">
|
||||
<div class="icon icon-directory"></div>
|
||||
<span class="filename">{{ .Name }}</span>
|
||||
</a>
|
||||
{{ else }}
|
||||
<a class="entry" data-type="file" href="{{ EncodeURI .Name }}" title="Name: {{ .Name }} Size: {{ GetEntrySizeHuman .Size }} Modified: {{ .ModTime.Format "2006-01-02 15:04" }}">
|
||||
<img class="icon" src="/private/{{ GetEntryIcon .Name .IsDir }}?v={{ $.Version }}">
|
||||
<a class="entry" data-type="file" href="{{ EncodeURI .Name }}" title="Name: {{ .Name }} Size: {{ GetEntrySizeHuman .Size }} Modified: {{ .ModTime.Format " 2006-01-02 15:04" }}">
|
||||
<div class="icon {{ GetEntryIcon .Name .IsDir }}"></div>
|
||||
<span class="filename">{{ .Name }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user