From 649c846f54e1e9d59c969acdcb9cd8c5e4512b78 Mon Sep 17 00:00:00 2001 From: chaibiq Date: Sat, 16 Mar 2024 13:53:24 +0700 Subject: add folder and file symbol --- src/renderer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer.rs b/src/renderer.rs index b691bca..1919330 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -503,7 +503,7 @@ fn entry_row( } }@else { a.directory href=(parametrized_link(&entry.link, sort_method, sort_order, raw)) { - (entry.name) "/" + "📁 " (entry.name) "/" } } } @else if entry.is_file() { @@ -515,7 +515,7 @@ fn entry_row( } }@else { a.file href=(&entry.link) { - (entry.name) + "📃 " (entry.name) } } -- cgit v1.2.3 From 25e90376680c2bbc91de1dae14ea47291a17b10d Mon Sep 17 00:00:00 2001 From: chaibiq Date: Sat, 16 Mar 2024 17:45:43 +0700 Subject: add file and folder symbol to scss --- data/style.scss | 8 ++++++++ src/renderer.rs | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/data/style.scss b/data/style.scss index 6c0d284..c991459 100644 --- a/data/style.scss +++ b/data/style.scss @@ -91,6 +91,14 @@ a.file, } } +a.file::before { + content: "📃 "; +} + +a.directory::before { + content: "📁 "; +} + a.directory:hover { color: var(--directory_link_color); } diff --git a/src/renderer.rs b/src/renderer.rs index 1919330..b691bca 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -503,7 +503,7 @@ fn entry_row( } }@else { a.directory href=(parametrized_link(&entry.link, sort_method, sort_order, raw)) { - "📁 " (entry.name) "/" + (entry.name) "/" } } } @else if entry.is_file() { @@ -515,7 +515,7 @@ fn entry_row( } }@else { a.file href=(&entry.link) { - "📃 " (entry.name) + (entry.name) } } -- cgit v1.2.3