From 9f073084183bfdc4090a173c383d24d03541c3d8 Mon Sep 17 00:00:00 2001 From: Sam Rijs Date: Sun, 11 Feb 2018 17:52:48 +1100 Subject: [PATCH] introduce footer section fixes #14 --- src/server/views/html/error.rs | 1 + src/server/views/html/index.rs | 1 + src/server/views/html/mod.rs | 22 ++++++++++++++++++++++ src/server/views/html/status.rs | 2 ++ 4 files changed, 26 insertions(+) diff --git a/src/server/views/html/error.rs b/src/server/views/html/error.rs index ba9088c..920788a 100644 --- a/src/server/views/html/error.rs +++ b/src/server/views/html/error.rs @@ -12,5 +12,6 @@ pub fn render(title: &str, descr: &str) -> Response { } } } + (super::render_footer()) }) } diff --git a/src/server/views/html/index.rs b/src/server/views/html/index.rs index 4e3e057..2270b61 100644 --- a/src/server/views/html/index.rs +++ b/src/server/views/html/index.rs @@ -50,5 +50,6 @@ pub fn render(popular: Vec) -> Response { section class="section" { div class="container" (popular_table(popular)) } + (super::render_footer()) }) } diff --git a/src/server/views/html/mod.rs b/src/server/views/html/mod.rs index 000f479..b3cc367 100644 --- a/src/server/views/html/mod.rs +++ b/src/server/views/html/mod.rs @@ -52,3 +52,25 @@ fn render_navbar() -> Markup { } } } + +fn render_footer() -> Markup { + html! { + footer class="footer" { + div class="container" { + div class="content has-text-centered" { + p { + strong "Deps.rs" + " is a service for the Rust community. It is open source on " + a href="https://github.com/srijs/deps.rs" "GitHub" + "." + } + p { + "Please report any issues on the " + a href="https://github.com/srijs/deps.rs/issues" "issue tracker" + "." + } + } + } + } + } +} diff --git a/src/server/views/html/status.rs b/src/server/views/html/status.rs index 4801355..25bc460 100644 --- a/src/server/views/html/status.rs +++ b/src/server/views/html/status.rs @@ -108,6 +108,7 @@ fn render_failure(repo_path: RepoPath) -> Markup { } } } + (super::render_footer()) } } @@ -153,6 +154,7 @@ fn render_success(analysis_outcome: AnalyzeDependenciesOutcome, repo_path: RepoP } } } + (super::render_footer()) } }