From 622f9eae4032376a94b0bbd24313276c45012148 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 16 Jul 2016 02:37:42 -0400 Subject: update .gitignore --- .gitignore | 2 ++ src/guff/views/page.cr | 7 +++++++ src/views/page.ecr | 28 ++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 src/guff/views/page.cr create mode 100644 src/views/page.ecr diff --git a/.gitignore b/.gitignore index 36e4530..0760cda 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ /shard.lock /data/test /spec/ +/guff +/guff.log diff --git a/src/guff/views/page.cr b/src/guff/views/page.cr new file mode 100644 index 0000000..16f9b05 --- /dev/null +++ b/src/guff/views/page.cr @@ -0,0 +1,7 @@ +class Guff::Views::PageView < Guff::Views::HTMLView + def initialize(context : Context, @item : Hash(String, String)) + super(context) + end + + ECR.def_to_s("src/views/page.ecr") +end diff --git a/src/views/page.ecr b/src/views/page.ecr new file mode 100644 index 0000000..0c9332e --- /dev/null +++ b/src/views/page.ecr @@ -0,0 +1,28 @@ + + + + + <%= + h(@item["name"]) + %> + + <% + # TODO: add theme styles + %> + + + +
+ page: <%= h(@item["name"]) %>
+ + by <%= h(@item["user_name"]) %> + on <%= h(@item["posted_at_text"]) %> +

+ <%= @item["body"] %> +
+ + + <% + # TODO: add theme scripts + %> + -- cgit v1.2.3