aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlat <flat@esoteric.moe>2025-02-06 18:58:51 +0000
committerFlat <flat@esoteric.moe>2025-02-06 18:58:51 +0000
commit01811e26dbbdee82ac2070f747a6b5f8f0baba8f (patch)
tree878ffc5692ea1120bc62c40f82c48e903f21dfa5
parentUpdate README.md (diff)
downloadminiserve-01811e26dbbdee82ac2070f747a6b5f8f0baba8f.tar.gz
miniserve-01811e26dbbdee82ac2070f747a6b5f8f0baba8f.zip
Add date pill and sort links for mobile views
Diffstat (limited to '')
-rw-r--r--data/style.scss7
-rw-r--r--src/renderer.rs7
2 files changed, 12 insertions, 2 deletions
diff --git a/data/style.scss b/data/style.scss
index c2d54f7..ceedc5f 100644
--- a/data/style.scss
+++ b/data/style.scss
@@ -281,11 +281,12 @@ td.date-cell {
color: var(--date_text_color);
}
-span.size {
+span.size, span.mobile-info.history {
white-space: nowrap;
border-radius: 1rem;
background: var(--size_background_color);
padding: 0 0.25rem;
+ margin: 0 0.25rem;
font-size: 0.7rem;
color: var(--size_text_color);
}
@@ -294,6 +295,10 @@ span.size {
display: none;
}
+.mobile-info a, .mobile-info a:visited {
+ color: var(--size_text_color);
+}
+
th a,
th a:visited,
.chevron {
diff --git a/src/renderer.rs b/src/renderer.rs
index 28ca2d9..ca49413 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -521,7 +521,12 @@ fn entry_row(
@if !raw {
@if let Some(size) = entry.size {
span.mobile-info.size {
- (maud::display(size))
+ (build_link("size", &format!("{}", size), sort_method, sort_order))
+ }
+ }
+ @if let Some(modification_timer) = humanize_systemtime(entry.last_modification_date) {
+ span.mobile-info.history {
+ (build_link("date", &modification_timer, sort_method, sort_order))
}
}
}