Sha256: 3d5e08f2b52f962957debf372fd14470db6e54b1cff0f7199baccba47b94b823

Contents?: true

Size: 1.31 KB

Versions: 10

Compression:

Stored size: 1.31 KB

Contents

<template>
	<a :href="content.slug.value" target="_blank">
		<div class="content">
			<div class="info">
				<span class="kind" v-if="content.kind"><span><i class="fas fa-external-link-square-alt"></i> {{ content.kind }}</span></span>
				<span class="date">{{ content.timestamp.publish | date }}</span>
			</div>
			<template v-if="content.thumbnail">
				<img class="thumbnail" :src="thumbnail()" />
			</template>
			<div class="title h1" v-html="content.title.value"></div>
		</div>
		<footer>
			<template v-if="typeof(content.keywords) !== 'undefined' && content.keywords.length != 0">
				<div class="tags">
					<template v-for="keyword in content.keywords">
						<span class="tag">
							<span :to="{ name: 'tag', params: { id: keyword.id }}">
								<i class="fas fa-tag"></i>{{ keyword.word }}
							</span>
						</span>
					</template>
				</div>
			</template>
		</footer>
	</a>

</template>

<script>
var moment = require('moment');
export default {
	name: 'stuff',
	props: ['content'],
	data () {
		return {
		}
	},
	methods: {
		thumbnail() {
			return this.content.thumbnail.path + this.content.thumbnail.name;
		},
	},
	filters: {
		capitalize: function(text) {
			return text[0].toUpperCase() + text.slice(1);
		},
		date: function(time) {
			return moment(time).fromNow();
		}
	},
}
</script>

<style scoped>
</style>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ilog-0.4.9 src/vue/components/Stuff.vue
ilog-0.4.8 src/vue/components/Stuff.vue
ilog-0.4.7 src/vue/components/Stuff.vue
ilog-0.4.6 src/vue/components/Stuff.vue
ilog-0.4.5 src/vue/components/Stuff.vue
ilog-0.4.4 src/vue/components/Stuff.vue
ilog-0.4.3 src/vue/components/Stuff.vue
ilog-0.4.2 src/vue/components/Stuff.vue
ilog-0.4.1 src/vue/components/Stuff.vue
ilog-0.4.0 src/vue/components/Stuff.vue