add: category, date sorting

Add category layouts and date sorting
This commit is contained in:
webfussel 2025-06-12 09:08:21 +02:00
parent 91b59e4ebe
commit 9b66a79a8c
17 changed files with 2495 additions and 17729 deletions

View file

@ -0,0 +1,24 @@
<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',
}
const icon = computed(() => name ? icons[name] : 'ph:question-mark-duotone')
</script>