feat: #176 のバグ対応(#179) (#180)

#179 完了

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #180
This commit was merged in pull request #180.
This commit is contained in:
2025-12-14 16:51:57 +09:00
parent 92d9fe7733
commit 43a55dbfcf
+27 -18
View File
@@ -58,23 +58,8 @@ export default (({ posts }: Props) => {
setTags (tagsTmp)
}, [posts])
return (
<SidebarComponent>
<TagSearch/>
<AnimatePresence initial={false}>
{tagsVsbl && (
<motion.div
key="sptags"
className="md:block mt-4"
variants={{ hidden: { clipPath: 'inset(0 0 100% 0)',
height: 0 },
visible: { clipPath: 'inset(0 0 0% 0)',
height: 'auto'} }}
initial="hidden"
animate="visible"
exit="hidden"
transition={{ duration: .2, ease: 'easeOut' }}>
const TagBlock = (
<>
<SectionTitle></SectionTitle>
<ul>
{CATEGORIES.flatMap (cat => cat in tags ? (
@@ -104,6 +89,30 @@ export default (({ posts }: Props) => {
}}>
</a>)}
</>)
return (
<SidebarComponent>
<TagSearch/>
<div className="hidden md:block mt-4">
{TagBlock}
</div>
<AnimatePresence initial={false}>
{tagsVsbl && (
<motion.div
key="sptags"
className="md:hidden mt-4"
variants={{ hidden: { clipPath: 'inset(0 0 100% 0)',
height: 0 },
visible: { clipPath: 'inset(0 0 0% 0)',
height: 'auto'} }}
initial="hidden"
animate="visible"
exit="hidden"
transition={{ duration: .2, ease: 'easeOut' }}>
{TagBlock}
</motion.div>)}
</AnimatePresence>
@@ -113,7 +122,7 @@ export default (({ posts }: Props) => {
dark:text-gray-300 dark:hover:text-gray-100"
onClick={ev => {
ev.preventDefault ()
setTagsVsbl (!(tagsVsbl))
setTagsVsbl (v => !(v))
}}>
{tagsVsbl ? '▲▲▲ タグ一覧を閉じる ▲▲▲' : '▼▼▼ タグ一覧を表示 ▼▼▼'}
</a>