diff options
| Commit | a81dafef9fd78fd446f63b6590b659674508d24e (patch) | |
|---|---|---|
| Author | 2023-09-11 17:10:36 +0300 | |
| Committer | 2023-09-11 17:22:32 +0300 | |
| Files | ab593f8d61a6a4dea3bf924ef6e1166784886070 | |
| syndamia.com-a81dafef9fd78fd446f63b6590b659674508d24e.tar syndamia.com-a81dafef9fd78fd446f63b6590b659674508d24e.tar.gz syndamia.com-a81dafef9fd78fd446f63b6590b659674508d24e.zip | ||
| Parent | 812419f117b2ace7bf1b38c7878eaaf0fba843a2 (diff) | |
(File-type) Removed everything from File-lists, except the file type ftags
2 files changed, 10 insertions, 51 deletions
| -rw-r--r-- | awk-edits/File-type.awk (renamed from awk-edits/File-lists.awk) | 54 | ||||
| -rw-r--r-- | src/styles.css | 7 |
diff --git a/awk-edits/File-lists.awk b/awk-edits/File-type.awk index b952b55..6d2a839 100644 --- a/awk-edits/File-lists.awk +++ b/awk-edits/File-type.awk @@ -84,52 +84,12 @@ # # &&/files -function flSub(name, repl, isft) { - if (isft) - repl = "<td><div class=\"file-icon\">" repl "</div></td>" - sub("&&" name, repl) - fl_rmPar = 1 +function flSub(name, repl) { + sub("&&" name, "<span class=\"file-type-icon\">" repl "</span>") } -/&&folder/ { - flSub("folder", "<details class=\"file-wrapper\"><summary>") - fl_folder = 1 -} -/&&file/ { - # if inside folder and not the first &&file - if (fl_folder == 2) - flSub("file", "</tr><tr>") - - # if inside folder and being the first &&file - else if (fl_folder == 1) { - flSub("file", "</summary><table class=\"file-list\"><tr>") - fl_folder = 2 - } - - # if not inside folder (standalone) - else - flSub("file", "<table class=\"file-list\"><tr>") -} -/&&/files/ { - # if inside folder - if (fl_folder) { - flSub("/files", "</tr></table></details>") - fl_folder = 0 - } - - else - flSub("/files", "</tr></table>") -} -/&&fd/ { - sub(/&&fd[ \t]*/, "<td>") - $0 = $0 "</td>" - fl_rmPar = 1 -} -/&&ft-photo/ { flSub("ft-photo", "\\", 1) } -/&&ft-text/ { flSub("ft-text", "\\", 1) } -/&&ft-zip/ { flSub("ft-zip", "\\", 1) } -/&&ft-movie/ { flSub("ft-movie", "\\", 1) } -/&&ft-markdown/ { flSub("ft-markdown", "\\", 1) } - -/<p>/ && fl_rmPar { sub(/<p>/, "") } -/<\/p>/ && fl_rmPar { sub(/<\/p>/, "") ; fl_rmPar = 0 } +/&&ft-photo/ { flSub("ft-photo", "\\") } +/&&ft-text/ { flSub("ft-text", "\\") } +/&&ft-zip/ { flSub("ft-zip", "\\") } +/&&ft-movie/ { flSub("ft-movie", "\\") } +/&&ft-markdown/ { flSub("ft-markdown", "\\") } diff --git a/src/styles.css b/src/styles.css index 420cde4..ec60458 100644 --- a/src/styles.css +++ b/src/styles.css @@ -140,8 +140,8 @@ img { .pixelated-render { image-rendering: pixelated; } .oldschool-badge { height: 38px; } .flag { max-width: 1.3em; } /* Compatibility with Chrome 49.0.2623.112 (for old machines) */ - .file-icon { min-width: 1.3em; vertical-align: text-bottom; } - .borderless, .oldschool-badge, .file-icon { border: none; } + .file-type-icon { min-width: 1.3em; vertical-align: middle; } + .borderless, .oldschool-badge, .file-type-icon { border: none; } .btn, .h-anchor { /* Thanks https://stackoverflow.com/a/4407335/12036073 */ @@ -336,7 +336,7 @@ dt, dd { padding: 1rem 1rem; width: 100%; } - #sidebar > :not(:first-child) { margin-top: 1.5rem; } + #sidebar > :not(:first-child) { margin-top: 8px; } #sidebar a { border: none; } #header { @@ -350,7 +350,6 @@ dt, dd { #settingsWrapper { border-top: none; border-bottom: none; - margin: 0.58em 0 1em 0; font-size: 1.2em; line-height: 1em; } |