コミットを比較
2 コミット
a46d15467e
...
2e2a45d0a3
| 作成者 | SHA1 | 日付 | |
|---|---|---|---|
| 2e2a45d0a3 | |||
| e3aeed7f40 |
@@ -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>)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import toCamel from 'camelcase-keys'
|
import toCamel from 'camelcase-keys'
|
||||||
import { useState, useEffect } from 'react'
|
import { Fragment, useState, useEffect } from 'react'
|
||||||
import { Link, useLocation } from 'react-router-dom'
|
import { Link, useLocation } from 'react-router-dom'
|
||||||
|
|
||||||
import Separator from '@/components/MenuSeparator'
|
import Separator from '@/components/MenuSeparator'
|
||||||
@@ -138,9 +138,8 @@ export default ({ user }: Props) => {
|
|||||||
'bg-yellow-200 dark:bg-red-975 items-start')}>
|
'bg-yellow-200 dark:bg-red-975 items-start')}>
|
||||||
<Separator />
|
<Separator />
|
||||||
{menu.map ((item, i) => (
|
{menu.map ((item, i) => (
|
||||||
<>
|
<Fragment key={i}>
|
||||||
<Link key={i}
|
<Link to={i === openItemIdx ? item.to : '#'}
|
||||||
to={i === openItemIdx ? item.to : '#'}
|
|
||||||
className={cn ('w-full min-h-[40px] flex items-center pl-8',
|
className={cn ('w-full min-h-[40px] flex items-center pl-8',
|
||||||
((i === openItemIdx)
|
((i === openItemIdx)
|
||||||
&& 'font-bold bg-yellow-50 dark:bg-red-950'))}
|
&& 'font-bold bg-yellow-50 dark:bg-red-950'))}
|
||||||
@@ -163,7 +162,7 @@ export default ({ user }: Props) => {
|
|||||||
bg-yellow-50 dark:bg-red-950">
|
bg-yellow-50 dark:bg-red-950">
|
||||||
{subItem.name}
|
{subItem.name}
|
||||||
</Link>)))}
|
</Link>)))}
|
||||||
</>))}
|
</Fragment>))}
|
||||||
<TopNavUser user={user} sp />
|
<TopNavUser user={user} sp />
|
||||||
<Separator />
|
<Separator />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -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>)
|
||||||
}
|
}
|
||||||
|
|||||||
新しい課題から参照
ユーザをブロックする