aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--views/index.erb37
-rw-r--r--views/layout.erb10
2 files changed, 24 insertions, 23 deletions
diff --git a/views/index.erb b/views/index.erb
index 4425304..ff06792 100644
--- a/views/index.erb
+++ b/views/index.erb
@@ -1,24 +1,15 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>Ruby Session Exercise</title>
-</head>
-<body>
- <h1>Login</h1>
+<h1>Login</h1>
+
+<form action="." method="post">
+ <div>
+ Username: <input type="text" name="username" />
+ </div>
- <form action="." method="post">
- <div>
- Username: <input type="text" name="username" />
- </div>
-
- <div>
- Password: <input type="password" name="password" />
- </div>
-
- <div>
- <input type="submit" value="Login" />
- </div>
- </form>
-</body>
-</html>
+ <div>
+ Password: <input type="password" name="password" />
+ </div>
+
+ <div>
+ <input type="submit" value="Login" />
+ </div>
+</form>
diff --git a/views/layout.erb b/views/layout.erb
new file mode 100644
index 0000000..e4a6105
--- /dev/null
+++ b/views/layout.erb
@@ -0,0 +1,10 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Ruby Session Exercise</title>
+</head>
+<body>
+ <%= yield %>
+</body>
+</html>