重新排版优化

This commit is contained in:
tangly1024
2021-10-14 17:36:39 +08:00
parent 6f5e1b3f39
commit a07894bd46
20 changed files with 184 additions and 168 deletions

15
components/TagItemMini.js Normal file
View File

@@ -0,0 +1,15 @@
import Link from 'next/link'
const TagItemMini = ({ tag, selected = false, count }) => (
<Link key={tag} href={selected ? '/' : `/tag/${encodeURIComponent(tag)}`}>
<span
className={`cursor-pointer inline-block border hover:bg-gray-300 duration-200 mr-1 my-1 p-1 font-medium font-light text-xs whitespace-nowrap
dark:text-gray-300 dark:hover:bg-gray-800 ${selected ? 'text-white bg-black dark:hover:bg-gray-900 dark:bg-black dark:border-gray-800' : 'bg-gray-200 text-gray-600 dark:bg-gray-600 dark:border-gray-600'
}`}
>
<a> {tag + (count ? `(${count})` : '')} </a>
</span>
</Link>
)
export default TagItemMini