修改create tab顺序以及默认,文章微调

This commit is contained in:
liangzai 2024-10-09 00:16:44 +08:00
parent cc27475304
commit 04216a519b
3 changed files with 19 additions and 19 deletions

View File

@ -81,8 +81,8 @@ export default async function ArticleList({ params, searchParams }) {
<Link href={`/article/${item.id}`}> <Link href={`/article/${item.id}`}>
<Image <Image
src={item["image_url"]} src={item["image_url"]}
width={1920} width={960}
height={1080} height={960}
alt={item[`${locale}_keywords`].join()} alt={item[`${locale}_keywords`].join()}
className="w-full h-48 object-cover" className="w-full h-48 object-cover"
/> />

View File

@ -49,14 +49,14 @@ export default async function Article({ params }) {
{title} {title}
</h2> </h2>
</div> </div>
{/*
<Image <Image
src={imgUrl} src={imgUrl}
alt={keyword} alt={keyword}
width={1920} width={1920}
height={1080} height={1080}
className="w-[90%] lg:w-[85%] xl:w-[75%] mx-auto my-4" className="w-[90%] lg:w-[85%] xl:w-[75%] mx-auto my-4"
/> /> */}
<article className="w-[90%] lg:w-[85%] xl:w-[75%] mx-auto space-y-6"> <article className="w-[90%] lg:w-[85%] xl:w-[75%] mx-auto space-y-6">
<section> <section>

View File

@ -11,7 +11,7 @@ import ImageVideo from "./imageVideo";
import { useTranslations } from "next-intl"; import { useTranslations } from "next-intl";
export default function CreateTabs() { export default function CreateTabs() {
const t = useTranslations("createTabs"); const t = useTranslations("createTabs");
const [tabVal, setTabVal] = useState("text"); const [tabVal, setTabVal] = useState("tiktok");
const tabsChange = (val: string) => { const tabsChange = (val: string) => {
setTabVal(val); setTabVal(val);
}; };
@ -23,20 +23,6 @@ export default function CreateTabs() {
} }
}; };
const tabs = [ const tabs = [
{
name: t("aiTextVideoGenerator"),
value: "text",
component: <TextVideo />,
videoTemp:
"https://file.typeframes.com.cn/img-to-video/cn/demo_video.webm",
},
{
name: t("aiImageVideoGenerator"),
value: "image",
component: <ImageVideo />,
videoTemp:
"https://file.typeframes.com.cn/img-to-video/cn/demo_image.webm",
},
{ {
name: t("aiTiktokVideoGenerator"), name: t("aiTiktokVideoGenerator"),
value: "tiktok", value: "tiktok",
@ -64,6 +50,20 @@ export default function CreateTabs() {
ImageTemp: ImageTemp:
"https://file.typeframes.com.cn/music-to-video/cn/demo_video.webm", "https://file.typeframes.com.cn/music-to-video/cn/demo_video.webm",
}, },
{
name: t("aiTextVideoGenerator"),
value: "text",
component: <TextVideo />,
videoTemp:
"https://file.typeframes.com.cn/img-to-video/cn/demo_video.webm",
},
{
name: t("aiImageVideoGenerator"),
value: "image",
component: <ImageVideo />,
videoTemp:
"https://file.typeframes.com.cn/img-to-video/cn/demo_image.webm",
},
]; ];
return ( return (