mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 05:06:56 +08:00
📝 Docs: 商店详情卡片添加宽度限制与文本省略 (#2473)
This commit is contained in:
parent
abc3829c64
commit
bec74d85cd
@ -40,7 +40,7 @@ export default function Modal({
|
|||||||
onClick={() => backdropExit && onFadeOut()}
|
onClick={() => backdropExit && onFadeOut()}
|
||||||
/>
|
/>
|
||||||
<div className={clsx("nb-modal-container", transitionClass)}>
|
<div className={clsx("nb-modal-container", transitionClass)}>
|
||||||
<div className="card bg-base-100 shadow-xl">
|
<div className="card bg-base-100 shadow-xl max-w-2xl">
|
||||||
<div className="card-body">
|
<div className="card-body">
|
||||||
{!useCustomTitle && (
|
{!useCustomTitle && (
|
||||||
<div className="nb-modal-title">
|
<div className="nb-modal-title">
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
&-container {
|
&-container {
|
||||||
@apply absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 min-w-[400px] lg:min-w-[600px];
|
@apply absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 min-w-[400px] lg:min-w-[600px];
|
||||||
@apply p-8 opacity-0;
|
@apply opacity-0;
|
||||||
@apply transition-opacity duration-[225ms] ease-in-out delay-0;
|
@apply transition-opacity duration-[225ms] ease-in-out delay-0;
|
||||||
|
|
||||||
&.fade-in {
|
&.fade-in {
|
||||||
|
@ -37,14 +37,7 @@ export default function ResourceCard({
|
|||||||
const authorAvatar = `${authorLink}.png?size=80`;
|
const authorAvatar = `${authorLink}.png?size=80`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div className={clsx("resource-card-container", className)}>
|
||||||
className={clsx(
|
|
||||||
"resource-card-container",
|
|
||||||
onClick && "resource-card-container-clickable",
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
onClick={onClick}
|
|
||||||
>
|
|
||||||
<div className="resource-card-header">
|
<div className="resource-card-header">
|
||||||
<div className="resource-card-header-title">
|
<div className="resource-card-header-title">
|
||||||
{resource.name}
|
{resource.name}
|
||||||
@ -55,7 +48,7 @@ export default function ResourceCard({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="resource-card-header-expand">
|
<div className="resource-card-header-expand" onClick={onClick}>
|
||||||
<FontAwesomeIcon icon={["fas", "expand"]} />
|
<FontAwesomeIcon icon={["fas", "expand"]} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,10 +3,7 @@
|
|||||||
@apply flex flex-col gap-y-2 w-full min-h-[12rem] p-4;
|
@apply flex flex-col gap-y-2 w-full min-h-[12rem] p-4;
|
||||||
@apply transition-colors duration-500 bg-base-200;
|
@apply transition-colors duration-500 bg-base-200;
|
||||||
@apply border-2 border-base-200 rounded-lg;
|
@apply border-2 border-base-200 rounded-lg;
|
||||||
|
@apply hover:border-primary;
|
||||||
&-clickable {
|
|
||||||
@apply cursor-pointer hover:border-primary;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-header {
|
&-header {
|
||||||
@ -21,7 +18,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-expand {
|
&-expand {
|
||||||
@apply flex-none fill-current;
|
@apply flex-none fill-current cursor-pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ export default function ResourceDetailCard({ resource }: Props) {
|
|||||||
src={authorAvatar}
|
src={authorAvatar}
|
||||||
className="detail-card-avatar"
|
className="detail-card-avatar"
|
||||||
decoding="async"
|
decoding="async"
|
||||||
></img>
|
/>
|
||||||
<div className="detail-card-title">
|
<div className="detail-card-title">
|
||||||
<span className="detail-card-title-main">{resource.name}</span>
|
<span className="detail-card-title-main">{resource.name}</span>
|
||||||
<span className="detail-card-title-sub">{resource.author}</span>
|
<span className="detail-card-title-sub">{resource.author}</span>
|
||||||
@ -123,10 +123,7 @@ export default function ResourceDetailCard({ resource }: Props) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="detail-card-meta-item">
|
<div className="detail-card-meta-item">
|
||||||
<span>
|
<span>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon fixedWidth icon={["fas", "scale-balanced"]} />{" "}
|
||||||
className="fa-fw"
|
|
||||||
icon={["fas", "scale-balanced"]}
|
|
||||||
/>{" "}
|
|
||||||
{(pypiData && pypiData.info.license) || "无"}
|
{(pypiData && pypiData.info.license) || "无"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
@apply flex flex-col w-full lg:flex-row;
|
@apply flex flex-col w-full lg:flex-row;
|
||||||
|
|
||||||
&-left {
|
&-left {
|
||||||
@apply flex flex-col min-h-[150px] lg:basis-3/4;
|
@apply flex flex-col min-h-[150px] lg:basis-3/4 max-w-[65%];
|
||||||
}
|
}
|
||||||
|
|
||||||
&-divider {
|
&-divider {
|
||||||
@ -43,11 +43,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-right {
|
&-right {
|
||||||
@apply flex flex-col justify-start gap-y-2 lg:basis-1/4;
|
@apply flex flex-col justify-start gap-y-2 lg:basis-1/4 max-w-[45%];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-meta-item {
|
&-meta-item {
|
||||||
@apply text-sm whitespace-nowrap;
|
@apply text-sm truncate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user