Skip to content

Commit

Permalink
♿ fix ul li hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
yokinist committed Sep 11, 2021
1 parent 06300c5 commit 0882992
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions components/Tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@ const Tags = ({ tags, currentTag }) => {
{Object.keys(tags).map(key => {
const selected = key === currentTag
return (
<Link key={key} href={selected ? '/search' : `/tag/${encodeURIComponent(key)}`}>
<a>
<li
className={`mr-3 py-2 font-medium border px-4 whitespace-nowrap dark:text-gray-300 ${
selected
? 'text-white bg-black border-black dark:bg-gray-600 dark:border-gray-600'
: 'bg-gray-100 border-gray-100 text-gray-400 dark:bg-night dark:border-gray-800'
}`}
>
<li
key={key}
className={`mr-3 font-medium border whitespace-nowrap dark:text-gray-300 ${
selected
? 'text-white bg-black border-black dark:bg-gray-600 dark:border-gray-600'
: 'bg-gray-100 border-gray-100 text-gray-400 dark:bg-night dark:border-gray-800'
}`}
>
<Link
key={key}
href={selected ? '/search' : `/tag/${encodeURIComponent(key)}`}
>
<a className="px-4 py-2 block">
{`${key} (${tags[key]})`}
</li>
</a>
</Link>
</a>
</Link>
</li>
)
})}
</ul>
Expand Down

0 comments on commit 0882992

Please sign in to comment.