added a sidebar element, an index to let ppl know how to get started, and some logic to get users to the tutorials and back into the app regardless of auth or not

This commit is contained in:
Ken Johnson
2013-04-25 02:11:11 -04:00
parent 41371cff1e
commit 726526eabf
5 changed files with 30 additions and 25 deletions
+7
View File
@@ -2,6 +2,13 @@ class TutorialsController < ApplicationController
skip_before_filter :authenticated
def index
end
def show
render "injection"
end
def injection
end
+1 -22
View File
@@ -30,28 +30,7 @@
Welcome, <%= current_user.first_name.html_safe %>
</li>
<li>
<a href="#">
<div class="fs1" aria-hidden="true" data-icon="&#xe040;"></div>
<span class="info-label">
3
</span>
</a>
</li>
<li>
<a href="#">
<div class="fs1" aria-hidden="true" data-icon="&#xe04c;"></div>
<span class="info-label-green">
5
</span>
</a>
</li>
<li>
<a href="#">
<div class="fs1" aria-hidden="true" data-icon="&#xe037;"></div>
<span class="info-label-orange">
9
</span>
</a>
<%= button_to "RailsGoat Tutorials", tutorials_path, {:class => "btn btn-primary", :method => "get"}%>
</li>
</ul>
</header>
+5 -1
View File
@@ -13,7 +13,11 @@
</li>
</ul>
<% else %>
<ul class="mini-nav">
<li>
<%= button_to "<- back to app", home_dashboard_index_path, {:class => "btn btn-primary", :method => "get"} %>
</li>
</ul>
<% end %>
</header>
@@ -1,5 +1,13 @@
<div id="mainnav" class="hidden-phone hidden-tablet">
<ul style="display: block;">
<li id="tutorials_home">
<%= link_to tutorials_path, :html => {:method => "get"} do %>
<div class="icon">
<span class="fs1" aria-hidden="true" data-icon="&#xe094;"></span>
</div>
Tutorial Home
<% end %>
</li>
<li id="injection">
<%= link_to injection_tutorials_path do %>
<div class="icon">
+7
View File
@@ -0,0 +1,7 @@
<script type="text/javascript">
function makeActive(){
$('li[id="tutorials_home"]').addClass('active');
};
$(document).ready(makeActive);
</script>