navbar partial

This commit is contained in:
Lorin Werthen 2016-07-18 16:34:29 +02:00
parent 8180888cfc
commit 094b7bd365
4 changed files with 18 additions and 22 deletions

View file

@ -17,28 +17,15 @@
</div>
</div>
<nav id="navbar">
<a href="#">
About
</a>
<a href="#">
All posts
</a>
<a href="#">
Contact
</a>
<a href="/cammie">
Cammie
</a>
</nav>
<%= render '/_navbar.*' %>
</header>
<main>
<div id="all-events">
<%= render '/tile.*', article: sorted_articles[0] %>
<%= render '/_tile.*', article: sorted_articles[0] %>
<div class="pure-g">
<% sorted_articles[1..-1].each do |article| %>
<div class="pure-u-1-3">
<%= render '/tile.*', article: article %>
<%= render '/_tile.*', article: article %>
</div>
<% end %>
</div>

14
layouts/_navbar.erb Normal file
View file

@ -0,0 +1,14 @@
<nav id="navbar">
<a href="#">
About
</a>
<a href="#">
All posts
</a>
<a href="#">
Contact
</a>
<a href="/cammie">
Cammie
</a>
</nav>

View file

@ -9,12 +9,7 @@
<div id="sticky-anchor"></div>
<div id="sticky">
<h1 id="event-title"><%= item[:title] %></h1>
<nav id="navbar">
<span class="navlink">About</span>
<span class="navlink">All posts</span>
<span class="navlink">Contact</span>
<span class="navlink">Cammie</span>
</nav>
<%= render '/_navbar.*' %>
</div>
<div class="pure-g">
<!-- Wrapper needed to add some padding to the grid class -->