layouts/header.erb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
----- filter: erb ----- <% def active_if(ident) if @item[:permalink] == ident then %{ class="active"} else "" end end %><header class="container" id="site-header"> <nav id="main-navbar" class="navbar navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <h1 class="navbar-brand"> <a href="/" class="h3rald h3rald-header"></a> </h1> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li<%=active_if("projects")%>><a href="/projects/"><i class="h3-fizzing-flask"></i> PROJECTS</a></li> <li<%=active_if("tags")%>><a href="/tags/"><i class="h3-tags"></i> TAGS</a></li> <li<%=active_if("archives")%>><a href="/archives/"><i class="h3-lb-book-02"></i> ARCHIVES</a></li> <li<%=active_if("about")%>><a href="/about/"><i class="h3-scroll-unfurled"></i> ABOUT</a></li> <li> </li> </ul> <form class="navbar-form navbar-right"> <div class="input-group"> <input type="text" class="form-control" name="q" placeholder="Search" id="h3rald-search-box"> <span class="input-group-btn"> <button class="btn btn-default" id="h3rald-search-btn" type="button"><i class="fa fa-search"></i></button> </span> </div> </form> </div> </div> </nav> </header> |