Merge branch '#23'
This commit is contained in:
@@ -42,7 +42,7 @@ export default ({ status }: Props) => {
|
|||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<title>{title} | {SITE_TITLE}</title>
|
<title>{title} | {SITE_TITLE}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="text-2xl sm:text-4xl md:text-6xl font-bold text-transparent
|
<div className="text-6xl font-bold text-transparent
|
||||||
bg-[linear-gradient(90deg,#ff0000,#ff8800,#ffff00,#00ff00,#00ffff,#0000ff,#ff00ff,#ff0000)]
|
bg-[linear-gradient(90deg,#ff0000,#ff8800,#ffff00,#00ff00,#00ffff,#0000ff,#ff00ff,#ff0000)]
|
||||||
bg-clip-text bg-[length:200%_100%] animate-rainbow-scroll drop-shadow-[0_0_6px_black]
|
bg-clip-text bg-[length:200%_100%] animate-rainbow-scroll drop-shadow-[0_0_6px_black]
|
||||||
space-y-2 sm:space-y-4 md:space-y-6 text-center flex flex-col justify-center items-center"
|
space-y-2 sm:space-y-4 md:space-y-6 text-center flex flex-col justify-center items-center"
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ const TagSearch: React.FC = () => {
|
|||||||
}, [location.search])
|
}, [location.search])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative w-full mb-4">
|
<div className="relative w-full">
|
||||||
<input type="text"
|
<input type="text"
|
||||||
placeholder="タグ検索..."
|
placeholder="タグ検索..."
|
||||||
value={search}
|
value={search}
|
||||||
|
|||||||
@@ -8,10 +8,11 @@ import SectionTitle from '@/components/common/SectionTitle'
|
|||||||
import SidebarComponent from '@/components/layout/SidebarComponent'
|
import SidebarComponent from '@/components/layout/SidebarComponent'
|
||||||
import { API_BASE_URL } from '@/config'
|
import { API_BASE_URL } from '@/config'
|
||||||
import { CATEGORIES } from '@/consts'
|
import { CATEGORIES } from '@/consts'
|
||||||
|
import { cn } from '@/lib/utils'
|
||||||
|
|
||||||
import type { Post, Tag } from '@/types'
|
import type { Post, Tag } from '@/types'
|
||||||
|
|
||||||
type TagByCategory = { [key: string]: Tag[] }
|
type TagByCategory = Record<string, Tag[]>
|
||||||
|
|
||||||
type Props = { posts: Post[] }
|
type Props = { posts: Post[] }
|
||||||
|
|
||||||
@@ -19,6 +20,7 @@ type Props = { posts: Post[] }
|
|||||||
export default ({ posts }: Props) => {
|
export default ({ posts }: Props) => {
|
||||||
const navigate = useNavigate ()
|
const navigate = useNavigate ()
|
||||||
|
|
||||||
|
const [tagsVsbl, setTagsVsbl] = useState (false)
|
||||||
const [tags, setTags] = useState<TagByCategory> ({ })
|
const [tags, setTags] = useState<TagByCategory> ({ })
|
||||||
|
|
||||||
const location = useLocation ()
|
const location = useLocation ()
|
||||||
@@ -57,6 +59,7 @@ export default ({ posts }: Props) => {
|
|||||||
return (
|
return (
|
||||||
<SidebarComponent>
|
<SidebarComponent>
|
||||||
<TagSearch />
|
<TagSearch />
|
||||||
|
<div className={cn (!(tagsVsbl) && 'hidden', 'md:block mt-4')}>
|
||||||
<SectionTitle>タグ</SectionTitle>
|
<SectionTitle>タグ</SectionTitle>
|
||||||
<ul>
|
<ul>
|
||||||
{CATEGORIES.flatMap (cat => cat in tags ? (
|
{CATEGORIES.flatMap (cat => cat in tags ? (
|
||||||
@@ -86,5 +89,14 @@ export default ({ posts }: Props) => {
|
|||||||
}}>
|
}}>
|
||||||
ランダム
|
ランダム
|
||||||
</a>)}
|
</a>)}
|
||||||
|
</div>
|
||||||
|
<a href="#"
|
||||||
|
className="md:hidden block my-2 text-center text-sm text-gray-500"
|
||||||
|
onClick={ev => {
|
||||||
|
ev.preventDefault ()
|
||||||
|
setTagsVsbl (!(tagsVsbl))
|
||||||
|
}}>
|
||||||
|
{tagsVsbl ? '▲▲▲ タグ一覧を閉じる ▲▲▲' : '▼▼▼ タグ一覧を表示 ▼▼▼'}
|
||||||
|
</a>
|
||||||
</SidebarComponent>)
|
</SidebarComponent>)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ export default () => {
|
|||||||
: `${ SITE_TITLE } 〜 ぼざろクリーチャーシリーズ綜合リンク集サイト`}
|
: `${ SITE_TITLE } 〜 ぼざろクリーチャーシリーズ綜合リンク集サイト`}
|
||||||
</title>
|
</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="hidden md:block">
|
|
||||||
<TagSidebar posts={posts.slice (0, 20)} />
|
<TagSidebar posts={posts.slice (0, 20)} />
|
||||||
</div>
|
|
||||||
<MainArea>
|
<MainArea>
|
||||||
<TabGroup>
|
<TabGroup>
|
||||||
<Tab name="広場">
|
<Tab name="広場">
|
||||||
@@ -120,8 +120,5 @@ export default () => {
|
|||||||
</Tab>)}
|
</Tab>)}
|
||||||
</TabGroup>
|
</TabGroup>
|
||||||
</MainArea>
|
</MainArea>
|
||||||
<div className="md:hidden">
|
|
||||||
<TagSidebar posts={posts.slice (0, 20)} />
|
|
||||||
</div>
|
|
||||||
</div>)
|
</div>)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user