From e7b1144301b8839d8ac51cfd9d991aeb53fc1345 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Fri, 25 May 2018 15:35:55 -0700 Subject: [PATCH] Add a base layout. --- src/Go.cr | 2 +- src/Go/views/base.ecr | 12 ++++++++++++ src/Go/views/game.ecr | 44 +++++++++++-------------------------------- 3 files changed, 24 insertions(+), 34 deletions(-) create mode 100644 src/Go/views/base.ecr diff --git a/src/Go.cr b/src/Go.cr index 25aa9ce..f60a467 100644 --- a/src/Go.cr +++ b/src/Go.cr @@ -50,7 +50,7 @@ get "/game/:id" do |env| black = false end - black.try { |black| render "src/Go/views/game.ecr"} || render_404 + black.try { |black| render "src/Go/views/game.ecr", "src/Go/views/base.ecr"} || render_404 else render_404 end diff --git a/src/Go/views/base.ecr b/src/Go/views/base.ecr new file mode 100644 index 0000000..62b4dc1 --- /dev/null +++ b/src/Go/views/base.ecr @@ -0,0 +1,12 @@ + + + + + + +
+

Go

+ <%= content %> +
+ + diff --git a/src/Go/views/game.ecr b/src/Go/views/game.ecr index f754d86..08eb053 100644 --- a/src/Go/views/game.ecr +++ b/src/Go/views/game.ecr @@ -1,33 +1,11 @@ - - - - - -
- - - - +
+ +