Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 11, 01:00 UTC
| 1 | {{ $nonce := uuidv4 -}} |
| 2 | {{ $nonceAttribute := print "nonce=" (quote $nonce) -}} |
| 3 | {{ $csp := printf "default-src 'none'; img-src 'self'; object-src 'none'; base-uri 'none'; script-src 'nonce-%s'; style-src 'nonce-%s'; frame-ancestors 'self'; form-action 'self';" $nonce $nonce -}} |
| 4 | {{/* To disable the Content-Security-Policy, set this to false */}}{{ $enableCsp := true -}} |
| 5 | {{ if $enableCsp -}} |
| 6 | {{- .RespHeader.Set "Content-Security-Policy" $csp -}} |
| 7 | {{ end -}} |
| 8 | {{- define "icon"}} |
| 9 | {{- if .IsDir}} |
| 10 | {{- if .IsSymlink}} |
| 11 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-folder-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 12 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 13 | <path d="M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z" stroke-width="0" fill="currentColor"/> |
| 14 | <path fill="#000" d="M2.795 17.306c0-2.374 1.792-4.314 4.078-4.538v-1.104a.38.38 0 0 1 .651-.272l2.45 2.492a.132.132 0 0 1 0 .188l-2.45 2.492a.381.381 0 0 1-.651-.272V15.24c-1.889.297-3.436 1.39-3.817 3.26a2.809 2.809 0 0 1-.261-1.193Z" stroke-width=".127478"/> |
| 15 | </svg> |
| 16 | {{- else}} |
| 17 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-folder-filled" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 18 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 19 | <path d="M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z" stroke-width="0" fill="currentColor"/> |
| 20 | </svg> |
| 21 | {{- end}} |
| 22 | {{- else if or (eq .Name "LICENSE") (eq .Name "README")}} |
| 23 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-license" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 24 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 25 | <path d="M15 21h-9a3 3 0 0 1 -3 -3v-1h10v2a2 2 0 0 0 4 0v-14a2 2 0 1 1 2 2h-2m2 -4h-11a3 3 0 0 0 -3 3v11"/> |
| 26 | <path d="M9 7l4 0"/> |
| 27 | <path d="M9 11l4 0"/> |
| 28 | </svg> |
| 29 | {{- else if .HasExt ".jpg" ".jpeg" ".png" ".gif" ".webp" ".tiff" ".bmp" ".heif" ".heic" ".svg" ".avif"}} |
| 30 | {{- if eq .Tpl.Layout "grid"}} |
| 31 | <img loading="lazy" src="{{.Name | pathEscape}}"> |
| 32 | {{- else}} |
| 33 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-photo" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 34 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 35 | <path d="M15 8h.01"/> |
| 36 | <path d="M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z"/> |
| 37 | <path d="M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5"/> |
| 38 | <path d="M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3"/> |
| 39 | </svg> |
| 40 | {{- end}} |
| 41 | {{- else if .HasExt ".mp4" ".mov" ".m4v" ".mpeg" ".mpg" ".avi" ".ogg" ".webm" ".mkv" ".vob" ".gifv" ".3gp"}} |
| 42 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-movie" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 43 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 44 | <path d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"/> |
| 45 | <path d="M8 4l0 16"/> |
| 46 | <path d="M16 4l0 16"/> |
| 47 | <path d="M4 8l4 0"/> |
| 48 | <path d="M4 16l4 0"/> |
| 49 | <path d="M4 12l16 0"/> |
| 50 | <path d="M16 8l4 0"/> |
| 51 | <path d="M16 16l4 0"/> |
| 52 | </svg> |
| 53 | {{- else if .HasExt ".mp3" ".m4a" ".aac" ".ogg" ".flac" ".wav" ".wma" ".midi" ".cda"}} |
| 54 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-music" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 55 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 56 | <path d="M6 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"/> |
| 57 | <path d="M16 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"/> |
| 58 | <path d="M9 17l0 -13l10 0l0 13"/> |
| 59 | <path d="M9 8l10 0"/> |
| 60 | </svg> |
| 61 | {{- else if .HasExt ".pdf"}} |
| 62 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-pdf" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 63 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 64 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 65 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"/> |
| 66 | <path d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"/> |
| 67 | <path d="M17 18h2"/> |
| 68 | <path d="M20 15h-3v6"/> |
| 69 | <path d="M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1z"/> |
| 70 | </svg> |
| 71 | {{- else if .HasExt ".csv" ".tsv"}} |
| 72 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-csv" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 73 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 74 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 75 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"/> |
| 76 | <path d="M7 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0"/> |
| 77 | <path d="M10 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> |
| 78 | <path d="M16 15l2 6l2 -6"/> |
| 79 | </svg> |
| 80 | {{- else if .HasExt ".txt" ".doc" ".docx" ".odt" ".fodt" ".rtf"}} |
| 81 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-text" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 82 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 83 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 84 | <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/> |
| 85 | <path d="M9 9l1 0"/> |
| 86 | <path d="M9 13l6 0"/> |
| 87 | <path d="M9 17l6 0"/> |
| 88 | </svg> |
| 89 | {{- else if .HasExt ".xls" ".xlsx" ".ods" ".fods"}} |
| 90 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-spreadsheet" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 91 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 92 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 93 | <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/> |
| 94 | <path d="M8 11h8v7h-8z"/> |
| 95 | <path d="M8 15h8"/> |
| 96 | <path d="M11 11v7"/> |
| 97 | </svg> |
| 98 | {{- else if .HasExt ".ppt" ".pptx" ".odp" ".fodp"}} |
| 99 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-presentation-analytics" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 100 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 101 | <path d="M9 12v-4"/> |
| 102 | <path d="M15 12v-2"/> |
| 103 | <path d="M12 12v-1"/> |
| 104 | <path d="M3 4h18"/> |
| 105 | <path d="M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10"/> |
| 106 | <path d="M12 16v4"/> |
| 107 | <path d="M9 20h6"/> |
| 108 | </svg> |
| 109 | {{- else if .HasExt ".zip" ".gz" ".xz" ".tar" ".7z" ".rar" ".xz" ".zst"}} |
| 110 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-zip" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 111 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 112 | <path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"/> |
| 113 | <path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"/> |
| 114 | <path d="M11 5l-1 0"/> |
| 115 | <path d="M13 7l-1 0"/> |
| 116 | <path d="M11 9l-1 0"/> |
| 117 | <path d="M13 11l-1 0"/> |
| 118 | <path d="M11 13l-1 0"/> |
| 119 | <path d="M13 15l-1 0"/> |
| 120 | </svg> |
| 121 | {{- else if .HasExt ".deb" ".dpkg"}} |
| 122 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-debian" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 123 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 124 | <path d="M12 17c-2.397 -.943 -4 -3.153 -4 -5.635c0 -2.19 1.039 -3.14 1.604 -3.595c2.646 -2.133 6.396 -.27 6.396 3.23c0 2.5 -2.905 2.121 -3.5 1.5c-.595 -.621 -1 -1.5 -.5 -2.5"/> |
| 125 | <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/> |
| 126 | </svg> |
| 127 | {{- else if .HasExt ".rpm" ".exe" ".flatpak" ".appimage" ".jar" ".msi" ".apk"}} |
| 128 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-package" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 129 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 130 | <path d="M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5"/> |
| 131 | <path d="M12 12l8 -4.5"/> |
| 132 | <path d="M12 12l0 9"/> |
| 133 | <path d="M12 12l-8 -4.5"/> |
| 134 | <path d="M16 5.25l-8 4.5"/> |
| 135 | </svg> |
| 136 | {{- else if .HasExt ".ps1"}} |
| 137 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-powershell" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 138 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 139 | <path d="M4.887 20h11.868c.893 0 1.664 -.665 1.847 -1.592l2.358 -12c.212 -1.081 -.442 -2.14 -1.462 -2.366a1.784 1.784 0 0 0 -.385 -.042h-11.868c-.893 0 -1.664 .665 -1.847 1.592l-2.358 12c-.212 1.081 .442 2.14 1.462 2.366c.127 .028 .256 .042 .385 .042z"/> |
| 140 | <path d="M9 8l4 4l-6 4"/> |
| 141 | <path d="M12 16h3"/> |
| 142 | </svg> |
| 143 | {{- else if .HasExt ".py" ".pyc" ".pyo"}} |
| 144 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-python" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 145 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 146 | <path d="M12 9h-7a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h3"/> |
| 147 | <path d="M12 15h7a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-3"/> |
| 148 | <path d="M8 9v-4a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v5a2 2 0 0 1 -2 2h-4a2 2 0 0 0 -2 2v5a2 2 0 0 0 2 2h4a2 2 0 0 0 2 -2v-4"/> |
| 149 | <path d="M11 6l0 .01"/> |
| 150 | <path d="M13 18l0 .01"/> |
| 151 | </svg> |
| 152 | {{- else if .HasExt ".bash" ".sh" ".com" ".bat" ".dll" ".so"}} |
| 153 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-script" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 154 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 155 | <path d="M17 20h-11a3 3 0 0 1 0 -6h11a3 3 0 0 0 0 6h1a3 3 0 0 0 3 -3v-11a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v8"/> |
| 156 | </svg> |
| 157 | {{- else if .HasExt ".dmg"}} |
| 158 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-finder" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 159 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 160 | <path d="M3 4m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1z"/> |
| 161 | <path d="M7 8v1"/> |
| 162 | <path d="M17 8v1"/> |
| 163 | <path d="M12.5 4c-.654 1.486 -1.26 3.443 -1.5 9h2.5c-.19 2.867 .094 5.024 .5 7"/> |
| 164 | <path d="M7 15.5c3.667 2 6.333 2 10 0"/> |
| 165 | </svg> |
| 166 | {{- else if .HasExt ".iso" ".img"}} |
| 167 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-disc" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 168 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 169 | <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/> |
| 170 | <path d="M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"/> |
| 171 | <path d="M7 12a5 5 0 0 1 5 -5"/> |
| 172 | <path d="M12 17a5 5 0 0 0 5 -5"/> |
| 173 | </svg> |
| 174 | {{- else if .HasExt ".md" ".mdown" ".markdown"}} |
| 175 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-markdown" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 176 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 177 | <path d="M3 5m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z"/> |
| 178 | <path d="M7 15v-6l2 2l2 -2v6"/> |
| 179 | <path d="M14 13l2 2l2 -2m-2 2v-6"/> |
| 180 | </svg> |
| 181 | {{- else if .HasExt ".ttf" ".otf" ".woff" ".woff2" ".eof"}} |
| 182 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-typography" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 183 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 184 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 185 | <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/> |
| 186 | <path d="M11 18h2"/> |
| 187 | <path d="M12 18v-7"/> |
| 188 | <path d="M9 12v-1h6v1"/> |
| 189 | </svg> |
| 190 | {{- else if .HasExt ".go"}} |
| 191 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-golang" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 192 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 193 | <path d="M15.695 14.305c1.061 1.06 2.953 .888 4.226 -.384c1.272 -1.273 1.444 -3.165 .384 -4.226c-1.061 -1.06 -2.953 -.888 -4.226 .384c-1.272 1.273 -1.444 3.165 -.384 4.226z"/> |
| 194 | <path d="M12.68 9.233c-1.084 -.497 -2.545 -.191 -3.591 .846c-1.284 1.273 -1.457 3.165 -.388 4.226c1.07 1.06 2.978 .888 4.261 -.384a3.669 3.669 0 0 0 1.038 -1.921h-2.427"/> |
| 195 | <path d="M5.5 15h-1.5"/> |
| 196 | <path d="M6 9h-2"/> |
| 197 | <path d="M5 12h-3"/> |
| 198 | </svg> |
| 199 | {{- else if .HasExt ".html" ".htm"}} |
| 200 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-html" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 201 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 202 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 203 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"/> |
| 204 | <path d="M2 21v-6"/> |
| 205 | <path d="M5 15v6"/> |
| 206 | <path d="M2 18h3"/> |
| 207 | <path d="M20 15v6h2"/> |
| 208 | <path d="M13 21v-6l2 3l2 -3v6"/> |
| 209 | <path d="M7.5 15h3"/> |
| 210 | <path d="M9 15v6"/> |
| 211 | </svg> |
| 212 | {{- else if .HasExt ".js"}} |
| 213 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-js" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 214 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 215 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 216 | <path d="M3 15h3v4.5a1.5 1.5 0 0 1 -3 0"/> |
| 217 | <path d="M9 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> |
| 218 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"/> |
| 219 | </svg> |
| 220 | {{- else if .HasExt ".css"}} |
| 221 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-css" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 222 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 223 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 224 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"/> |
| 225 | <path d="M8 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0"/> |
| 226 | <path d="M11 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> |
| 227 | <path d="M17 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> |
| 228 | </svg> |
| 229 | {{- else if .HasExt ".json" ".json5" ".jsonc"}} |
| 230 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-json" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 231 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 232 | <path d="M20 16v-8l3 8v-8"/> |
| 233 | <path d="M15 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"/> |
| 234 | <path d="M1 8h3v6.5a1.5 1.5 0 0 1 -3 0v-.5"/> |
| 235 | <path d="M7 15a1 1 0 0 0 1 1h1a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h1a1 1 0 0 1 1 1"/> |
| 236 | </svg> |
| 237 | {{- else if .HasExt ".ts"}} |
| 238 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-ts" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 239 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 240 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 241 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"/> |
| 242 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 243 | <path d="M9 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> |
| 244 | <path d="M3.5 15h3"/> |
| 245 | <path d="M5 15v6"/> |
| 246 | </svg> |
| 247 | {{- else if .HasExt ".sql"}} |
| 248 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-type-sql" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 249 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 250 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 251 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 252 | <path d="M5 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"/> |
| 253 | <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"/> |
| 254 | <path d="M18 15v6h2"/> |
| 255 | <path d="M13 15a2 2 0 0 1 2 2v2a2 2 0 1 1 -4 0v-2a2 2 0 0 1 2 -2z"/> |
| 256 | <path d="M14 20l1.5 1.5"/> |
| 257 | </svg> |
| 258 | {{- else if .HasExt ".db" ".sqlite" ".bak" ".mdb"}} |
| 259 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-database" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 260 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 261 | <path d="M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0"/> |
| 262 | <path d="M4 6v6a8 3 0 0 0 16 0v-6"/> |
| 263 | <path d="M4 12v6a8 3 0 0 0 16 0v-6"/> |
| 264 | </svg> |
| 265 | {{- else if .HasExt ".eml" ".email" ".mailbox" ".mbox" ".msg"}} |
| 266 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-mail" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 267 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 268 | <path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"/> |
| 269 | <path d="M3 7l9 6l9 -6"/> |
| 270 | </svg> |
| 271 | {{- else if .HasExt ".crt" ".pem" ".x509" ".cer" ".ca-bundle"}} |
| 272 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-certificate" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 273 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 274 | <path d="M15 15m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"/> |
| 275 | <path d="M13 17.5v4.5l2 -1.5l2 1.5v-4.5"/> |
| 276 | <path d="M10 19h-5a2 2 0 0 1 -2 -2v-10c0 -1.1 .9 -2 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -1 1.73"/> |
| 277 | <path d="M6 9l12 0"/> |
| 278 | <path d="M6 12l3 0"/> |
| 279 | <path d="M6 15l2 0"/> |
| 280 | </svg> |
| 281 | {{- else if .HasExt ".key" ".keystore" ".jks" ".p12" ".pfx" ".pub"}} |
| 282 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-key" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 283 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 284 | <path d="M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z"/> |
| 285 | <path d="M15 9h.01"/> |
| 286 | </svg> |
| 287 | {{- else}} |
| 288 | {{- if .IsSymlink}} |
| 289 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file-symlink" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 290 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 291 | <path d="M4 21v-4a3 3 0 0 1 3 -3h5"/> |
| 292 | <path d="M9 17l3 -3l-3 -3"/> |
| 293 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 294 | <path d="M5 11v-6a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-9.5"/> |
| 295 | </svg> |
| 296 | {{- else}} |
| 297 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-file" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 298 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 299 | <path d="M14 3v4a1 1 0 0 0 1 1h4"/> |
| 300 | <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"/> |
| 301 | </svg> |
| 302 | {{- end}} |
| 303 | {{- end}} |
| 304 | {{- end}} |
| 305 | <!DOCTYPE html> |
| 306 | <html> |
| 307 | <head> |
| 308 | <title>{{html .Name}}</title> |
| 309 | <link rel="canonical" href="{{.Path}}/" /> |
| 310 | <meta charset="utf-8"> |
| 311 | <meta name="color-scheme" content="light dark"> |
| 312 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 313 | <style {{ $nonceAttribute }}> |
| 314 | * { padding: 0; margin: 0; box-sizing: border-box; } |
| 315 | |
| 316 | body { |
| 317 | font-family: Inter, system-ui, sans-serif; |
| 318 | font-size: 16px; |
| 319 | text-rendering: optimizespeed; |
| 320 | background-color: #f3f6f7; |
| 321 | min-height: 100vh; |
| 322 | } |
| 323 | |
| 324 | img, |
| 325 | svg { |
| 326 | vertical-align: middle; |
| 327 | z-index: 1; |
| 328 | } |
| 329 | |
| 330 | img { |
| 331 | max-width: 100%; |
| 332 | max-height: 100%; |
| 333 | border-radius: 5px; |
| 334 | } |
| 335 | |
| 336 | td img { |
| 337 | max-width: 1.5em; |
| 338 | max-height: 2em; |
| 339 | object-fit: cover; |
| 340 | } |
| 341 | |
| 342 | body, |
| 343 | a, |
| 344 | svg, |
| 345 | .layout.current, |
| 346 | .layout.current svg, |
| 347 | .go-up { |
| 348 | color: #333; |
| 349 | text-decoration: none; |
| 350 | } |
| 351 | |
| 352 | #layout-list, #layout-grid { |
| 353 | cursor: pointer; |
| 354 | } |
| 355 | |
| 356 | .wrapper { |
| 357 | max-width: 1200px; |
| 358 | margin-left: auto; |
| 359 | margin-right: auto; |
| 360 | } |
| 361 | |
| 362 | header, |
| 363 | .meta { |
| 364 | padding-left: 5%; |
| 365 | padding-right: 5%; |
| 366 | } |
| 367 | |
| 368 | td a { |
| 369 | color: #006ed3; |
| 370 | text-decoration: none; |
| 371 | } |
| 372 | |
| 373 | td a:hover { |
| 374 | color: #0095e4; |
| 375 | } |
| 376 | |
| 377 | td a:visited { |
| 378 | color: #800080; |
| 379 | } |
| 380 | |
| 381 | td a:visited:hover { |
| 382 | color: #b900b9; |
| 383 | } |
| 384 | |
| 385 | th:first-child, |
| 386 | td:first-child { |
| 387 | width: 5%; |
| 388 | } |
| 389 | |
| 390 | th:last-child, |
| 391 | td:last-child { |
| 392 | width: 5%; |
| 393 | } |
| 394 | |
| 395 | .size, |
| 396 | .timestamp { |
| 397 | font-size: 14px; |
| 398 | } |
| 399 | |
| 400 | .grid .size { |
| 401 | font-size: 12px; |
| 402 | margin-top: .5em; |
| 403 | color: #496a84; |
| 404 | } |
| 405 | |
| 406 | header { |
| 407 | padding-top: 15px; |
| 408 | padding-bottom: 15px; |
| 409 | box-shadow: 0px 0px 20px 0px rgb(0 0 0 / 10%); |
| 410 | } |
| 411 | |
| 412 | .breadcrumbs { |
| 413 | text-transform: uppercase; |
| 414 | font-size: 10px; |
| 415 | letter-spacing: 1px; |
| 416 | color: #939393; |
| 417 | margin-bottom: 5px; |
| 418 | padding-left: 3px; |
| 419 | } |
| 420 | |
| 421 | h1 { |
| 422 | font-size: 20px; |
| 423 | font-family: Poppins, system-ui, sans-serif; |
| 424 | font-weight: normal; |
| 425 | white-space: nowrap; |
| 426 | overflow-x: hidden; |
| 427 | text-overflow: ellipsis; |
| 428 | color: #c5c5c5; |
| 429 | } |
| 430 | |
| 431 | h1 a, |
| 432 | th a { |
| 433 | color: #000; |
| 434 | } |
| 435 | |
| 436 | h1 a { |
| 437 | padding: 0 3px; |
| 438 | margin: 0 1px; |
| 439 | } |
| 440 | |
| 441 | h1 a:hover { |
| 442 | background: #ffffc4; |
| 443 | } |
| 444 | |
| 445 | h1 a:first-child { |
| 446 | margin: 0; |
| 447 | } |
| 448 | |
| 449 | header, |
| 450 | main { |
| 451 | background-color: white; |
| 452 | } |
| 453 | |
| 454 | main { |
| 455 | margin: 3em auto 0; |
| 456 | border-radius: 5px; |
| 457 | box-shadow: 0 2px 5px 1px rgb(0 0 0 / 5%); |
| 458 | } |
| 459 | |
| 460 | .meta { |
| 461 | display: flex; |
| 462 | gap: 1em; |
| 463 | font-size: 14px; |
| 464 | border-bottom: 1px solid #e5e9ea; |
| 465 | padding-top: 1em; |
| 466 | padding-bottom: 1em; |
| 467 | } |
| 468 | |
| 469 | #summary { |
| 470 | display: flex; |
| 471 | gap: 1em; |
| 472 | align-items: center; |
| 473 | margin-right: auto; |
| 474 | } |
| 475 | |
| 476 | .filter-container { |
| 477 | position: relative; |
| 478 | display: inline-block; |
| 479 | margin-left: 1em; |
| 480 | } |
| 481 | |
| 482 | #search-icon { |
| 483 | color: #777; |
| 484 | position: absolute; |
| 485 | height: 1em; |
| 486 | top: .6em; |
| 487 | left: .5em; |
| 488 | } |
| 489 | |
| 490 | #filter { |
| 491 | padding: .5em 1em .5em 2.5em; |
| 492 | border: none; |
| 493 | border: 1px solid #CCC; |
| 494 | border-radius: 5px; |
| 495 | font-family: inherit; |
| 496 | position: relative; |
| 497 | z-index: 2; |
| 498 | background: none; |
| 499 | } |
| 500 | |
| 501 | .layout, |
| 502 | .layout svg { |
| 503 | color: #9a9a9a; |
| 504 | } |
| 505 | |
| 506 | table { |
| 507 | width: 100%; |
| 508 | border-collapse: collapse; |
| 509 | } |
| 510 | |
| 511 | tbody tr, |
| 512 | tbody tr a, |
| 513 | .entry a { |
| 514 | transition: all .15s; |
| 515 | } |
| 516 | |
| 517 | tbody tr:hover, |
| 518 | .grid .entry a:hover { |
| 519 | background-color: #f4f9fd; |
| 520 | } |
| 521 | |
| 522 | th, |
| 523 | td { |
| 524 | text-align: left; |
| 525 | } |
| 526 | |
| 527 | th { |
| 528 | position: sticky; |
| 529 | top: 0; |
| 530 | background: white; |
| 531 | white-space: nowrap; |
| 532 | z-index: 2; |
| 533 | text-transform: uppercase; |
| 534 | font-size: 14px; |
| 535 | letter-spacing: 1px; |
| 536 | padding: .75em 0; |
| 537 | } |
| 538 | |
| 539 | td { |
| 540 | white-space: nowrap; |
| 541 | } |
| 542 | |
| 543 | td:nth-child(2) { |
| 544 | width: 75%; |
| 545 | } |
| 546 | |
| 547 | td:nth-child(2) a { |
| 548 | padding: 1em 0; |
| 549 | display: block; |
| 550 | } |
| 551 | |
| 552 | td:nth-child(3), |
| 553 | th:nth-child(3) { |
| 554 | padding: 0 20px 0 20px; |
| 555 | min-width: 150px; |
| 556 | } |
| 557 | |
| 558 | td .go-up { |
| 559 | text-transform: uppercase; |
| 560 | font-size: 12px; |
| 561 | font-weight: bold; |
| 562 | } |
| 563 | |
| 564 | .name, |
| 565 | .go-up { |
| 566 | word-break: break-all; |
| 567 | overflow-wrap: break-word; |
| 568 | white-space: pre-wrap; |
| 569 | } |
| 570 | |
| 571 | .listing .icon-tabler { |
| 572 | color: #454545; |
| 573 | } |
| 574 | |
| 575 | .listing .icon-tabler-folder-filled { |
| 576 | color: #ffb900 !important; |
| 577 | } |
| 578 | |
| 579 | .sizebar { |
| 580 | position: relative; |
| 581 | padding: 0.25rem 0.5rem; |
| 582 | display: flex; |
| 583 | } |
| 584 | |
| 585 | .sizebar-bar { |
| 586 | background-color: #dbeeff; |
| 587 | position: absolute; |
| 588 | top: 0; |
| 589 | right: 0; |
| 590 | bottom: 0; |
| 591 | left: 0; |
| 592 | z-index: 0; |
| 593 | height: 100%; |
| 594 | pointer-events: none; |
| 595 | } |
| 596 | |
| 597 | .sizebar-text { |
| 598 | position: relative; |
| 599 | z-index: 1; |
| 600 | overflow: hidden; |
| 601 | text-overflow: ellipsis; |
| 602 | white-space: nowrap; |
| 603 | } |
| 604 | |
| 605 | .grid { |
| 606 | display: grid; |
| 607 | grid-template-columns: repeat(auto-fill, minmax(16em, 1fr)); |
| 608 | gap: 2px; |
| 609 | } |
| 610 | |
| 611 | .grid .entry { |
| 612 | position: relative; |
| 613 | width: 100%; |
| 614 | } |
| 615 | |
| 616 | .grid .entry a { |
| 617 | display: flex; |
| 618 | flex-direction: column; |
| 619 | align-items: center; |
| 620 | justify-content: center; |
| 621 | padding: 1.5em; |
| 622 | height: 100%; |
| 623 | } |
| 624 | |
| 625 | .grid .entry svg { |
| 626 | width: 75px; |
| 627 | height: 75px; |
| 628 | } |
| 629 | |
| 630 | .grid .entry img { |
| 631 | max-height: 200px; |
| 632 | object-fit: cover; |
| 633 | } |
| 634 | |
| 635 | .grid .entry .name { |
| 636 | margin-top: 1em; |
| 637 | } |
| 638 | |
| 639 | footer { |
| 640 | padding: 40px 20px; |
| 641 | font-size: 16px; |
| 642 | text-align: center; |
| 643 | line-height: 2; |
| 644 | } |
| 645 | |
| 646 | .caddy-logo { |
| 647 | display: inline-block; |
| 648 | height: 2em; |
| 649 | margin: -4px auto 0 5px; |
| 650 | } |
| 651 | |
| 652 | @media (max-width: 600px) { |
| 653 | .hideable { |
| 654 | display: none; |
| 655 | } |
| 656 | |
| 657 | td:nth-child(2) { |
| 658 | width: auto; |
| 659 | } |
| 660 | |
| 661 | th:nth-child(3), |
| 662 | td:nth-child(3) { |
| 663 | padding-right: 5%; |
| 664 | text-align: right; |
| 665 | } |
| 666 | |
| 667 | h1 { |
| 668 | color: #000; |
| 669 | } |
| 670 | |
| 671 | h1 a { |
| 672 | margin: 0; |
| 673 | } |
| 674 | |
| 675 | #filter { |
| 676 | max-width: 100px; |
| 677 | } |
| 678 | |
| 679 | .grid .entry { |
| 680 | max-width: initial; |
| 681 | } |
| 682 | } |
| 683 | |
| 684 | |
| 685 | @media (prefers-color-scheme: dark) { |
| 686 | html { |
| 687 | background: black; /* overscroll */ |
| 688 | } |
| 689 | |
| 690 | body { |
| 691 | background: linear-gradient(180deg, rgb(34 50 66) 0%, rgb(26 31 38) 100%); |
| 692 | background-attachment: fixed; |
| 693 | } |
| 694 | |
| 695 | body, |
| 696 | a, |
| 697 | svg, |
| 698 | .layout.current, |
| 699 | .layout.current svg, |
| 700 | .go-up { |
| 701 | color: #ccc; |
| 702 | } |
| 703 | |
| 704 | h1 a, |
| 705 | th a { |
| 706 | color: white; |
| 707 | } |
| 708 | |
| 709 | h1 { |
| 710 | color: white; |
| 711 | } |
| 712 | |
| 713 | h1 a:hover { |
| 714 | background: hsl(213deg 100% 73% / 20%); |
| 715 | } |
| 716 | |
| 717 | header, |
| 718 | main, |
| 719 | .grid .entry { |
| 720 | background-color: #101720; |
| 721 | } |
| 722 | |
| 723 | tbody tr:hover, |
| 724 | .grid .entry a:hover { |
| 725 | background-color: #162030; |
| 726 | color: #fff; |
| 727 | } |
| 728 | |
| 729 | th { |
| 730 | background-color: #18212c; |
| 731 | } |
| 732 | |
| 733 | td a, |
| 734 | .listing .icon-tabler { |
| 735 | color: #abc8e3; |
| 736 | } |
| 737 | |
| 738 | td a:hover, |
| 739 | td a:hover .icon-tabler { |
| 740 | color: white; |
| 741 | } |
| 742 | |
| 743 | td a:visited { |
| 744 | color: #cd53cd; |
| 745 | } |
| 746 | |
| 747 | td a:visited:hover { |
| 748 | color: #f676f6; |
| 749 | } |
| 750 | |
| 751 | #search-icon { |
| 752 | color: #7798c4; |
| 753 | } |
| 754 | |
| 755 | #filter { |
| 756 | color: #ffffff; |
| 757 | border: 1px solid #29435c; |
| 758 | } |
| 759 | |
| 760 | .meta { |
| 761 | border-bottom: 1px solid #222e3b; |
| 762 | } |
| 763 | |
| 764 | .sizebar-bar { |
| 765 | background-color: #1f3549; |
| 766 | } |
| 767 | |
| 768 | .grid .entry a { |
| 769 | background-color: #080b0f; |
| 770 | } |
| 771 | |
| 772 | #Wordmark path, |
| 773 | #R path { |
| 774 | fill: #ccc !important; |
| 775 | } |
| 776 | #R circle { |
| 777 | stroke: #ccc !important; |
| 778 | } |
| 779 | } |
| 780 | |
| 781 | </style> |
| 782 | {{- if eq .Layout "grid"}} |
| 783 | <style {{ $nonceAttribute }}>.wrapper { max-width: none; } main { margin-top: 1px; }</style> |
| 784 | {{- end}} |
| 785 | </head> |
| 786 | <body> |
| 787 | <header> |
| 788 | <div class="wrapper"> |
| 789 | <div class="breadcrumbs">Folder Path</div> |
| 790 | <h1> |
| 791 | {{range $i, $crumb := .Breadcrumbs}}<a href="{{html $crumb.Link}}">{{html $crumb.Text}}</a>{{if ne $i 0}}/{{end}}{{end}} |
| 792 | </h1> |
| 793 | </div> |
| 794 | </header> |
| 795 | <div class="wrapper"> |
| 796 | <main> |
| 797 | <div class="meta"> |
| 798 | <div id="summary"> |
| 799 | <span class="meta-item"> |
| 800 | <b>{{.NumDirs}}</b> director{{if eq 1 .NumDirs}}y{{else}}ies{{end}} |
| 801 | </span> |
| 802 | <span class="meta-item"> |
| 803 | <b>{{.NumFiles}}</b> file{{if ne 1 .NumFiles}}s{{end}} |
| 804 | </span> |
| 805 | <span class="meta-item"> |
| 806 | <b>{{.HumanTotalFileSize}}</b> total |
| 807 | </span> |
| 808 | {{- if ne 0 .Limit}} |
| 809 | <span class="meta-item"> |
| 810 | (of which only <b>{{.Limit}}</b> are displayed) |
| 811 | </span> |
| 812 | {{- end}} |
| 813 | </div> |
| 814 | <a id="layout-list" class='layout{{if eq $.Layout "list" ""}}current{{end}}'> |
| 815 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-list" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 816 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 817 | <path d="M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"/> |
| 818 | <path d="M4 14m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"/> |
| 819 | </svg> |
| 820 | List |
| 821 | </a> |
| 822 | <a id="layout-grid" class='layout{{if eq $.Layout "grid"}}current{{end}}'> |
| 823 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 824 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 825 | <path d="M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"/> |
| 826 | <path d="M14 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"/> |
| 827 | <path d="M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"/> |
| 828 | <path d="M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"/> |
| 829 | </svg> |
| 830 | Grid |
| 831 | </a> |
| 832 | {{- if and (eq .Layout "grid") (eq .Sort "name") (ne .Order "asc")}} |
| 833 | <a href="?sort=name&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid"> |
| 834 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 835 | <text x="2" y="10" font-size="9" fill="currentColor">Z</text> |
| 836 | <text x="2" y="20" font-size="9" fill="currentColor">A</text> |
| 837 | <path d="M13 4v12"></path> |
| 838 | <path d="M12 16l1 2l1 -2"></path> |
| 839 | </svg> |
| 840 | </a> |
| 841 | {{- else if and (eq .Layout "grid") (eq .Sort "name") (ne .Order "desc")}} |
| 842 | <a href="?sort=name&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid"> |
| 843 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 844 | <text x="2" y="10" font-size="9" fill="currentColor">A</text> |
| 845 | <text x="2" y="20" font-size="9" fill="currentColor">Z</text> |
| 846 | <path d="M13 4v12"></path> |
| 847 | <path d="M12 16l1 2l1 -2"></path> |
| 848 | </svg> |
| 849 | </a> |
| 850 | {{- else if and (eq .Layout "grid")}} |
| 851 | <a href="?sort=name&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid"> |
| 852 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 853 | <text x="2" y="20" font-size="9" fill="currentColor">A</text> |
| 854 | <text x="2" y="10" font-size="9" fill="currentColor">Z</text> |
| 855 | <path d="M13 4v12"></path> |
| 856 | <path d="M12 16l1 2l1 -2"></path> |
| 857 | </svg> |
| 858 | </a> |
| 859 | {{- end}} |
| 860 | {{- if and (eq .Layout "grid") (eq .Sort "size") (ne .Order "asc")}} |
| 861 | <a href="?sort=size&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid"> |
| 862 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 863 | <rect x="2" y="4" width="4" height="3" rx="0.4" ry="0.4"></rect> |
| 864 | <rect x="2" y="10" width="8" height="3" rx="0.4" ry="0.4"></rect> |
| 865 | <rect x="2" y="16" width="12" height="3" rx="0.4" ry="0.4"></rect> |
| 866 | <path d="M18 4v12"></path> |
| 867 | <path d="M17 16l1 2l1 -2"></path> |
| 868 | </svg> |
| 869 | </a> |
| 870 | {{- else if and (eq .Layout "grid") (eq .Sort "size") (ne .Order "desc")}} |
| 871 | <a href="?sort=size&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid"> |
| 872 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 873 | <rect x="2" y="4" width="12" height="3" rx="0.4" ry="0.4"></rect> |
| 874 | <rect x="2" y="10" width="8" height="3" rx="0.4" ry="0.4"></rect> |
| 875 | <rect x="2" y="16" width="4" height="3" rx="0.4" ry="0.4"></rect> |
| 876 | <path d="M18 4v12"></path> |
| 877 | <path d="M17 16l1 2l1 -2"></path> |
| 878 | </svg> |
| 879 | </a> |
| 880 | {{- else if and (eq .Layout "grid")}} |
| 881 | <a href="?sort=size&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid"> |
| 882 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 883 | <rect x="2" y="4" width="4" height="3" rx="0.4" ry="0.4"></rect> |
| 884 | <rect x="2" y="10" width="8" height="3" rx="0.4" ry="0.4"></rect> |
| 885 | <rect x="2" y="16" width="12" height="3" rx="0.4" ry="0.4"></rect> |
| 886 | <path d="M18 4v12"></path> |
| 887 | <path d="M17 16l1 2l1 -2"></path> |
| 888 | </svg> |
| 889 | </a> |
| 890 | {{- end}} |
| 891 | {{- if and (eq .Layout "grid") (eq .Sort "time") (ne .Order "asc")}} |
| 892 | <a href="?sort=time&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid"> |
| 893 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 894 | <circle cx="9" cy="11" r="8"></circle> |
| 895 | <line x1="9" y1="12" x2="9" y2="7" stroke-linecap="round"></line> |
| 896 | <line x1="9" y1="12" x2="12" y2="12" stroke-linecap="round"></line> |
| 897 | <path d="M20 4v12"></path> |
| 898 | <path d="M19 16l1 2l1 -2"></path> |
| 899 | </svg> |
| 900 | </a> |
| 901 | {{- else if and (eq .Layout "grid") (eq .Sort "time") (ne .Order "desc")}} |
| 902 | <a href="?sort=time&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid"> |
| 903 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 904 | <circle cx="9" cy="11" r="8"></circle> |
| 905 | <line x1="9" y1="12" x2="9" y2="7" stroke-linecap="round"></line> |
| 906 | <line x1="9" y1="12" x2="12" y2="12" stroke-linecap="round"></line> |
| 907 | <path d="M20 4v12"></path> |
| 908 | <path d="M19 5l1 -2l1 2"></path> |
| 909 | </svg> |
| 910 | </a> |
| 911 | {{- else if and (eq .Layout "grid")}} |
| 912 | <a href="?sort=time&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}&layout=grid"> |
| 913 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-layout-grid" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 914 | <circle cx="9" cy="11" r="8"></circle> |
| 915 | <line x1="9" y1="12" x2="9" y2="7" stroke-linecap="round"></line> |
| 916 | <line x1="9" y1="12" x2="12" y2="12" stroke-linecap="round"></line> |
| 917 | <path d="M20 4v12"></path> |
| 918 | <path d="M19 16l1 2l1 -2"></path> |
| 919 | </svg> |
| 920 | </a> |
| 921 | {{- end}} |
| 922 | </div> |
| 923 | <div class='listing{{if eq .Layout "grid"}} grid{{end}}'> |
| 924 | {{- if eq .Layout "grid"}} |
| 925 | {{- range .Items}} |
| 926 | <div class="entry"> |
| 927 | <a href="{{html .URL}}" title='{{html (.HumanModTime "January 2, 2006 at 15:04:05")}}'> |
| 928 | {{template "icon" .}} |
| 929 | <div class="name">{{html .Name}}</div> |
| 930 | <div class="size">{{.HumanSize}}</div> |
| 931 | </a> |
| 932 | </div> |
| 933 | {{- end}} |
| 934 | {{- else}} |
| 935 | <table aria-describedby="summary"> |
| 936 | <thead> |
| 937 | <tr> |
| 938 | <th></th> |
| 939 | <th> |
| 940 | {{- if and (eq .Sort "namedirfirst") (ne .Order "desc")}} |
| 941 | <a href="?sort=namedirfirst&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}" class="icon"> |
| 942 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-caret-up" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 943 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 944 | <path d="M18 14l-6 -6l-6 6h12"/> |
| 945 | </svg> |
| 946 | </a> |
| 947 | {{- else if and (eq .Sort "namedirfirst") (ne .Order "asc")}} |
| 948 | <a href="?sort=namedirfirst&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}" class="icon"> |
| 949 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-caret-down" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 950 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 951 | <path d="M6 10l6 6l6 -6h-12"/> |
| 952 | </svg> |
| 953 | </a> |
| 954 | {{- else}} |
| 955 | <a href="?sort=namedirfirst&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}" class="icon sort"> |
| 956 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-caret-up" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 957 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 958 | <path d="M18 14l-6 -6l-6 6h12"/> |
| 959 | </svg> |
| 960 | </a> |
| 961 | {{- end}} |
| 962 | |
| 963 | {{- if and (eq .Sort "name") (ne .Order "desc")}} |
| 964 | <a href="?sort=name&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}"> |
| 965 | Name |
| 966 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-caret-up" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 967 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 968 | <path d="M18 14l-6 -6l-6 6h12"/> |
| 969 | </svg> |
| 970 | </a> |
| 971 | {{- else if and (eq .Sort "name") (ne .Order "asc")}} |
| 972 | <a href="?sort=name&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}"> |
| 973 | Name |
| 974 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-caret-down" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 975 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 976 | <path d="M6 10l6 6l6 -6h-12"/> |
| 977 | </svg> |
| 978 | </a> |
| 979 | {{- else}} |
| 980 | <a href="?sort=name&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}"> |
| 981 | Name |
| 982 | </a> |
| 983 | {{- end}} |
| 984 | |
| 985 | <div class="filter-container"> |
| 986 | <svg id="search-icon" xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-search" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 987 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 988 | <path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"/> |
| 989 | <path d="M21 21l-6 -6"/> |
| 990 | </svg> |
| 991 | <input type="search" placeholder="Search" id="filter"> |
| 992 | </div> |
| 993 | </th> |
| 994 | <th> |
| 995 | {{- if and (eq .Sort "size") (ne .Order "desc")}} |
| 996 | <a href="?sort=size&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}"> |
| 997 | Size |
| 998 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-caret-up" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 999 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 1000 | <path d="M18 14l-6 -6l-6 6h12"/> |
| 1001 | </svg> |
| 1002 | </a> |
| 1003 | {{- else if and (eq .Sort "size") (ne .Order "asc")}} |
| 1004 | <a href="?sort=size&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}"> |
| 1005 | Size |
| 1006 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-caret-down" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 1007 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 1008 | <path d="M6 10l6 6l6 -6h-12"/> |
| 1009 | </svg> |
| 1010 | </a> |
| 1011 | {{- else}} |
| 1012 | <a href="?sort=size&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}"> |
| 1013 | Size |
| 1014 | </a> |
| 1015 | {{- end}} |
| 1016 | </th> |
| 1017 | <th class="hideable"> |
| 1018 | {{- if and (eq .Sort "time") (ne .Order "desc")}} |
| 1019 | <a href="?sort=time&order=desc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}"> |
| 1020 | Modified |
| 1021 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-caret-up" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 1022 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 1023 | <path d="M18 14l-6 -6l-6 6h12"/> |
| 1024 | </svg> |
| 1025 | </a> |
| 1026 | {{- else if and (eq .Sort "time") (ne .Order "asc")}} |
| 1027 | <a href="?sort=time&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}"> |
| 1028 | Modified |
| 1029 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-caret-down" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 1030 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 1031 | <path d="M6 10l6 6l6 -6h-12"/> |
| 1032 | </svg> |
| 1033 | </a> |
| 1034 | {{- else}} |
| 1035 | <a href="?sort=time&order=asc{{if ne 0 .Limit}}&limit={{.Limit}}{{end}}{{if ne 0 .Offset}}&offset={{.Offset}}{{end}}"> |
| 1036 | Modified |
| 1037 | </a> |
| 1038 | {{- end}} |
| 1039 | </th> |
| 1040 | <th class="hideable"></th> |
| 1041 | </tr> |
| 1042 | </thead> |
| 1043 | <tbody> |
| 1044 | {{- if .CanGoUp}} |
| 1045 | <tr> |
| 1046 | <td></td> |
| 1047 | <td> |
| 1048 | <a href=".."> |
| 1049 | <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-corner-left-up" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 1050 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/> |
| 1051 | <path d="M18 18h-6a3 3 0 0 1 -3 -3v-10l-4 4m8 0l-4 -4"/> |
| 1052 | </svg> |
| 1053 | <span class="go-up">Up</span> |
| 1054 | </a> |
| 1055 | </td> |
| 1056 | <td></td> |
| 1057 | <td class="hideable"></td> |
| 1058 | <td class="hideable"></td> |
| 1059 | </tr> |
| 1060 | {{- end}} |
| 1061 | {{- range .Items}} |
| 1062 | <tr class="file"> |
| 1063 | <td></td> |
| 1064 | <td> |
| 1065 | <a href="{{html .URL}}"> |
| 1066 | {{template "icon" .}} |
| 1067 | {{- if not .SymlinkPath}} |
| 1068 | <span class="name">{{html .Name}}</span> |
| 1069 | {{- else}} |
| 1070 | <span class="name">{{html .Name}} <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-narrow-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> |
| 1071 | <path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l14 0" /> |
| 1072 | <path d="M15 16l4 -4" /> |
| 1073 | <path d="M15 8l4 4" /> |
| 1074 | </svg> {{html .SymlinkPath}}</span> |
| 1075 | {{- end}} |
| 1076 | </a> |
| 1077 | </td> |
| 1078 | {{- if .IsDir}} |
| 1079 | <td>—</td> |
| 1080 | {{- else}} |
| 1081 | <td class="size" data-size="{{.Size}}"> |
| 1082 | <div class="sizebar"> |
| 1083 | <div class="sizebar-bar"></div> |
| 1084 | <div class="sizebar-text"> |
| 1085 | {{if .IsSymlink}}↱ {{end}}{{.HumanSize}} |
| 1086 | </div> |
| 1087 | </div> |
| 1088 | </td> |
| 1089 | {{- end}} |
| 1090 | <td class="timestamp hideable"> |
| 1091 | <time datetime="{{.HumanModTime "2006-01-02T15:04:05Z"}}">{{.HumanModTime "01/02/2006 03:04:05 PM -07:00"}}</time> |
| 1092 | </td> |
| 1093 | <td class="hideable"></td> |
| 1094 | </tr> |
| 1095 | {{- end}} |
| 1096 | </tbody> |
| 1097 | </table> |
| 1098 | {{- end}} |
| 1099 | </div> |
| 1100 | </main> |
| 1101 | </div> |
| 1102 | <footer> |
| 1103 | Served with |
| 1104 | <a rel="noopener noreferrer" href="https://caddyserver.com"> |
| 1105 | <svg class="caddy-logo" viewBox="0 0 603 147" version="1.1" xmlns="http://www.w3.org/2000/svg" |
| 1106 | xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" |
| 1107 | style="fill-rule:evenodd;clip-rule:evenodd;"> |
| 1108 | <g transform="matrix(1,0,0,1,-2109,-214)"> |
| 1109 | <g transform="matrix(1.425249,0,0,1.426471,318.584718,2.205882)"> |
| 1110 | <g id="Caddy-inline-gradient-light" serif:id="Caddy inline gradient light" |
| 1111 | transform="matrix(1.357373,0,0,1.282277,1067.406733,-23.01164)"> |
| 1112 | <g id="Icon" transform="matrix(0.786336,0,0,0.831674,-2947.913824,-1302.785208)"> |
| 1113 | <g id="World-ring" serif:id="World ring" |
| 1114 | transform="matrix(-0.191794,-0.715786,0.715786,-0.191794,4329.141165,4673.635953)"> |
| 1115 | <path |
| 1116 | d="M3884.774,489.675C3891.351,486.051 3899.199,483.321 3915.611,486.637C3924.523,488.438 3933.311,492.354 3939.855,496.371C3948.178,501.481 3956.898,509.424 3962.141,522.185C3969.229,539.435 3967.519,555.618 3962.553,570.425C3957.908,584.276 3950.667,593.213 3941.347,601.174C3937.098,604.804 3932.186,608.271 3925.755,611.14C3926.236,613.866 3925.899,616.755 3924.607,619.41C3921.343,626.113 3913.141,628.942 3906.439,625.678C3903.269,624.134 3900.96,621.491 3899.756,618.42C3899.317,617.301 3899.026,616.126 3898.893,614.927C3894.586,615.247 3888.008,615.288 3879.625,613.17C3870.403,610.841 3863.775,606.675 3859.892,603.965C3857.593,602.361 3854.954,599.979 3854.544,599.61C3849.166,594.755 3840.83,585.463 3837.015,569.227C3836.572,567.34 3835.378,561.377 3835.452,554.692C3835.692,532.728 3846.508,518.676 3850.779,513.654C3850.806,513.622 3851.363,512.592 3852.24,511.176C3852.413,510.897 3852.583,510.628 3852.746,510.373C3851.965,506.515 3852.275,502.402 3853.879,498.524C3858.185,488.12 3870.29,483.102 3880.695,487.408C3882.166,488.016 3883.53,488.781 3884.774,489.675ZM3922.59,604.499C3925.735,603.411 3931.434,601.121 3937.116,597.152C3944.094,592.277 3948.263,586.859 3949.067,585.815C3951.933,582.091 3953.649,578.973 3955.419,574.541C3960.606,561.554 3960.74,543.258 3951.928,527.406C3951.757,527.099 3948.157,519.688 3939.033,510.595C3938.841,510.404 3936.304,507.745 3932.085,504.382C3922.729,496.924 3912.945,494.238 3911.235,493.78C3898.742,490.429 3890.487,492.487 3888.581,493.232C3893.289,498.918 3894.808,506.982 3891.812,514.223C3890.622,517.098 3888.737,520.227 3886.558,522.198C3886.42,524.192 3889.79,540.928 3889.79,540.928L3885.982,556.16C3884.824,554.348 3873.59,528.838 3872.463,526.865C3872.463,526.865 3868.236,526.681 3864.996,525.34C3860.044,523.291 3856.312,519.474 3854.225,514.916C3854.065,515.076 3853.903,515.241 3853.739,515.41C3853.533,515.622 3853.264,515.899 3851.809,518.573C3842.45,535.769 3843.094,555.08 3849.961,570.464C3853.834,579.14 3860.655,588.17 3867.342,593.952C3867.407,594.009 3873.942,600.239 3884.06,604.767C3890.29,607.556 3896.346,608.803 3899.449,609.309C3899.644,608.701 3899.884,608.1 3900.171,607.51C3901.388,605.011 3903.292,603.05 3905.548,601.743L3898.187,589.251C3898.187,589.251 3903.963,590.775 3907.096,586.147L3910.987,599.527C3910.987,599.527 3914.298,599.275 3918.339,601.243C3920.007,602.055 3921.436,603.174 3922.59,604.499ZM3914.498,609.129C3912.122,607.971 3909.215,608.975 3908.057,611.351C3907.447,612.604 3907.447,614.005 3907.923,615.219C3908.348,616.305 3909.158,617.246 3910.279,617.792C3912.656,618.949 3915.563,617.946 3916.721,615.57C3917.878,613.194 3916.875,610.286 3914.498,609.129ZM3869.641,514.118C3870.951,514.66 3872.329,514.837 3873.657,514.698C3876.632,514.386 3879.375,512.514 3880.59,509.579C3882.348,505.331 3880.299,500.388 3876.051,498.63C3871.802,496.871 3866.86,498.921 3865.101,503.169C3863.343,507.417 3865.392,512.36 3869.641,514.118Z" |
| 1117 | style="fill:url(#_Linear1);" /> |
| 1118 | </g> |
| 1119 | <g id="Padlock" transform="matrix(3.11426,0,0,3.11426,3937.642935,1734.957188)"> |
| 1120 | <path id="Shackle" |
| 1121 | d="M9.284,11C9.284,11.709 8.709,12.284 8,12.284C7.291,12.284 6.716,11.709 6.716,11L6.716,7C6.716,4.101 9.101,1.716 12,1.716C14.899,1.716 17.284,4.101 17.284,7L17.284,11C17.284,11.709 16.709,12.284 16,12.284C15.291,12.284 14.716,11.709 14.716,11L14.716,7C14.716,5.51 13.49,4.284 12,4.284C10.51,4.284 9.284,5.51 9.284,7L9.284,11Z" |
| 1122 | style="fill:rgb(34,182,56);" /> |
| 1123 | <path id="Lock-body" serif:id="Lock body" |
| 1124 | d="M17.716,19.716L17.716,12.284L6.284,12.284L6.284,17.074C5.546,16.656 4.47,16.398 3.716,16.371L3.716,11.838C3.716,10.667 4.667,9.716 5.838,9.716L18.162,9.716C19.333,9.716 20.284,10.667 20.284,11.838L20.284,20.162C20.284,21.333 19.333,22.284 18.162,22.284L9.937,22.257L9.848,21.664L12.06,19.719C13.136,19.719 15.383,19.716 17.716,19.716Z" |
| 1125 | style="fill:rgb(34,182,56);" /> |
| 1126 | </g> |
| 1127 | </g> |
| 1128 | <g id="Wordmark" transform="matrix(1,0,0,1,-12.550055,-2.547609)"> |
| 1129 | <g id="R" transform="matrix(0.426446,0,0,0.451034,-1192.442464,-709.462197)"> |
| 1130 | <g transform="matrix(1,0,0,1,-0.10786,0.450801)"> |
| 1131 | <g transform="matrix(12.124671,0,0,12.124671,3862.605611,1929.898087)"> |
| 1132 | <path |
| 1133 | d="M0.061,-0L0.061,-0.7L0.381,-0.7C0.428,-0.7 0.471,-0.69 0.51,-0.669C0.549,-0.648 0.58,-0.62 0.603,-0.583C0.626,-0.547 0.638,-0.504 0.638,-0.456C0.638,-0.411 0.627,-0.371 0.606,-0.335C0.585,-0.3 0.557,-0.271 0.522,-0.249L0.578,-0.154C0.581,-0.149 0.585,-0.146 0.589,-0.143C0.594,-0.14 0.6,-0.139 0.607,-0.139L0.669,-0.139L0.669,-0L0.571,-0C0.541,-0 0.513,-0.007 0.489,-0.022C0.464,-0.036 0.445,-0.055 0.431,-0.078L0.356,-0.211L0.229,-0.211L0.229,-0L0.061,-0ZM0.229,-0.35L0.362,-0.35C0.382,-0.35 0.4,-0.354 0.416,-0.362C0.433,-0.37 0.446,-0.383 0.455,-0.398C0.465,-0.414 0.47,-0.433 0.47,-0.455C0.47,-0.477 0.465,-0.495 0.455,-0.511C0.445,-0.527 0.432,-0.539 0.416,-0.547C0.399,-0.556 0.382,-0.56 0.362,-0.56L0.229,-0.56L0.229,-0.35Z" |
| 1134 | style="fill:rgb(66,66,66);fill-rule:nonzero;" /> |
| 1135 | </g> |
| 1136 | <g transform="matrix(12.124671,0,0,12.124671,3870.894845,1929.898087)"> |
| 1137 | </g> |
| 1138 | </g> |
| 1139 | <g transform="matrix(1,0,0,1,0.278569,0.101881)"> |
| 1140 | <circle cx="3866.431" cy="1926.141" r="8.923" |
| 1141 | style="fill:none;stroke:rgb(66,66,66);stroke-width:3.02px;" /> |
| 1142 | </g> |
| 1143 | </g> |
| 1144 | <g id="caddy" transform="matrix(1.322706,0,0,2.608475,-899.25927,-791.144639)"> |
| 1145 | <g id="y" transform="matrix(0.50291,0,0,0.281607,905.533186,304.987405)"> |
| 1146 | <path |
| 1147 | d="M192.152,286.875L202.629,268.64C187.804,270.106 183.397,265.779 180.143,263.391C176.888,261.004 174.362,257.99 172.563,254.347C170.765,250.705 169.866,246.691 169.866,242.305L169.866,208.107L183.21,208.107L183.21,242.213C183.21,245.188 183.896,247.822 185.268,250.116C186.64,252.41 188.465,254.197 190.743,255.475C193.022,256.754 195.501,257.393 198.182,257.393C200.894,257.393 203.393,256.75 205.68,255.463C207.966,254.177 209.799,252.391 211.178,250.105C212.558,247.818 213.248,245.188 213.248,242.213L213.248,208.107L226.545,208.107L226.545,242.305C226.545,246.707 225.378,258.46 218.079,268.64C215.735,271.909 207.835,286.875 207.835,286.875L192.152,286.875Z" |
| 1148 | style="fill:url(#_Linear2);fill-rule:nonzero;" /> |
| 1149 | </g> |
| 1150 | <g id="add" transform="matrix(0.525075,0,0,0.281607,801.87138,304.987405)"> |
| 1151 | <g transform="matrix(116.24167,0,0,116.24167,161.845552,267.390029)"> |
| 1152 | <path |
| 1153 | d="M0.276,0.012C0.227,0.012 0.186,0 0.15,-0.024C0.115,-0.048 0.088,-0.08 0.069,-0.12C0.05,-0.161 0.04,-0.205 0.04,-0.254C0.04,-0.305 0.051,-0.35 0.072,-0.39C0.094,-0.431 0.125,-0.463 0.165,-0.487C0.205,-0.51 0.254,-0.522 0.31,-0.522C0.366,-0.522 0.413,-0.51 0.452,-0.486C0.491,-0.463 0.521,-0.431 0.542,-0.39C0.562,-0.35 0.573,-0.305 0.573,-0.256L0.573,-0L0.458,-0L0.458,-0.095L0.456,-0.095C0.446,-0.076 0.433,-0.058 0.417,-0.042C0.401,-0.026 0.381,-0.013 0.358,-0.003C0.335,0.007 0.307,0.012 0.276,0.012ZM0.307,-0.086C0.337,-0.086 0.363,-0.093 0.386,-0.108C0.408,-0.123 0.426,-0.144 0.438,-0.17C0.45,-0.195 0.456,-0.224 0.456,-0.256C0.456,-0.288 0.45,-0.317 0.438,-0.342C0.426,-0.367 0.409,-0.387 0.387,-0.402C0.365,-0.417 0.338,-0.424 0.308,-0.424C0.276,-0.424 0.249,-0.417 0.226,-0.402C0.204,-0.387 0.186,-0.366 0.174,-0.341C0.162,-0.315 0.156,-0.287 0.156,-0.255C0.156,-0.224 0.162,-0.195 0.174,-0.169C0.186,-0.144 0.203,-0.123 0.226,-0.108C0.248,-0.093 0.275,-0.086 0.307,-0.086Z" |
| 1154 | style="fill:url(#_Linear3);fill-rule:nonzero;" /> |
| 1155 | </g> |
| 1156 | <g transform="matrix(116.24167,0,0,116.24167,224.825289,267.390029)"> |
| 1157 | <path |
| 1158 | d="M0.306,0.012C0.265,0.012 0.229,0.006 0.196,-0.007C0.163,-0.021 0.135,-0.039 0.112,-0.064C0.089,-0.088 0.071,-0.117 0.059,-0.151C0.046,-0.185 0.04,-0.222 0.04,-0.263C0.04,-0.315 0.051,-0.36 0.072,-0.399C0.093,-0.437 0.122,-0.468 0.159,-0.489C0.196,-0.511 0.239,-0.522 0.287,-0.522C0.311,-0.522 0.333,-0.518 0.355,-0.511C0.377,-0.504 0.396,-0.493 0.413,-0.48C0.431,-0.466 0.445,-0.451 0.455,-0.433L0.456,-0.433L0.456,-0.73L0.571,-0.73L0.571,-0.261C0.571,-0.205 0.56,-0.156 0.537,-0.115C0.515,-0.074 0.484,-0.043 0.444,-0.021C0.405,0.001 0.358,0.012 0.306,0.012ZM0.306,-0.086C0.335,-0.086 0.361,-0.093 0.384,-0.107C0.406,-0.122 0.423,-0.141 0.436,-0.167C0.448,-0.192 0.455,-0.221 0.455,-0.255C0.455,-0.288 0.448,-0.317 0.436,-0.343C0.423,-0.368 0.406,-0.388 0.383,-0.402C0.361,-0.417 0.335,-0.424 0.305,-0.424C0.276,-0.424 0.251,-0.417 0.228,-0.402C0.206,-0.387 0.188,-0.368 0.175,-0.342C0.163,-0.317 0.156,-0.288 0.156,-0.255C0.156,-0.222 0.163,-0.193 0.175,-0.167C0.188,-0.142 0.206,-0.122 0.229,-0.107C0.251,-0.093 0.277,-0.086 0.306,-0.086Z" |
| 1159 | style="fill:url(#_Linear4);fill-rule:nonzero;" /> |
| 1160 | </g> |
| 1161 | <g transform="matrix(116.24167,0,0,116.24167,287.130824,267.390029)"> |
| 1162 | <path |
| 1163 | d="M0.306,0.012C0.265,0.012 0.229,0.006 0.196,-0.007C0.163,-0.021 0.135,-0.039 0.112,-0.064C0.089,-0.088 0.071,-0.117 0.059,-0.151C0.046,-0.185 0.04,-0.222 0.04,-0.263C0.04,-0.315 0.051,-0.36 0.072,-0.399C0.093,-0.437 0.122,-0.468 0.159,-0.489C0.196,-0.511 0.239,-0.522 0.287,-0.522C0.311,-0.522 0.333,-0.518 0.355,-0.511C0.377,-0.504 0.396,-0.493 0.413,-0.48C0.431,-0.466 0.445,-0.451 0.455,-0.433L0.456,-0.433L0.456,-0.73L0.571,-0.73L0.571,-0.261C0.571,-0.205 0.56,-0.156 0.537,-0.115C0.515,-0.074 0.484,-0.043 0.444,-0.021C0.405,0.001 0.358,0.012 0.306,0.012ZM0.306,-0.086C0.335,-0.086 0.361,-0.093 0.384,-0.107C0.406,-0.122 0.423,-0.141 0.436,-0.167C0.448,-0.192 0.455,-0.221 0.455,-0.255C0.455,-0.288 0.448,-0.317 0.436,-0.343C0.423,-0.368 0.406,-0.388 0.383,-0.402C0.361,-0.417 0.335,-0.424 0.305,-0.424C0.276,-0.424 0.251,-0.417 0.228,-0.402C0.206,-0.387 0.188,-0.368 0.175,-0.342C0.163,-0.317 0.156,-0.288 0.156,-0.255C0.156,-0.222 0.163,-0.193 0.175,-0.167C0.188,-0.142 0.206,-0.122 0.229,-0.107C0.251,-0.093 0.277,-0.086 0.306,-0.086Z" |
| 1164 | style="fill:url(#_Linear5);fill-rule:nonzero;" /> |
| 1165 | </g> |
| 1166 | <g transform="matrix(116.24167,0,0,116.24167,361.060526,267.390029)"> |
| 1167 | </g> |
| 1168 | </g> |
| 1169 | <g id="c" transform="matrix(-0.071646,0.31304,-0.583685,-0.038425,1489.763549,-444.051043)"> |
| 1170 | <path |
| 1171 | d="M2668.105,700.4C2666.794,703.699 2666.122,707.216 2666.122,710.766C2666.122,726.268 2678.707,738.854 2694.21,738.854C2709.712,738.854 2722.297,726.268 2722.297,710.766C2722.297,704.111 2719.934,697.672 2715.63,692.597L2707.634,699.378C2710.333,702.559 2711.572,706.602 2711.814,710.766C2712.197,717.38 2706.605,724.52 2697.27,726.637C2683.899,728.581 2676.606,720.482 2676.606,710.766C2676.606,708.541 2677.027,706.336 2677.848,704.269L2668.105,700.4Z" |
| 1172 | style="fill:url(#_Linear6);" /> |
| 1173 | </g> |
| 1174 | </g> |
| 1175 | </g> |
| 1176 | </g> |
| 1177 | </g> |
| 1178 | </g> |
| 1179 | <defs> |
| 1180 | <linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" |
| 1181 | gradientTransform="matrix(-163.387216,106.949823,-106.949823,-163.387216,3972.527779,507.578678)"> |
| 1182 | <stop offset="0" style="stop-color:rgb(35,217,59);stop-opacity:1" /> |
| 1183 | <stop offset="0.33" style="stop-color:rgb(119,196,247);stop-opacity:1" /> |
| 1184 | <stop offset="1" style="stop-color:rgb(0,89,209);stop-opacity:1" /> |
| 1185 | </linearGradient> |
| 1186 | <linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" |
| 1187 | gradientTransform="matrix(0,43.911414,-45.84671,0,89.290432,181.761728)"> |
| 1188 | <stop offset="0" style="stop-color:rgb(133,133,133);stop-opacity:1" /> |
| 1189 | <stop offset="1" style="stop-color:rgb(47,47,47);stop-opacity:1" /> |
| 1190 | </linearGradient> |
| 1191 | <linearGradient id="_Linear3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" |
| 1192 | gradientTransform="matrix(0,0.37776,-0.37776,0,1.041783,-0.73664)"> |
| 1193 | <stop offset="0" style="stop-color:rgb(133,133,133);stop-opacity:1" /> |
| 1194 | <stop offset="1" style="stop-color:rgb(47,47,47);stop-opacity:1" /> |
| 1195 | </linearGradient> |
| 1196 | <linearGradient id="_Linear4" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" |
| 1197 | gradientTransform="matrix(0,0.37776,-0.37776,0,0.499983,-0.73664)"> |
| 1198 | <stop offset="0" style="stop-color:rgb(133,133,133);stop-opacity:1" /> |
| 1199 | <stop offset="1" style="stop-color:rgb(47,47,47);stop-opacity:1" /> |
| 1200 | </linearGradient> |
| 1201 | <linearGradient id="_Linear5" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" |
| 1202 | gradientTransform="matrix(0,0.37776,-0.37776,0,-0.036017,-0.73664)"> |
| 1203 | <stop offset="0" style="stop-color:rgb(133,133,133);stop-opacity:1" /> |
| 1204 | <stop offset="1" style="stop-color:rgb(47,47,47);stop-opacity:1" /> |
| 1205 | </linearGradient> |
| 1206 | <linearGradient id="_Linear6" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" |
| 1207 | gradientTransform="matrix(38.915784,-4.776839,4.776839,38.915784,2630.088142,601.162637)"> |
| 1208 | <stop offset="0" style="stop-color:rgb(133,133,133);stop-opacity:1" /> |
| 1209 | <stop offset="1" style="stop-color:rgb(47,47,47);stop-opacity:1" /> |
| 1210 | </linearGradient> |
| 1211 | </defs> |
| 1212 | </svg> |
| 1213 | </a> |
| 1214 | </footer> |
| 1215 | |
| 1216 | <script {{ $nonceAttribute }}> |
| 1217 | // @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt Apache-2.0 |
| 1218 | const filterEl = document.getElementById('filter'); |
| 1219 | filterEl?.focus({ preventScroll: true }); |
| 1220 | |
| 1221 | function initPage() { |
| 1222 | // populate and evaluate filter |
| 1223 | if (!filterEl?.value) { |
| 1224 | const filterParam = new URL(window.location.href).searchParams.get('filter'); |
| 1225 | if (filterParam) { |
| 1226 | filterEl.value = filterParam; |
| 1227 | } |
| 1228 | } |
| 1229 | filter(); |
| 1230 | |
| 1231 | // fill in size bars |
| 1232 | let largest = 0; |
| 1233 | document.querySelectorAll('.size').forEach(el => { |
| 1234 | largest = Math.max(largest, Number(el.dataset.size)); |
| 1235 | }); |
| 1236 | document.querySelectorAll('.size').forEach(el => { |
| 1237 | const size = Number(el.dataset.size); |
| 1238 | const sizebar = el.querySelector('.sizebar-bar'); |
| 1239 | if (sizebar) { |
| 1240 | sizebar.style.width = `${size/largest * 100}%`; |
| 1241 | } |
| 1242 | }); |
| 1243 | } |
| 1244 | |
| 1245 | function filter() { |
| 1246 | if (!filterEl) return; |
| 1247 | const q = filterEl.value.trim().toLowerCase(); |
| 1248 | document.querySelectorAll('tr.file').forEach(function(el) { |
| 1249 | if (!q) { |
| 1250 | el.style.display = ''; |
| 1251 | return; |
| 1252 | } |
| 1253 | const nameEl = el.querySelector('.name'); |
| 1254 | const nameVal = nameEl.textContent.trim().toLowerCase(); |
| 1255 | if (nameVal.indexOf(q) !== -1) { |
| 1256 | el.style.display = ''; |
| 1257 | } else { |
| 1258 | el.style.display = 'none'; |
| 1259 | } |
| 1260 | }); |
| 1261 | } |
| 1262 | |
| 1263 | const filterElem = document.getElementById("filter"); |
| 1264 | if (filterElem) { |
| 1265 | filterElem.addEventListener("keyup", filter); |
| 1266 | } |
| 1267 | |
| 1268 | document.getElementById("layout-list").addEventListener("click", function() { |
| 1269 | queryParam('layout', ''); |
| 1270 | }); |
| 1271 | document.getElementById("layout-grid").addEventListener("click", function() { |
| 1272 | queryParam('layout', 'grid'); |
| 1273 | }); |
| 1274 | |
| 1275 | window.addEventListener("load", initPage); |
| 1276 | |
| 1277 | function queryParam(k, v) { |
| 1278 | const qs = new URLSearchParams(window.location.search); |
| 1279 | if (!v) { |
| 1280 | qs.delete(k); |
| 1281 | } else { |
| 1282 | qs.set(k, v); |
| 1283 | } |
| 1284 | const qsStr = qs.toString(); |
| 1285 | if (qsStr) { |
| 1286 | window.location.search = qsStr; |
| 1287 | } else { |
| 1288 | window.location = window.location.pathname; |
| 1289 | } |
| 1290 | } |
| 1291 | |
| 1292 | function localizeDatetime(e, index, ar) { |
| 1293 | if (e.textContent === undefined) { |
| 1294 | return; |
| 1295 | } |
| 1296 | var d = new Date(e.getAttribute('datetime')); |
| 1297 | if (isNaN(d)) { |
| 1298 | d = new Date(e.textContent); |
| 1299 | if (isNaN(d)) { |
| 1300 | return; |
| 1301 | } |
| 1302 | } |
| 1303 | e.textContent = d.toLocaleString(); |
| 1304 | } |
| 1305 | var timeList = Array.prototype.slice.call(document.getElementsByTagName("time")); |
| 1306 | timeList.forEach(localizeDatetime); |
| 1307 | // @license-end |
| 1308 | </script> |
| 1309 | </body> |
| 1310 | </html> |