move logic to web page front

This commit is contained in:
Kyle Drake 2013-07-14 02:44:31 -04:00
parent c9e287fe35
commit 841ad3e44d
3 changed files with 18 additions and 5 deletions

1
app.rb
View file

@ -30,7 +30,6 @@ error do
end end
get '/?' do get '/?' do
dashboard_if_signed_in
erb :index, layout: false erb :index, layout: false
end end

View file

@ -5,7 +5,7 @@
</a> </a>
<ul class="h-Nav constant-Nav"> <ul class="h-Nav constant-Nav">
<li> <li>
<a href="/" title="back to the start">NeoCities</a> <a href="/" title="Back to the Start">NeoCities</a>
</li> </li>
<li> <li>
<a href="/browse" title="Browse NeoCities member websites">Browse</a> <a href="/browse" title="Browse NeoCities member websites">Browse</a>

View file

@ -73,9 +73,23 @@
</ul> </ul>
<ul class="status-Nav"> <ul class="status-Nav">
<li>
<a href="/signin" class="sign-In" title="Sign into your account">Sign In</a> <% if !signed_in? %>
</li> <li>
<a href="/signin" class="sign-In" title="Sign into your account">Sign In</a>
</li>
<% else %>
<li>
<a href="/dashboard" class="sign-In">Dashboard</a>
</li>
<li>
<a href="/settings" class="sign-In">Settings</a>
</li>
<li>
<a href="/signout" class="sign-In">Signout</a>
</li>
<% end %>
</ul> </ul>
</nav> </nav>