diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-03-13 19:10:06 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-03-13 19:10:06 -0400 |
commit | 3e1697e737cae24ba398f7062c27ce4ced2b8626 (patch) | |
tree | 2b7bef87a0399f8a570e8c3ff09589bd8f83ab8d /src/guff/views | |
parent | 13abd228f1cfb9d43ee1a14299d57ae0523e1cab (diff) | |
download | old-guff-3e1697e737cae24ba398f7062c27ce4ced2b8626.tar.bz2 old-guff-3e1697e737cae24ba398f7062c27ce4ced2b8626.zip |
add test auth stub
Diffstat (limited to 'src/guff/views')
-rw-r--r-- | src/guff/views/ecrs/test/auth.ecr | 20 | ||||
-rw-r--r-- | src/guff/views/html/test/auth.cr | 27 |
2 files changed, 47 insertions, 0 deletions
diff --git a/src/guff/views/ecrs/test/auth.ecr b/src/guff/views/ecrs/test/auth.ecr new file mode 100644 index 0000000..770e6b3 --- /dev/null +++ b/src/guff/views/ecrs/test/auth.ecr @@ -0,0 +1,20 @@ +<h1><%= h(TITLE) %></h1> + +<div class='container'> + <div class='col-md-8 col-md-offset-2'> + <div class='panel panel-default'> + <div class='panel-heading'> + <b> + <i class='fa fa-search'></i> + Auth Test + </b> + </div><!-- panel-heading --> + + <div class='panel-body'> + <p> + Auth test. + </p> + </div><!-- panel-body --> + </div><!-- panel --> + </div><!-- col-md-8 --> +</div><!-- container --> 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 |