feat: change block-1's feature buttons

This commit is contained in:
llx_changed
2023-04-22 23:03:50 +08:00
parent 07c64c0083
commit 803e13f907
2 changed files with 59 additions and 29 deletions
+35 -27
View File
@@ -1,28 +1,29 @@
import i18next from 'i18next';
import { useTranslation } from 'react-i18next';
import cn from 'classnames';
import Container from '../basic/container';
import Button from '../basic/button';
import Icon from '../basic/icon';
import s from './index.module.css';
import blockBgEn from '../../assets/block-1-en.png';
import blockBgZh from '../../assets/block-1-cn.png';
import ChimpDialog from '../chimp-dialog';
import { useState } from 'react';
import i18next from "i18next";
import { useTranslation } from "react-i18next";
import cn from "classnames";
import Container from "../basic/container";
import Button from "../basic/button";
import Icon from "../basic/icon";
import s from "./index.module.css";
import blockBgEn from "../../assets/block-1-en.png";
import blockBgZh from "../../assets/block-1-cn.png";
// import ChimpDialog from "../chimp-dialog";
// import { useState } from "react";
const Block1 = () => {
const { t } = useTranslation();
const local = i18next.language;
const [isChimpVisible, setIsChimpVisible] = useState(false)
// const [isChimpVisible, setIsChimpVisible] = useState(false);
// const [githubText, setGithubText] = useState(t("Github"));
return (
<Container className={s.container}>
<div className={s.top}>
<div className={s.alph}>
<Button size="small">
<Icon type="horn" className={s.r} />
{t('内测进行中')}
{t("内测进行中")}
</Button>
<div className={s.text}>{t('Inside announcement text')}</div>
<div className={s.text}>{t("Inside announcement text")}</div>
{/* <a
className={s.link}
target="_blank"
@@ -35,27 +36,31 @@ const Block1 = () => {
<Icon type="arrow-blue-left" className={s.l} />
</a> */}
</div>
<div className={s.title}>{t('10 倍速创作你的 AI 应用')}</div>
<div className={s.title}>{t("10 倍速创作你的 AI 应用")}</div>
<div className={s.tip}>
{t(
'快速、直观地开发可运营的 GPT 应用。即使是非开发人员也能轻松完成。'
"快速、直观地开发可运营的 GPT 应用。即使是非开发人员也能轻松完成。"
)}
</div>
<div className={s.tip}>
{t('LangGenius 正在进步成为最好的开源 LLMOps 平台。')}
{t("LangGenius 正在进步成为最好的开源 LLMOps 平台。")}
</div>
<div className={s.btn}>
{/* <Button
<Button
size="large"
type="white"
onMouseEnter={() => setGithubText("Coming soon")}
onMouseLeave={() => setGithubText(" Github ")}
onClick={() =>
window.open("https://github.com/langgenius/langgenius", "_blank")
}
>
<Icon type="github" className={s.btnicon} />
{githubText}
</Button> */}
<Button size="large" onClick={() => setIsChimpVisible(true)}>
{t('参与内测')}
Github
</Button>
<Button
size="large"
onClick={() => window.open("https://cloud.langgenius.ai", "_blank")}
>
{t("体验云服务")}
{/* <div className={s.coming}>{t('即将上线')}</div> */}
</Button>
</div>
@@ -63,12 +68,15 @@ const Block1 = () => {
<div className={s.imgcontainer}>
<img
alt=""
src={local === 'zh' ? blockBgZh : blockBgEn}
src={local === "zh" ? blockBgZh : blockBgEn}
className={s.img}
/>
<div className={cn(s.imgsmall, local === 'zh' ? s.zh : s.en)} />
<div className={cn(s.imgsmall, local === "zh" ? s.zh : s.en)} />
</div>
<ChimpDialog open={isChimpVisible} onClose={() => setIsChimpVisible(false)} />
{/* <ChimpDialog
open={isChimpVisible}
onClose={() => setIsChimpVisible(false)}
/> */}
</Container>
);
};
+24 -2
View File
@@ -1986,6 +1986,11 @@
resolved "https://registry.npmmirror.com/@types/json5/-/json5-0.0.29.tgz"
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
"@types/jsonp@^0.2.1":
version "0.2.1"
resolved "https://registry.npmmirror.com/@types/jsonp/-/jsonp-0.2.1.tgz#3e97f694546bcfaa6dc4fd869302b1469836b651"
integrity sha512-5OZzjBntljpajg4RmydvZEyYCjiVVq6AZOm/TVIxSb7FiySOur3B/YcUEtdoy01FEzwiiUP7qLtUE6qiOF/kfQ==
"@types/mime@*":
version "3.0.1"
resolved "https://registry.npmmirror.com/@types/mime/-/mime-3.0.1.tgz"
@@ -2111,6 +2116,11 @@
resolved "https://registry.npmmirror.com/@types/trusted-types/-/trusted-types-2.0.3.tgz"
integrity sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==
"@types/validator@^13.7.14":
version "13.7.15"
resolved "https://registry.npmmirror.com/@types/validator/-/validator-13.7.15.tgz#408c99d1b5f0eecc78109c11f896f72d1f026a10"
integrity sha512-yeinDVQunb03AEP8luErFcyf/7Lf7AzKCD0NXfgVoGCCQDNpZET8Jgq74oBgqKld3hafLbfzt/3inUdQvaFeXQ==
"@types/ws@^8.5.1":
version "8.5.4"
resolved "https://registry.npmmirror.com/@types/ws/-/ws-8.5.4.tgz"
@@ -3520,9 +3530,9 @@ data-urls@^2.0.0:
whatwg-mimetype "^2.3.0"
whatwg-url "^8.0.0"
debug@2.6.9, debug@^2.6.0:
debug@2.6.9, debug@^2.1.3, debug@^2.6.0:
version "2.6.9"
resolved "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz"
resolved "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
dependencies:
ms "2.0.0"
@@ -5945,6 +5955,13 @@ jsonfile@^6.0.1:
optionalDependencies:
graceful-fs "^4.1.6"
jsonp@^0.2.1:
version "0.2.1"
resolved "https://registry.npmmirror.com/jsonp/-/jsonp-0.2.1.tgz#a65b4fa0f10bda719a05441ea7b94c55f3e15bae"
integrity sha512-pfog5gdDxPdV4eP7Kg87M8/bHgshlZ5pybl+yKxAnCZ5O7lCIn7Ixydj03wOlnDQesky2BPyA91SQ+5Y/mNwzw==
dependencies:
debug "^2.1.3"
jsonpointer@^5.0.0:
version "5.0.1"
resolved "https://registry.npmmirror.com/jsonpointer/-/jsonpointer-5.0.1.tgz"
@@ -8742,6 +8759,11 @@ v8-to-istanbul@^8.1.0:
convert-source-map "^1.6.0"
source-map "^0.7.3"
validator@^13.9.0:
version "13.9.0"
resolved "https://registry.npmmirror.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855"
integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==
vary@~1.1.2:
version "1.1.2"
resolved "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz"