├── .gitignore
├── browse.tpl
├── css
└── main.css
├── license
├── readme.md
└── screenshot.png
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/browse.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Listing /
6 |
7 |
8 |
9 |
10 | Directory listing
11 |
12 | {{if .CanGoUp}}
13 |
14 | ‹
15 | //{{$.Host}}{{.Path}}
16 |
17 | {{end}}
18 |
19 | Items
20 |
21 | {{range .Items}}
22 | {{if .IsDir}}
23 |
24 | {{if gt $.NumFiles 0}}
25 |
26 |
27 | |
28 | {{end}}
29 |
30 | //{{$.Host}}/{{.Name}}
31 | |
32 |
33 | {{end}}
34 | {{end}}
35 | {{range .Items}}
36 | {{if not .IsDir}}
37 |
38 |
39 |
40 | |
41 |
42 | //{{$.Host}}/{{.Name}}
43 | |
44 |
45 | {{end}}
46 | {{end}}
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/css/main.css:
--------------------------------------------------------------------------------
1 | body
2 | {
3 | background-color: #ffffff;
4 | text-decoration: none;
5 | font: 13px "Lucida Grande", Lucida, Verdana, sans-serif;
6 | padding-left: 20px;
7 | padding-top: 10px;
8 | }
9 |
10 | h1 {
11 | color: #484848;
12 | font-weight: normal;
13 | font-style: normal;
14 | font-size: 20px;
15 | display: none;
16 | }
17 |
18 | pre.filename {
19 | padding: 2px 10px 2px 4px;
20 | }
21 | pre.filename:hover{
22 | background-color:#efefef;
23 | color:#333;
24 | }
25 |
26 |
27 | #back-arrow {
28 | font: italic 15px "Lucida Grande", Lucida, Verdana, sans-serif;
29 | padding-right: 2px;
30 | }
31 | p.location {
32 | color: #737373;
33 | margin-bottom: 15px;
34 | margin-top: 0;
35 | font-size: 11px;
36 | }
37 |
38 | td.tsize, td.tfile {
39 | line-height: 25px;
40 | }
41 | td.tsize {
42 | margin: 0;
43 | padding-right: 0;
44 | }
45 |
46 | td.tfile {
47 | padding-left: 0;
48 | }
49 |
50 | div.filesize {
51 | -moz-user-select: none;
52 | -khtml-user-select: none;
53 | user-select: none;
54 | font-size: 12px;
55 | color: #6b6b6b;
56 | min-width: 70px;
57 | }
58 |
59 | pre.filename, div.filesize {
60 | margin: 0;
61 | font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
62 | line-height: 21px;
63 | }
64 |
65 | caption.title, caption.titled {
66 | text-align: left;
67 | font-weight: bold;
68 | background-color: #e2e8e8;
69 | }
70 |
71 | /* Row alt colors */
72 | pre.filename:nth-child(odd), {
73 | background-color: #eff3f3;
74 | }
75 | pre.filename:nth-child(even), div.filesizealt:nth-child(even) {
76 | background-color: #eaefef;
77 | }
78 |
79 | /* Row hover */
80 | pre.filename:nth-child(odd):hover {
81 | background-color: #dfe6e6;
82 | }
83 |
84 | pre.filename:nth-child(even):hover{
85 | background-color: #e1e7e7;
86 | }
87 |
88 | div.filesizealt {
89 | margin: 0;
90 | padding-top: 2px;
91 | padding-bottom: 2px;
92 | padding-left: 10px;
93 | }
94 |
95 | /* Row titles */
96 | table {
97 | border-spacing: 0;
98 | color: #414141;
99 | margin-bottom: 11px;
100 | background-color: #eff3f3;
101 | padding: 4px 0 3px;
102 | }
103 |
104 | caption.title {
105 | padding: 7px 7px 7px 9px;
106 | font-size: 17px;
107 | font-weight: normal;
108 | font-style: normal;
109 | }
110 |
111 | /* unvisited link */
112 | a:link {
113 | color: #545352;
114 | text-decoration: none;
115 | }
116 |
117 | /* visited link */
118 | a:visited {
119 | color: #787b7b;
120 | }
121 |
122 |
123 | /* selected link */
124 | a:active {
125 | color: #767878;
126 | }
127 |
--------------------------------------------------------------------------------
/license:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | Copyright (c) 2016 Adriel Kloppenburg
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 |
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # Caddy minimal browse template
2 |
3 | Clean and to the point browse template
4 |
5 | ### screenshot
6 |
7 | 
8 |
9 | ## todo
10 | - Update the UI
11 | - Clean up the code
12 |
13 | Note: I wrote the HTML/CSS years ago and have only ported it over to Caddy, will clean up the code and interface soon.
14 |
--------------------------------------------------------------------------------
/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adriel/Caddy-Server-minimal-browse-template/5c4ffcd751428bf166064bc2fe0f5bfe1c3f2cbe/screenshot.png
--------------------------------------------------------------------------------