Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commita81dafef9fd78fd446f63b6590b659674508d24e (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-09-11 17:10:36 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-09-11 17:22:32 +0300
Filesab593f8d61a6a4dea3bf924ef6e1166784886070
syndamia.com-a81dafef9fd78fd446f63b6590b659674508d24e.tar
syndamia.com-a81dafef9fd78fd446f63b6590b659674508d24e.tar.gz
syndamia.com-a81dafef9fd78fd446f63b6590b659674508d24e.zip
Parent812419f117b2ace7bf1b38c7878eaaf0fba843a2 (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.css7
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("&#38;&#38;" name, repl)
- fl_rmPar = 1
+function flSub(name, repl) {
+ sub("&#38;&#38;" name, "<span class=\"file-type-icon\">" repl "</span>")
}
-/&#38;&#38;folder/ {
- flSub("folder", "<details class=\"file-wrapper\"><summary>")
- fl_folder = 1
-}
-/&#38;&#38;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>")
-}
-/&#38;&#38;&#47;files/ {
- # if inside folder
- if (fl_folder) {
- flSub("&#47;files", "</tr></table></details>")
- fl_folder = 0
- }
-
- else
- flSub("&#47;files", "</tr></table>")
-}
-/&#38;&#38;fd/ {
- sub(/&#38;&#38;fd[ \t]*/, "<td>")
- $0 = $0 "</td>"
- fl_rmPar = 1
-}
-/&#38;&#38;ft-photo/ { flSub("ft-photo", "\\&#xeb0a;", 1) }
-/&#38;&#38;ft-text/ { flSub("ft-text", "\\&#xeaa2;", 1) }
-/&#38;&#38;ft-zip/ { flSub("ft-zip", "\\&#xed4e;", 1) }
-/&#38;&#38;ft-movie/ { flSub("ft-movie", "\\&#xeafa;", 1) }
-/&#38;&#38;ft-markdown/ { flSub("ft-markdown", "\\&#xec41;", 1) }
-
-/<p>/ && fl_rmPar { sub(/<p>/, "") }
-/<\/p>/ && fl_rmPar { sub(/<\/p>/, "") ; fl_rmPar = 0 }
+/&#38;&#38;ft-photo/ { flSub("ft-photo", "\\&#xeb0a;") }
+/&#38;&#38;ft-text/ { flSub("ft-text", "\\&#xeaa2;") }
+/&#38;&#38;ft-zip/ { flSub("ft-zip", "\\&#xed4e;") }
+/&#38;&#38;ft-movie/ { flSub("ft-movie", "\\&#xeafa;") }
+/&#38;&#38;ft-markdown/ { flSub("ft-markdown", "\\&#xec41;") }
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;
}