From 18ff58e74f9dce2531d3f68f1d2aeecada9ac73f Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 26 Jun 2012 17:43:50 +0200 Subject: using layout in the sinatra app --- views/index.erb | 88 +++++++++++++++++++------------------------------------- views/layout.erb | 27 +++++++++++++++++ views/login.erb | 18 ++++++++++++ views/signup.erb | 20 +++++++++++++ 4 files changed, 95 insertions(+), 58 deletions(-) create mode 100644 views/layout.erb create mode 100644 views/login.erb create mode 100644 views/signup.erb (limited to 'views') diff --git a/views/index.erb b/views/index.erb index e4995a5..54068c2 100644 --- a/views/index.erb +++ b/views/index.erb @@ -1,63 +1,35 @@ - - - - - Secure remote password - - - - -
- -
-
-

Secure Remote Passwords

-

- Secure remote passwords allow you to login with a password that will be unkown to the server and anyone eavesdropping -

-
-
- - -
-
-

1. Signup

-

- First you signup just like normal. Your browser runs a bit of javascript and does not transfer your password but some validator based on it. -

- <% if @user.login %> -

You are signed up as <%= @user.login %> - <% if @user.active %> -

You are logged in. - <% end %> +

+
+

1. Signup

+

+ First you signup just like normal. Your browser runs a bit of javascript and does not transfer your password but some validator based on it. +

+ <% if @user.login %> +

You are signed up as <%= @user.login %> + <% if @user.active %> +

You are logged in. <% end %> - - Signup now... - -

-
-

2. Login

-

- Login using the same credentials. Again javascript is used to calculate a random number and a key based on it that the server then uses to validate your password. -

- - Login - -
-
-

3. Verify

-

- The server logs will tell you your password was not transmitted in clear. Never the less the server can determine wether you were authorized. -

-
- - - + <% end %> + + Signup now... + +
+
+

2. Login

+

+ Login using the same credentials. Again javascript is used to calculate a random number and a key based on it that the server then uses to validate your password. +

+ + Login + +
+
+

3. Verify

+

+ The server logs will tell you your password was not transmitted in clear. Never the less the server can determine wether you were authorized. +

+
- - - - diff --git a/views/layout.erb b/views/layout.erb new file mode 100644 index 0000000..c68ac23 --- /dev/null +++ b/views/layout.erb @@ -0,0 +1,27 @@ + + + + + Secure remote password + + + + + +
+ +
+
+

Secure Remote Passwords

+

+ Secure remote passwords allow you to login with a password that will be unkown to the server and anyone eavesdropping +

+
+
+ + <%= yield %> + + + + + diff --git a/views/login.erb b/views/login.erb new file mode 100644 index 0000000..32a16e5 --- /dev/null +++ b/views/login.erb @@ -0,0 +1,18 @@ +

2. Login

+
+ Login with the user you created. +
+ + +
+ +
+ + +
+ +
+ + Cancel +
+
diff --git a/views/signup.erb b/views/signup.erb new file mode 100644 index 0000000..3a949ab --- /dev/null +++ b/views/signup.erb @@ -0,0 +1,20 @@ + +

1. Signup

+
+ Signup to test secure remote passwords +
+ + +
+ +
+ + +
+ +
+ + Cancel +
+
+ -- cgit v1.2.3