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 skip_before_filter :authenticated
def index
end
def show
render "injection"
end
def injection def injection
end end
+3 -24
View File
@@ -29,29 +29,8 @@
--> -->
Welcome, <%= current_user.first_name.html_safe %> Welcome, <%= current_user.first_name.html_safe %>
</li> </li>
<li> <li>
<a href="#"> <%= button_to "RailsGoat Tutorials", tutorials_path, {:class => "btn btn-primary", :method => "get"}%>
<div class="fs1" aria-hidden="true" data-icon="&#xe040;"></div> </li>
<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>
</li>
</ul> </ul>
</header> </header>
+5 -1
View File
@@ -13,7 +13,11 @@
</li> </li>
</ul> </ul>
<% else %> <% else %>
<ul class="mini-nav">
<li>
<%= button_to "<- back to app", home_dashboard_index_path, {:class => "btn btn-primary", :method => "get"} %>
</li>
</ul>
<% end %> <% end %>
</header> </header>
@@ -1,5 +1,13 @@
<div id="mainnav" class="hidden-phone hidden-tablet"> <div id="mainnav" class="hidden-phone hidden-tablet">
<ul style="display: block;"> <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"> <li id="injection">
<%= link_to injection_tutorials_path do %> <%= link_to injection_tutorials_path do %>
<div class="icon"> <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>