diff --git a/html/html.go b/html/html.go index 0ae268e..9f6fa2c 100644 --- a/html/html.go +++ b/html/html.go @@ -14,7 +14,28 @@ type Entry struct { Size int64 } -func FileListPage(req string, entries []Entry) string { +func FileListPage(req string, entries []Entry, big_preview_mode bool) string { + headerCSS1 := "" + if !big_preview_mode { + headerCSS1 = "display: flex;" + } else { + headerCSS1 = "width: 320px;" + } + headerCSS2 := "" + if !big_preview_mode { + headerCSS2 = `width: 48px;height: 48px;` + } else { + headerCSS2 = `width: 256px;height: 256px;` + } + linkSuffixToggle := "" + linkSuffix := "" + if big_preview_mode { + linkSuffixToggle = "" + linkSuffix = "?big_preview=true" + } else { + linkSuffixToggle = "?big_preview=true" + linkSuffix = "" + } header := fmt.Sprintf(` @@ -58,6 +79,7 @@ func FileListPage(req string, entries []Entry) string { } #footer { text-align: left; + margin-bottom: 64px; } a { color: var(--text-color); @@ -65,15 +87,15 @@ func FileListPage(req string, entries []Entry) string { font-size: 32px; } .entry { - display: flex; + %s } .entry-name { margin-left: 16px; margin-right: auto; } .entry-icon{ - width: 48px; - height: 48px; + %s + image-rendering: pixelated; } #leech { image-rendering: pixelated; @@ -81,6 +103,16 @@ func FileListPage(req string, entries []Entry) string { height:256px; width:auto; } + .left-entry{ + margin-right: auto; + } + .row { + display: flex; + } + #toggle-big-preview-link { + text-decoration-line: underline; + text-decoration-style: wavy; + }