Skip to content

Instantly share code, notes, and snippets.

@andreliem
Created June 13, 2018 02:55
Show Gist options
  • Save andreliem/079a1ada0cf54cd4cfc6028ec5eacaa3 to your computer and use it in GitHub Desktop.
Save andreliem/079a1ada0cf54cd4cfc6028ec5eacaa3 to your computer and use it in GitHub Desktop.
<script id="dropdown" type="x/template">
<div>
<a href="#" v-on:click.prevent="showDropDown=!showDropDown">
<div>Catness</div>
<img src="..." alt="avatar">
<i :class="{ 'fa-caret-up': showDropDown, 'fa-caret-down': !showDropDown }" class="fa" aria-hidden="true"></i>
</a>
<div v-if="showDropDown">
<ul class="menu list pl0 pa0 ma0">
<li v-for="link in links" class="list">
<a href="#" class="dd-link pointer hover-bg-moon-gray">{{link.name}}</a>
</li>
</ul>
</div>
</div>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment