feat: optimize ui, but minor

This commit is contained in:
Ou 2024-11-24 23:53:23 +08:00
parent 3f4bdde790
commit c2f814fb88
2 changed files with 5 additions and 5 deletions

View File

@ -109,7 +109,7 @@ function NewsCard({ id, setHandleRef }: NewsCardProps) {
<div className={$("flex justify-between mx-2 mt-0 mb-2 items-center")}> <div className={$("flex justify-between mx-2 mt-0 mb-2 items-center")}>
<div className="flex gap-2 items-center"> <div className="flex gap-2 items-center">
<a <a
className={$("w-8 h-8 rounded-full bg-cover hover:animate-spin")} className={$("w-8 h-8 rounded-full bg-cover")}
target="_blank" target="_blank"
href={sources[id].home} href={sources[id].home}
title={sources[id].desc} title={sources[id].desc}
@ -228,7 +228,7 @@ function NewsUpdatedTime({ date }: { date: string | number }) {
function NewsListHot({ items }: { items: NewsItem[] }) { function NewsListHot({ items }: { items: NewsItem[] }) {
const { width } = useWindowSize() const { width } = useWindowSize()
return ( return (
<> <ol className="flex flex-col gap-2">
{items?.map((item, i) => ( {items?.map((item, i) => (
<a <a
href={width < 768 ? item.mobileUrl || item.url : item.url} href={width < 768 ? item.mobileUrl || item.url : item.url}
@ -236,7 +236,7 @@ function NewsListHot({ items }: { items: NewsItem[] }) {
key={item.id} key={item.id}
title={item.extra?.hover} title={item.extra?.hover}
className={$( className={$(
"flex gap-2 items-center mb-2 items-stretch relative", "flex gap-2 items-center items-stretch relative",
"hover:bg-neutral-400/10 rounded-md pr-1 visited:(text-neutral-400)", "hover:bg-neutral-400/10 rounded-md pr-1 visited:(text-neutral-400)",
)} )}
> >
@ -254,7 +254,7 @@ function NewsListHot({ items }: { items: NewsItem[] }) {
</span> </span>
</a> </a>
))} ))}
</> </ol>
) )
} }

View File

@ -36,7 +36,7 @@ export function Menu() {
} }
</span> </span>
{shown && ( {shown && (
<div className="absolute right-0 z-99 bg-transparent pt-8 top-0"> <div className="absolute right-0 z-99 bg-transparent pt-4 top-4">
<motion.div <motion.div
id="dropdown-menu" id="dropdown-menu"
className={$([ className={$([