Skip to content

Commit

Permalink
fix: home page button
Browse files Browse the repository at this point in the history
  • Loading branch information
MakinoharaShoko committed Sep 8, 2024
1 parent 2c5554d commit 3fe0ba2
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 16 deletions.
3 changes: 2 additions & 1 deletion app/[locale]/components/Feat/Feat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const Feat = () => {
<div className={styles.info}>
<p>{t('openSource.line0')}</p>
<p>{t('openSource.line1')}</p>
<a href={'https://github.com/OpenWebGAL/WebGAL'} target={'_blank'}>{t('openSource.repo')}</a>
</div>
</div>
<div className={styles.card}>
Expand All @@ -40,4 +41,4 @@ const Feat = () => {
)
}

export default Feat
export default Feat
10 changes: 5 additions & 5 deletions app/[locale]/components/TopVisual/TopVisual.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ const TopVisual = () => {
<h1 className={'text-5xl font-bold'} style={{display: 'block'}}>{t('title-l2')}</h1>
<p className={'text-lg'}>{t('subTitle')}</p>
<div className={'flex flex-row items-center gap-4 flex-wrap'}>
<Button>
<Button large>
<Link href={`/${locale}/download/`}>{t('nowDownload')}</Link>
</Button>
<Button>
<Link href={`https://docs.openwebgal.com${docsLocale}/sponsor/`}>{t('sponsor')}</Link>
</Button>
<Button>
<Button large>
<Link href={docsRedirect('/')} target={'_blank'}>{t('viewDocument')}</Link>
</Button>
<Button large>
<Link href={`https://docs.openwebgal.com${docsLocale}/sponsor/`}>{t('sponsor')}</Link>
</Button>
</div>
<div className={'flex flex-row justify-center items-center gap-4 pt-2'}>
<a
Expand Down
7 changes: 6 additions & 1 deletion components/Button/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@

.btn-terre {
@apply bg-terre
}
}

.btn-large {
font-size: 125%;
padding: 7px 15px;
}
7 changes: 4 additions & 3 deletions components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import styles from './Button.module.css'

interface Props extends React.ButtonHTMLAttributes<HTMLButtonElement> {
terre?: boolean;
large?: boolean;
children: React.ReactNode;
}

Expand All @@ -10,16 +11,16 @@ interface Props extends React.ButtonHTMLAttributes<HTMLButtonElement> {
* @param terre 传入 terre 按钮将会变为 terre 配色
* @returns
*/
const Button = ({ terre, children, ...attributes }: Props) => {
const Button = ({ terre, large=false, children, ...attributes }: Props) => {
return (
<button
type="button"
className={`${styles.btn} ${terre ? styles['btn-terre'] : styles['btn-webgal']}`}
className={`${styles.btn} ${terre ? styles['btn-terre'] : styles['btn-webgal']} ${large ? styles['btn-large'] :''}`}
{...attributes}
>
{children}
</button>
)
}

export default Button
export default Button
5 changes: 3 additions & 2 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"title-l2": "who needs coding?",
"subTitle": "Without writing any code, WebGAL will help you create fully functional visual novels with beautiful UI.",
"nowDownload": "Download",
"viewDocument": "Documents",
"viewDocument": "View help documentation",
"sponsor": "Sponsor"
},
"games": {
Expand Down Expand Up @@ -69,7 +69,8 @@
"openSource": {
"title": "Open Source",
"line0": "WebGAL and WebGAL Terre are licensed under the MPL-2.0",
"line1": "Free to use for commercial and non-commercial projects"
"line1": "Free to use for commercial and non-commercial projects",
"repo": "View WebGAL source code repository"
},
"multiplatform": {
"title": "Multi Platform",
Expand Down
5 changes: 3 additions & 2 deletions locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"title-l2": "ビジュアルノベルを作成!",
"subTitle": "WebGALを使えば、コードを一切書かずに、高機能で美しいインターフェースのビジュアルノベルゲームを作成できます。",
"nowDownload": "今すぐダウンロード",
"viewDocument": "ドキュメントに移動",
"viewDocument": "ヘルプドキュメントを見る",
"sponsor": "スポンサー"
},
"games": {
Expand Down Expand Up @@ -69,7 +69,8 @@
"openSource": {
"title": "オープンソース & 商業利用フリー",
"line0": "WebGAL および WebGAL Terre は MPL-2.0 の下でライセンスされている",
"line1": "商用・非商用問わず無料"
"line1": "商用・非商用問わず無料",
"repo": "WebGAL ソースコードリポジトリを見る"
},
"multiplatform": {
"title": "マルチプラットフォームのサポート",
Expand Down
5 changes: 3 additions & 2 deletions locales/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"title-l2": "何须会编程?",
"subTitle": "无需编写任何代码,WebGAL 将帮助你制作出功能完备、界面美观的视觉小说游戏。",
"nowDownload": "立即下载",
"viewDocument": "查看文档",
"viewDocument": "查看帮助文档",
"sponsor": "赞助 WebGAL"
},
"games": {
Expand Down Expand Up @@ -69,7 +69,8 @@
"openSource": {
"title": "开源免费",
"line0": "WebGAL 和 WebGAL Terre 采用 MPL-2.0 开源许可",
"line1": "可免费用于商业项目和非商业项目"
"line1": "可免费用于商业项目和非商业项目",
"repo": "查看 WebGAL 源代码仓库"
},
"multiplatform": {
"title": "多平台支持",
Expand Down

0 comments on commit 3fe0ba2

Please sign in to comment.