diff options
author | jikstra <jikstra@disroot.org> | 2021-09-10 14:23:26 +0000 |
---|---|---|
committer | jikstra <jikstra@disroot.org> | 2021-09-10 14:32:07 +0000 |
commit | 45650ea93b723db551fec8c77fbac5065c7659a6 (patch) | |
tree | feeac7e6f4da2b7a99a6177f7ab52f0d44ac3253 /src/renderer.rs | |
parent | Fix tests (diff) | |
download | miniserve-45650ea93b723db551fec8c77fbac5065c7659a6.tar.gz miniserve-45650ea93b723db551fec8c77fbac5065c7659a6.zip |
Implement --show-wget-footer argument
Diffstat (limited to 'src/renderer.rs')
-rw-r--r-- | src/renderer.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/renderer.rs b/src/renderer.rs index c0a243e..3c2d008 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -143,7 +143,9 @@ pub fn page( (arrow_up()) } div.footer { - (wget_download(&title_path, current_user)) + @if conf.show_wget_footer { + (wget_footer(&title_path, current_user)) + } @if !conf.hide_version_footer { (version_footer()) } @@ -195,7 +197,7 @@ fn version_footer() -> Markup { } } -fn wget_download(title_path: &str, current_user: Option<&CurrentUser>) -> Markup { +fn wget_footer(title_path: &str, current_user: Option<&CurrentUser>) -> Markup { let count = { let count_slashes = title_path.matches('/').count(); if count_slashes > 0 { |