Skip to content

Commit

Permalink
layout usw.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Braun committed May 11, 2011
1 parent f0d96a4 commit 50974c3
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
Binary file modified db/data.db
Binary file not shown.
1 change: 1 addition & 0 deletions views/index.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h2>INDEX</h2>
35 changes: 35 additions & 0 deletions views/layout.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8" />
<title>JWD-Definitionen</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>

<body>

<h1>Definitionen</h1>
<% [:notice, :error].each do |key| %>
<% v = flash[key] %>
<% if v %>
<div class="<%= key %>"><%= v %></div>
<% end %>
<% end %>
<nav>
<ul>
<% if logged_in? %>
<li>Hallo, <%= current_user.email %>.</li>
<li><a href="<%= url "/logout" %>">Logout</a></li>
<% else %>
<li><a href="<%= url "/login" %>">Login</a></li>
<% end %>
</ul>

</nav>
<%= yield %>

</body>
</html>
9 changes: 9 additions & 0 deletions views/login.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<h2>Anmelden</h2>
<form action="<%= url "/login" %>" method="post">
<h3>Emailadresse</h3>
<p><input name="email" /></p>
<h3>Passwort</h3>
<p><input type="password" name="password" /></p>
<input type="submit" />

</form>
9 changes: 9 additions & 0 deletions views/register.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<h2>Registrieren</h2>
<form action="<%= url "/register" %>" method="post">
<h3>Emailadresse</h3>
<p><input name="email" /></p>
<h3>Passwort</h3>
<p><input type="password" name="password" /></p>
<input type="submit" />

</form>

0 comments on commit 50974c3

Please sign in to comment.