Skip to content

Instantly share code, notes, and snippets.

@sandi-racy sandi-racy/Home.vue
Created Dec 26, 2017

Embed
What would you like to do?
<template lang="jade">
.page
.row.introduction
.col-md-8.col-md-offset-2
h1.introduction__text {{ metadata.introduction }}
.row
.col-md-12
img(:src="metadata.image.url").img-responsive
.row.about
.col-md-8.col-md-offset-2
label About:
p {{ metadata.about }}
</template>
<script>
import Cosmic from 'cosmicjs'
export default {
data() {
return {
metadata: {
about: null,
image: {
url: null
},
introduction: null
}
}
},
mounted() {
const params = {
type_slug: 'profiles',
limit: 1,
skip: 0
}
Cosmic.getObjectsByType(cosmicJsConfig, params, (error, response) => {
this.metadata = response.object.profile.metadata
})
}
}
</script>
<style lang="stylus" scoped>
.introduction
padding-bottom: 80px
.introduction__text
line-height: 45px
.about
padding-top: 50px
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.