Created
October 3, 2016 19:03
-
-
Save ZacharyJacobCollins/f73f9ed7ebfd832879dd5bcf9beaea62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The footer | |
Vue.component('footer-component', { | |
template: ` | |
<footer id="footer" class="main"> | |
<ul> | |
<template v-for="footerSection in footerSections"> | |
<li><a href="{{ footerSection.link }}">{{ footerSection.text }}</a></li> | |
</template> | |
</ul> | |
<p> MIT <a href="https://github.com/ZacharyJacobCollins">@Zachary Collins {{footerSections}}</a></p> | |
<p class="less-significant"> | |
<!-- Logo here. SVG Works well . --> | |
</p> | |
</footer> | |
`, | |
props: ['footerSections'], | |
}); | |
I want to use this component | |
<footer-component footerSections="footerSections"></footer-component> | |
where footer sections are being linked in via this vue object | |
var footer = new Vue({ | |
el: "#footer", | |
data: { | |
footerSections: [ | |
{ text: 'Github', link: 'https://github.com/ZacharyJacobCollins'}, | |
{ text: '[email protected]', link: 'https://gmail.com'}, | |
{ text: 'Twitter', link: 'twitter.com'}, | |
], | |
signature: {}, | |
logo: { license: 'MIT', link: 'https://github.com/ZacharyJacobCollins', text: '@Zachary Collins.' } | |
}, | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment