style broadcasts and toggle them
This commit is contained in:
parent
f33161f95e
commit
9c403da804
|
@ -37,12 +37,16 @@ Controller = Ember.Controller.extend
|
||||||
broadcasts.set('isLoading', false)
|
broadcasts.set('isLoading', false)
|
||||||
|
|
||||||
broadcasts
|
broadcasts
|
||||||
).property()
|
).property('broadcasts')
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
toggleBurgerMenu: ->
|
toggleBurgerMenu: ->
|
||||||
@toggleProperty('is-open')
|
@toggleProperty('is-open')
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
toggleBroadcasts: ->
|
||||||
|
@toggleProperty('showBroadcasts')
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
showCta: (->
|
showCta: (->
|
||||||
|
|
|
@ -1,5 +1,67 @@
|
||||||
.broadcasts
|
.broadcasts
|
||||||
// display: none
|
position: absolute
|
||||||
|
top: 3.2em
|
||||||
|
width: 27em
|
||||||
|
z-index: 70
|
||||||
|
background-color: $white
|
||||||
|
list-style: none
|
||||||
|
padding: 0 1em
|
||||||
|
margin: 0
|
||||||
|
border: solid 2px $cream-dark
|
||||||
|
border-radius: 2px
|
||||||
|
margin-left: -0.7em
|
||||||
|
|
||||||
|
transform-origin: top left
|
||||||
|
transform: translateY(-100%) scale(.9)
|
||||||
|
opacity: 0
|
||||||
|
transition: transform 300ms ease, opacity 150ms ease
|
||||||
|
|
||||||
|
&:after
|
||||||
|
content: ""
|
||||||
|
position: absolute
|
||||||
|
display: block
|
||||||
|
width: 14px
|
||||||
|
height: 14px
|
||||||
|
background: $white
|
||||||
|
top: -0.5em
|
||||||
|
transform: rotate(45deg)
|
||||||
|
left: 1rem
|
||||||
|
border-top: solid 2px $cream-dark
|
||||||
|
border-left: solid 2px $cream-dark
|
||||||
|
|
||||||
|
li
|
||||||
|
border-bottom: solid 2px $cream-dark
|
||||||
|
&:last-of-type
|
||||||
|
border-bottom: none
|
||||||
|
|
||||||
|
p
|
||||||
|
margin: .5em 0
|
||||||
|
padding-left: 1.5rem
|
||||||
|
word-wrap: break-word
|
||||||
|
|
||||||
|
a
|
||||||
|
display: inline
|
||||||
|
line-height: 1.45
|
||||||
|
|
||||||
|
&.is-open
|
||||||
|
opacity: 1
|
||||||
|
transform: translateY(0) scale(1)
|
||||||
|
|
||||||
|
|
||||||
|
.broadcast-status
|
||||||
|
display: inline-block
|
||||||
|
width: 10px
|
||||||
|
height: 10px
|
||||||
|
margin-right: .5rem
|
||||||
|
margin-left: -1.5rem
|
||||||
|
border-radius: 50%
|
||||||
|
background-color: $grey-medium
|
||||||
|
|
||||||
|
&.warning
|
||||||
|
background-color: $red-dark
|
||||||
|
|
||||||
|
&.announcement
|
||||||
|
background-color: $green-dark
|
||||||
|
|
||||||
|
|
||||||
.icon-broadcast
|
.icon-broadcast
|
||||||
|
|
|
@ -74,6 +74,8 @@ $top-height: 55px
|
||||||
|
|
||||||
.top
|
.top
|
||||||
background-color: #eff0ec
|
background-color: #eff0ec
|
||||||
|
position: relative
|
||||||
|
z-index: 90
|
||||||
|
|
||||||
.topbar
|
.topbar
|
||||||
font-size: $font-size-m
|
font-size: $font-size-m
|
||||||
|
@ -99,7 +101,6 @@ $top-height: 55px
|
||||||
|
|
||||||
a,
|
a,
|
||||||
.navigation-anchor
|
.navigation-anchor
|
||||||
display: block
|
|
||||||
color: #898989
|
color: #898989
|
||||||
font-size: $font-size-m
|
font-size: $font-size-m
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<ul id="navigation" class="navigation {{if is-open 'is-open'}}">
|
<ul id="navigation" class="navigation {{if is-open 'is-open'}}">
|
||||||
|
|
||||||
<li class="">
|
<li class="">
|
||||||
<span class="navigation-anchor"><span class="icon-broadcast {{broadcasts.lastBroadcastStatus}}" title="broadcasts"></span></span>
|
<span class="navigation-anchor" {{action 'toggleBroadcasts'}}><span class="icon-broadcast {{broadcasts.lastBroadcastStatus}}" title="broadcasts"></span></span>
|
||||||
{{#if auth.signedIn}}
|
{{#if auth.signedIn}}
|
||||||
<ul class="broadcasts">
|
<ul class="broadcasts {{if showBroadcasts 'is-open'}}">
|
||||||
{{#each broadcasts.content as |broadcast|}}
|
{{#each broadcasts.content as |broadcast|}}
|
||||||
<li>{{broadcast.category}} {{{broadcast.message}}}</li>
|
<li><p><span class="broadcast-status {{broadcast.category}}" title="{{broadcast.updated_at}}"></span> {{{broadcast.message}}}</p></li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user