<html>
  <head><title>OpenID Server Example</title>
  <%#= csrf_meta_tags %>
  </head>
  <style type="text/css">
      * {
        font-family: verdana,sans-serif;
      }
      body {
        width: 50em;
        margin: 1em;
      }
      div {
        padding: .5em;
      }
      table {
        margin: none;
        padding: none;
      }
      .notice {
        border: 1px solid #60964f;
        background: #b3dca7;
      }
      .error {
        border: 1px solid #ff0000;
        background: #ffaaaa;
      }
      #login-form {
        border: 1px solid #777777;
        background: #dddddd;
        margin-top: 1em;
        padding-bottom: 0em;
      }
      table {
        padding: 1em;
      }
      li {margin-bottom: .5em;}
      span.openid:before {
        content: url(<%= @base_url %>images/openid_login_bg.gif) ;
      }
      span.openid {
        font-size: smaller;
      }
  </style>
  <body>



    <% if session[:username] %>
      <div style="float:right;">
        Welcome, <%= session[:username] %> | <%= link_to('Log out', :controller => 'login', :action => 'logout') %><br />
	<span class="openid"><%= @base_url %>user/<%= session[:username] %></span>
      </div>
    <% end %>

    <h3>Ruby OpenID Server Example</h3>

    <hr/>

    <% if flash[:notice] or flash[:error] %>
     <div class="<%= flash[:notice].nil? ? 'error' : 'notice' %>">
       <%= flash[:error] or flash[:notice] %>
     </div>
    <% end %>

    <%= yield %>


  </body>
</html>
