From 3e1697e737cae24ba398f7062c27ce4ced2b8626 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 13 Mar 2016 19:10:06 -0400 Subject: add test auth stub --- src/guff/views/html/test/auth.cr | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/guff/views/html/test/auth.cr (limited to 'src/guff/views/html/test/auth.cr') diff --git a/src/guff/views/html/test/auth.cr b/src/guff/views/html/test/auth.cr new file mode 100644 index 0000000..bdada74 --- /dev/null +++ b/src/guff/views/html/test/auth.cr @@ -0,0 +1,27 @@ +require "ecr/macros" +require "../page" + +class Guff::TestAuthHTMLView + TITLE = "Guff Auth Test" + FEATURES = %w{bootstrap font-awesome} + + def self.run(models, context : HTTP::Server::Context) + new(models).run(context) + end + + def initialize(@models : Models) + end + + def run(context) + page = PageHTMLView.new(TITLE, self.to_s) + page.add_features(FEATURES) + context.response.content_type = page.content_type + context.response.puts page + end + + def h(s : String) + HTML.escape(s || "") + end + + ECR.def_to_s("./src/guff/views/ecrs/test/auth.ecr") +end -- cgit v1.2.3