aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorboasting-squirrel <boasting.squirrel@gmail.com>2019-02-27 19:02:56 +0000
committerboasting-squirrel <boasting.squirrel@gmail.com>2019-02-27 19:02:56 +0000
commit3dd2d59789a0c93e62e6d7771a43adc2e2d71c07 (patch)
treee3fdd72ada542a93f94aba5488429caec457d481
parentActually use unicode characters (diff)
downloadminiserve-3dd2d59789a0c93e62e6d7771a43adc2e2d71c07.tar.gz
miniserve-3dd2d59789a0c93e62e6d7771a43adc2e2d71c07.zip
Improved parent directory link's style
-rw-r--r--src/renderer.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/renderer.rs b/src/renderer.rs
index 1253bec..3fb992e 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -29,8 +29,9 @@ pub fn page(
@if let Some(parent) = page_parent {
tr {
td {
+ span.chevron { (chevron_left()) }
a.root href=(parent) {
- ".."
+ "Parent directory"
}
}
}
@@ -78,6 +79,11 @@ fn build_link(
}
}
+/// Partial: chevron left
+fn chevron_left() -> Markup {
+ (PreEscaped("◂".to_string()))
+}
+
/// Partial: chevron up
fn chevron_up() -> Markup {
(PreEscaped("▴".to_string()))
@@ -237,6 +243,7 @@ fn css() -> Markup {
.chevron {
margin-right: .5rem;
font-size: 1.2em;
+ font-weight: bold;
}
th span.active a, th span.active span {
color: #444444;