File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import type { ReleaseData } from ' ~~/shared/types/changelog'
3+ import { useDateFormat } from ' #imports'
34
45const { release } = defineProps <{
56 release: ReleaseData
67}>()
8+ const formattedDate = useDateFormat (() => release .publishedAt , ' YYYY-MM-DD' , {})
9+
10+ const cardId = computed (() => (release .publishedAt ? ` date-${formattedDate .value } ` : undefined ))
11+
12+ const navId = computed (() => ` releaae-${encodeURIComponent (release .title )} ` )
713 </script >
814<template >
915 <section class =" border border-border rounded-lg p-4 sm:p-6" >
10- <div class =" flex justify-between" >
11- <h2 class =" text-1xl sm:text-2xl font-medium min-w-0 break-words py-2" >
16+ <div class =" flex justify-between" :id = " cardId " >
17+ <h2 class =" text-1xl sm:text-2xl font-medium min-w-0 break-words py-2" :id = " navId " >
1218 {{ release.title }}
1319 </h2 >
1420 <ReadmeTocDropdown
You can’t perform that action at this time.
0 commit comments