From f2de8111c936f566782e2afbaed2f4070f3d2b4e Mon Sep 17 00:00:00 2001 From: Magnus Hoff Date: Fri, 13 Oct 2017 15:36:22 +0200 Subject: [PATCH] Structure template folder Move errors to their own folder --- src/site.rs | 4 ++-- templates/{ => error}/404.html | 2 +- templates/{ => error}/500.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename templates/{ => error}/404.html (82%) rename templates/{ => error}/500.html (83%) diff --git a/src/site.rs b/src/site.rs index bae3375..5a3fb1e 100644 --- a/src/site.rs +++ b/src/site.rs @@ -26,11 +26,11 @@ pub struct Layout<'a, T: 'a + fmt::Display> { } #[derive(BartDisplay)] -#[template = "templates/404.html"] +#[template = "templates/error/404.html"] struct NotFound; #[derive(BartDisplay)] -#[template = "templates/500.html"] +#[template = "templates/error/500.html"] struct InternalServerError; pub struct Site { diff --git a/templates/404.html b/templates/error/404.html similarity index 82% rename from templates/404.html rename to templates/error/404.html index 2d8be53..89ae856 100644 --- a/templates/404.html +++ b/templates/error/404.html @@ -8,4 +8,4 @@ -{{>footer/default.html}} +{{>../footer/default.html}} diff --git a/templates/500.html b/templates/error/500.html similarity index 83% rename from templates/500.html rename to templates/error/500.html index c8536c6..7626729 100644 --- a/templates/500.html +++ b/templates/error/500.html @@ -8,4 +8,4 @@ -{{>footer/default.html}} +{{>../footer/default.html}}