Commit c98b00bf authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt

allow tags to grow in size based on their weight

parent fadd4a6a
<template>
<router-link :to="{ name: 'tag', params: { slug: tag.slug } }" class="tag white mb-2 mr-2"
:title="tag.name" >
:title="tag.name" :style="{ 'font-size': fontSize }">
<span>#{{ tag.slug }}</span>
<app-image :size="20" :aspect-ratio="1" :src="tag.icon" v-if="tag.icon" auto-size class="ml-1"/>
</router-link>
......@@ -9,7 +9,13 @@
<script>
export default {
props: {
tag: Object
tag: Object,
grow: Boolean
},
computed: {
fontSize () {
return this.grow ? `calc(1rem * ${1 + this.tag.weight})` : null
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment