Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.

Commit

Permalink
be posible to setup a different open button
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Oct 25, 2015
1 parent 561d5a4 commit af17af5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 2 additions & 1 deletion assets/js/src/cover.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
$ ->

isOpen = location.hash is '#open'
openButton = window.open_button or '.nav-posts > a'

_animate = ->
setTimeout(->
Expand All @@ -16,7 +17,7 @@ $ ->
$('#menu-button').click ->
$('.cover, main, #menu-button, html').toggleClass 'expanded'

$('.nav-blog > a, #avatar-link').click (event) ->
$("#{openButton}, #avatar-link").click (event) ->
if Uno.is 'page', 'home'
event.preventDefault()
location.hash = if location.hash is '' then '#open' else ''
Expand Down
10 changes: 2 additions & 8 deletions partials/navigation.hbs
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
<nav class="navigation left">
<ul class="links">

<li class="nav-blog {{#if current}} nav-current{{/if}}">
<a href="{{@blog.url}}/#open" title="{{@blog.title}} blog">Blog</a>
</li>

{{#foreach navigation}}
<li class="nav-{{slug}} {{#if current}} nav-current{{/if}}">
<a href="{{this.url}}">{{label}}</a>
<li class="nav-{{slug}}{{#if current}} nav-current{{/if}} {{#is "home"}}nav-current{{/is}}">
<a href="{{url absolute="true"}}">{{label}}</a>
</li>
{{/foreach}}

</ul>
</nav>

0 comments on commit af17af5

Please sign in to comment.