Add first post for monday, add external posts from other authors, add components for internal and external links
25 lines
No EOL
553 B
Vue
25 lines
No EOL
553 B
Vue
<template>
|
|
<Icon :name="icon" mode="svg"/>
|
|
{{ name }}
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { Category } from './types'
|
|
|
|
type Props = {
|
|
name: Category
|
|
}
|
|
|
|
const { name } = defineProps<Props>()
|
|
|
|
const icons: Record<Category, string> = {
|
|
'story': 'ph:chat-circle-dots-duotone',
|
|
'snippet': 'ph:code-duotone',
|
|
'tutorial': 'ph:lightbulb-duotone',
|
|
'news': 'ph:newspaper-duotone',
|
|
'freelancing': 'ph:laptop-duotone',
|
|
'extern': 'ph:repeat-duotone',
|
|
}
|
|
|
|
const icon = computed(() => icons[name] ?? 'ph:question-mark-duotone')
|
|
</script> |