#179 完了 Co-authored-by: miteruzo <miteruzo@naver.com> Reviewed-on: #180
This commit was merged in pull request #180.
This commit is contained in:
@@ -58,23 +58,8 @@ export default (({ posts }: Props) => {
|
|||||||
setTags (tagsTmp)
|
setTags (tagsTmp)
|
||||||
}, [posts])
|
}, [posts])
|
||||||
|
|
||||||
return (
|
const TagBlock = (
|
||||||
<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' }}>
|
|
||||||
<SectionTitle>タグ</SectionTitle>
|
<SectionTitle>タグ</SectionTitle>
|
||||||
<ul>
|
<ul>
|
||||||
{CATEGORIES.flatMap (cat => cat in tags ? (
|
{CATEGORIES.flatMap (cat => cat in tags ? (
|
||||||
@@ -104,6 +89,30 @@ export default (({ posts }: Props) => {
|
|||||||
}}>
|
}}>
|
||||||
ランダム
|
ランダム
|
||||||
</a>)}
|
</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>)}
|
</motion.div>)}
|
||||||
</AnimatePresence>
|
</AnimatePresence>
|
||||||
|
|
||||||
@@ -113,7 +122,7 @@ export default (({ posts }: Props) => {
|
|||||||
dark:text-gray-300 dark:hover:text-gray-100"
|
dark:text-gray-300 dark:hover:text-gray-100"
|
||||||
onClick={ev => {
|
onClick={ev => {
|
||||||
ev.preventDefault ()
|
ev.preventDefault ()
|
||||||
setTagsVsbl (!(tagsVsbl))
|
setTagsVsbl (v => !(v))
|
||||||
}}>
|
}}>
|
||||||
{tagsVsbl ? '▲▲▲ タグ一覧を閉じる ▲▲▲' : '▼▼▼ タグ一覧を表示 ▼▼▼'}
|
{tagsVsbl ? '▲▲▲ タグ一覧を閉じる ▲▲▲' : '▼▼▼ タグ一覧を表示 ▼▼▼'}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user