add burger toggle

This commit is contained in:
Lisa Passing 2015-02-12 16:03:35 +01:00
parent adcc8b57f4
commit 7e0fe8cb61
3 changed files with 21 additions and 8 deletions

View File

@ -12,4 +12,9 @@ Controller = Ember.Controller.extend
"#{location.protocol}//www.gravatar.com/avatar/#{@get('user.gravatarId')}?s=48&d=mm"
).property('user.gravatarId')
actions: {
toggleBurgerMenu: ->
@toggleProperty('is-open')
}
`export default Controller`

View File

@ -2,8 +2,6 @@
#top
font-size: $font-size-normal
background : $topbar-bg
height: 55px
overflow: hidden
#logo
position: relative
@ -21,6 +19,12 @@
@include resetul
line-height: 30px
#navigation
height: 0
overflow: hidden
&.is-open
height: auto
a, span
color: $white
text-decoration: none
@ -47,6 +51,11 @@
@media #{$medium-up}
overflow: visible
height: 55px
#navigation
height: auto
overflow: visible
ul
line-height: 55px
position: relative
@ -76,13 +85,12 @@
&:hover
cursor: pointer
&.is-open
height: auto
.menu
position: relative
&.signed-out
ul
display: none
.handle
margin: 0

View File

@ -5,10 +5,10 @@
{{/link-to}}
<div class="nav-burger">
<button type="button" id="burger">&equiv;</button>
<button type="button" id="burger" {{action 'toggleBurgerMenu'}}>&equiv;</button>
</div>
<ul id="navigation">
<ul id="navigation" {{bind-attr class="is-open"}}>
<li class="home">
{{#link-to "main"}}Home{{/link-to}}
</li>