From f9ed99a661b48f90bd31ceff02e1f4f45d116781 Mon Sep 17 00:00:00 2001 From: Alex Standke Date: Wed, 11 Dec 2024 20:57:07 -0800 Subject: [PATCH] emphasize filename --- script.js | 8 +++++++- styles.css | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 5209ce8..d4f518d 100644 --- a/script.js +++ b/script.js @@ -25,11 +25,17 @@ fetch("/filelist") const result = fuse.search(query.toLowerCase()).reverse() const elements = result.slice(0, 200).map(x => { const file = x.item + const pathParts = file.path.split('/') + const filename = pathParts.pop() + const path = pathParts.length ? pathParts.join('/') + '/' : '' + return `
  • ${getFileIcon(file.path)} - ${file.path} + + ${path}${filename} + ${file.size}
  • diff --git a/styles.css b/styles.css index c64f11e..d480e1a 100644 --- a/styles.css +++ b/styles.css @@ -71,10 +71,17 @@ li:hover { .filename { flex: 1; + color: #000; + font-weight: 500; } .filesize { font-size: 0.8em; color: #666; white-space: nowrap; +} + +.filepath { + color: #666; + font-weight: normal; } \ No newline at end of file