diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-07-16 02:37:42 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-07-16 02:37:42 -0400 |
commit | 622f9eae4032376a94b0bbd24313276c45012148 (patch) | |
tree | 66d7060976691cad738c53765ea8e4b3cefeb289 | |
parent | 433dbf9f3f10d1fabf7598e87475aad0f0b0da91 (diff) | |
download | guff-622f9eae4032376a94b0bbd24313276c45012148.tar.bz2 guff-622f9eae4032376a94b0bbd24313276c45012148.zip |
update .gitignore
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | src/guff/views/page.cr | 7 | ||||
-rw-r--r-- | src/views/page.ecr | 28 |
3 files changed, 37 insertions, 0 deletions
@@ -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 @@ +<!DOCTYPE html> +<html lang='en-US'> + <head> + <meta charset="utf-8"/> + <title><%= + h(@item["name"]) + %></title> + + <% + # TODO: add theme styles + %> + </head> + + <body> + <div class='post'> + <b>page: <%= h(@item["name"]) %></b><br/> + <b> + by <%= h(@item["user_name"]) %> + on <%= h(@item["posted_at_text"]) %> + </b><br/><br/> + <%= @item["body"] %> + </div> + </body> + + <% + # TODO: add theme scripts + %> +</html> |