Sha256: 1a974147f43c0c9edeccfd155ba7f2d7ec02722655b4b047295fd74b4681723a
Contents?: true
Size: 1.93 KB
Versions: 1
Compression:
Stored size: 1.93 KB
Contents
<template> <div class="post-body"> <header class="text" style="background-color: transparent"> <template v-if="content.thumbnail"> <img class="thumbnail" :src="thumbnail()" /> </template> <h1 v-html="content.title.value" v-on:click="$emit('closePost')"></h1> </header> <div class="text" v-html="content.content"> </div> <footer> <div> <div class="timestamps"> <p v-if="content.timestamp.draft"> <span class="label">Draft | </span> {{ content.timestamp.draft | date }} </p> <p v-if="content.timestamp.publish"> <span class="label">Published | </span> {{ content.timestamp.publish | date }} </p> <p v-if="content.timestamp.amend"> <span class="label">Updated | </span> {{ content.timestamp.amend | date }} </p> </div> </div> <div> <template v-if="typeof(content.keywords) !== 'undefined' && content.keywords.length != 0"> <div class="tags" > <template v-for="keyword in content.keywords"> <span class="tag"> <router-link :to="{ name: 'tag', params: { id: keyword.id }}"> <i class="fas fa-tag"></i>{{ keyword.word }} </router-link> </span> </template> </div> </template> </div> </footer> </div> </template> <script> import Modal from '../components/Modal' var _ = require('underscore') var moment = require('moment') export default { props: ['content'], data () { return { } }, components: { Modal, }, methods: { thumbnail() { return Window.Config.host + '/' + Window.Config.digital.uri + '/' + this.content.id + '/' + this.content.thumbnail.name; }, }, mounted() { console.log('this is the poost we have') console.log(this.content.title.value) }, filters: { date(date) { if (date) return moment(date).format("MMMM D, YYYY"); else return null; } }, computed: { } } </script> <style scoped lang="scss"> </style> <style lang="sass"> </style>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ilog-0.3.3 | src/vue/components/PostBody.vue |