Skip to content

Instantly share code, notes, and snippets.

@franzwilding
Created July 24, 2018 14:40
Show Gist options
  • Save franzwilding/87b9288a271d387d36fb4605e923c4a2 to your computer and use it in GitHub Desktop.
Save franzwilding/87b9288a271d387d36fb4605e923c4a2 to your computer and use it in GitHub Desktop.
<template>
<section>
<article>
<div class="block">
<a href="#" class="back" v-on:click="navigateBack()">Go Back</a>
<div v-html="WebsiteSetting.about_text"></div>
</div>
</article>
</section>
</template>
<script>
import gql from 'graphql-tag'
export default {
data() {
return {
WebsiteSetting: ''
}
},
methods: {
navigateBack() { window.history.length > 1 ? this.$router.go(-1) : this.$router.push('/'); }
},
apollo: {
WebsiteSetting: gql`{
WebsiteSetting {
about_text
}
}`
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment