Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update some content for website #1814

Merged
merged 4 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 22 additions & 17 deletions docs/website/components/index/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface Card {
interface Brand {
brandLogo: string
brandTitle: string
brandUrl: string
}

interface Blog {
Expand Down Expand Up @@ -72,6 +73,21 @@ const Index = ({
// Function to check if the string contains Chinese characters
const containsChinese = (text: string) => /[\u4e00-\u9fa5]/.test(text)

// Define phrases to highlight for Chinese text
const phrasesToHighlightForFeaturesChinese = ['比特币生态']
const phrasesToHighlightForExploreChinese = ['状态', '应用']
const phrasesToHighlightForEcosystemChinese = ['合作伙伴']
const phrasesToHighlightForBlogsChinese = ['博客']

// Define phrases to highlight for English text
const phrasesToHighlightForFeaturesEnglish = ['Bitcoin', 'Ecosystem']
const phrasesToHighlightForExploreEnglish = ['State', 'App']
const phrasesToHighlightForEcosystemEnglish = ['Partnerships']
const phrasesToHighlightForBlogsEnglish = ['Blog']

const highlightColor = '#FF914B'
const highlightColorForExplore = '#46977E'

const highlightSpecificPhrases = (
text: string,
phrasesToHighlight: string[],
Expand All @@ -92,6 +108,7 @@ const Index = ({
highlightColor: string,
) => {
if (containsChinese(title)) {
return highlightSpecificPhrases(title, phrasesToHighlightChinese, highlightColor)
} else {
const words = title.split(' ')
return (
Expand All @@ -115,21 +132,6 @@ const Index = ({
window.open(href)
}

// Define phrases to highlight for Chinese text
const phrasesToHighlightForFeaturesChinese = ['比特币生态']
const phrasesToHighlightForExploreChinese = ['状态', '应用']
const phrasesToHighlightForEcosystemChinese = ['合作伙伴']
const phrasesToHighlightForBlogsChinese = ['博客']

// Define phrases to highlight for English text
const phrasesToHighlightForFeaturesEnglish = ['Bitcoin', 'Ecosystem']
const phrasesToHighlightForExploreEnglish = ['State', 'App']
const phrasesToHighlightForEcosystemEnglish = ['Partnerships']
const phrasesToHighlightForBlogsEnglish = ['Blog']

const highlightColor = '#FF914B'
const highlightColorForExplore = '#46977E'

return (
<>
<div className="antialiased">
Expand Down Expand Up @@ -309,7 +311,10 @@ const Index = ({
<div className="flex items-center justify-center w-full mt-2">
<div className="grid grid-cols-2 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4 justify-items-center">
{ecosystemBrand.map((brand) => (
<button className="relative bg-white dark:bg-inherit rounded-full md:rounded-lg p-4 flex flex-row md:flex-col items-center md:justify-center justify-start border border-1 border-b-[6px] border-black dark:border-white active:border-b-4 active:transform active:translate-y-0.5 transition-all shadow-sm w-full h-14 md:w-52 md:h-32 gap-2 hover:cursor-default hover:shadow-md">
<button
className="relative bg-white dark:bg-inherit rounded-full md:rounded-lg p-4 flex flex-row md:flex-col items-center md:justify-center justify-start border border-1 border-b-[6px] border-black dark:border-white active:border-b-4 active:transform active:translate-y-0.5 transition-all shadow-sm w-full h-14 md:w-52 md:h-32 gap-2 hover:cursor-pointer hover:shadow-md"
onClick={() => handleButtonOnClick(brand.brandUrl)}
>
<Image
src={brand.brandLogo}
alt={brand.brandTitle}
Expand Down Expand Up @@ -345,7 +350,7 @@ const Index = ({
<img
src={blog.image}
alt={blog.title}
className="h-[200px] w-full object-fill rounded-lg"
className="h-full w-full object-cover rounded-lg"
/>
</div>
<div className="flex flex-col p-6 md:p-8 w-full justify-between">
Expand Down
21 changes: 18 additions & 3 deletions docs/website/pages/index.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import Index from '../components/index'
{
title: 'For Communities',
description:
'If you have eves on any assets, all Rooch-powered assets are native Bitcoin assets that you can leap back to Bitcoin at any time',
'If you have eyes on any assets, all Rooch-powered assets are native Bitcoin assets that you can leap back to Bitcoin at any time',
logo: '/logo/features/secure_logo.svg',
buttonHref: 'https://discord.gg/rooch',
buttonDesc: 'Join Discord',
Expand Down Expand Up @@ -73,62 +73,77 @@ import Index from '../components/index'
{
brandLogo: '/logo/ecosystem/babylon_logo.svg',
brandTitle: 'Babylon',
brandUrl: 'https://babylonchain.io/',
},
{
brandLogo: 'logo/ecosystem/meson_finance_logo.svg',
brandTitle: 'Meson Finance',
brandUrl: 'https://meson.fi/',
},
{
brandLogo: 'logo/ecosystem/supra_logo.svg',
brandTitle: 'Supra',
brandUrl: 'https://supra.com/',
},
{
brandLogo: 'logo/ecosystem/obelisk_logo.svg',
brandTitle: 'Obelisk',
brandUrl: 'https://obelisk.build/',
},
{
brandLogo: 'logo/ecosystem/nervos_logo.svg',
brandTitle: 'Nervos',
brandUrl: 'https://www.nervos.org/',
},
{
brandLogo: 'logo/ecosystem/block_vision_logo.svg',
brandTitle: 'BlockVision',
brandUrl: 'https://blockvision.org/',
},
{
brandLogo: 'logo/ecosystem/avail_logo.svg',
brandTitle: 'Avail',
brandUrl: 'https://www.availproject.org/',
},
{
brandLogo: 'logo/ecosystem/ankr_logo.svg',
brandTitle: 'Ankr',
brandUrl: 'https://www.ankr.com/',
},
{
brandLogo: 'logo/ecosystem/ez_swap_logo.svg',
brandTitle: 'EzSwap',
brandUrl: 'https://linktr.ee/EZswapProtocol',
},
{
brandLogo: 'logo/ecosystem/wisp_swap_logo.svg',
brandTitle: 'Wisp Swap',
brandUrl: 'https://linktr.ee/wispswap',
},
{
brandLogo: 'logo/ecosystem/okx_wallet_logo.svg',
brandTitle: 'OKX Wallet',
brandUrl: 'https://www.okx.com/zh-hans/web3',
},
{
brandLogo: 'logo/ecosystem/unisat_logo.svg',
brandTitle: 'Unisat',
brandUrl: 'https://unisat.io/',
},
{
brandLogo: 'logo/ecosystem/joyid_logo.svg',
brandTitle: 'JoyID Passkey',
brandUrl: 'https://linktr.ee/joyidpasskey',
},
{
brandLogo: 'logo/ecosystem/surf_wallet_logo.svg',
brandTitle: 'Surf Wallet',
brandUrl: 'https://linktr.ee/surfwallet',
},
{
brandLogo: 'logo/ecosystem/move_bit_logo.svg',
brandTitle: 'Movebit',
brandUrl: 'https://www.movebit.xyz/',
},
]}
blogsTitle="Rooch Blog"
Expand All @@ -137,7 +152,7 @@ import Index from '../components/index'
title: 'Rooch Network - The Application Layer of Bitcoin',
date: 'April 24, 2024',
link: 'https://rooch.network/blog/the-application-layer-of-bitcoin',
image: '/logo/blogs/blog_1.jpeg',
image: '/logo/blogs/blog_1.jpg',
},
{
title: 'Stackable L2 — A New Scaling Solution',
Expand All @@ -149,7 +164,7 @@ import Index from '../components/index'
title: 'RoochBTC - On - Chain Indexer as Bitcoin L2',
date: 'January 3, 2024',
link: 'https://rooch.network/blog/rooch-btc',
image: '/logo/blogs/blog_3.jpeg',
image: '/logo/blogs/blog_3.jpg',
},
]}
/>
21 changes: 18 additions & 3 deletions docs/website/pages/index.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Index from '../components/index'
<Index
heroTitle="开启比特币经济的无限可能"
heroSlogan=""
heroDescription="Rooch Network 是比特币生态的原生应用层,基于可堆叠式的二层方案实现,致力于为用户和开发者提供一站式的比特币资产发行平台和比特币应用基础设施设施"
heroDescription="Rooch Network 是比特币生态的原生应用层,基于可堆叠式的二层方案实现,致力于为用户和开发者提供一站式的比特币资产发行平台和比特币应用基础设施"
heroButton="动手开发"
heroButtonHref="/learn/welcome"
featuresTitle="比特币生态的原生应用层"
Expand Down Expand Up @@ -71,62 +71,77 @@ import Index from '../components/index'
{
brandLogo: '/logo/ecosystem/babylon_logo.svg',
brandTitle: 'Babylon',
brandUrl: 'https://babylonchain.io/',
},
{
brandLogo: 'logo/ecosystem/meson_finance_logo.svg',
brandTitle: 'Meson Finance',
brandUrl: 'https://meson.fi/',
},
{
brandLogo: 'logo/ecosystem/supra_logo.svg',
brandTitle: 'Supra',
brandUrl: 'https://supra.com/',
},
{
brandLogo: 'logo/ecosystem/obelisk_logo.svg',
brandTitle: 'Obelisk',
brandUrl: 'https://obelisk.build/',
},
{
brandLogo: 'logo/ecosystem/nervos_logo.svg',
brandTitle: 'Nervos',
brandUrl: 'https://www.nervos.org/',
},
{
brandLogo: 'logo/ecosystem/block_vision_logo.svg',
brandTitle: 'BlockVision',
brandUrl: 'https://blockvision.org/',
},
{
brandLogo: 'logo/ecosystem/avail_logo.svg',
brandTitle: 'Avail',
brandUrl: 'https://www.availproject.org/',
},
{
brandLogo: 'logo/ecosystem/ankr_logo.svg',
brandTitle: 'Ankr',
brandUrl: 'https://www.ankr.com/',
},
{
brandLogo: 'logo/ecosystem/ez_swap_logo.svg',
brandTitle: 'EzSwap',
brandUrl: 'https://linktr.ee/EZswapProtocol',
},
{
brandLogo: 'logo/ecosystem/wisp_swap_logo.svg',
brandTitle: 'Wisp Swap',
brandUrl: 'https://linktr.ee/wispswap',
},
{
brandLogo: 'logo/ecosystem/okx_wallet_logo.svg',
brandTitle: 'OKX Wallet',
brandUrl: 'https://www.okx.com/zh-hans/web3',
},
{
brandLogo: 'logo/ecosystem/unisat_logo.svg',
brandTitle: 'Unisat',
brandUrl: 'https://unisat.io/',
},
{
brandLogo: 'logo/ecosystem/joyid_logo.svg',
brandTitle: 'JoyID Passkey',
brandUrl: 'https://linktr.ee/joyidpasskey',
},
{
brandLogo: 'logo/ecosystem/surf_wallet_logo.svg',
brandTitle: 'Surf Wallet',
brandUrl: 'https://linktr.ee/surfwallet',
},
{
brandLogo: 'logo/ecosystem/move_bit_logo.svg',
brandTitle: 'Movebit',
brandUrl: 'https://www.movebit.xyz/',
},
]}
blogsTitle="Rooch 博客"
Expand All @@ -135,7 +150,7 @@ import Index from '../components/index'
title: 'Rooch Network - Bitcoin 的应用层',
date: '2024年4月24日',
link: 'https://rooch.network/blog/the-application-layer-of-bitcoin',
image: '/logo/blogs/blog_1.jpeg',
image: '/logo/blogs/blog_1.jpg',
},
{
title: 'Stackable L2 — 一种新的区块链扩容方案',
Expand All @@ -147,7 +162,7 @@ import Index from '../components/index'
title: 'RoochBTC - 用链上索引器实现比特币二层',
date: '2024年1月3日',
link: 'https://rooch.network/blog/rooch-btc',
image: '/logo/blogs/blog_3.jpeg',
image: '/logo/blogs/blog_3.jpg',
},
]}
/>
Binary file removed docs/website/public/logo/blogs/blog_1.jpeg
Binary file not shown.
Binary file added docs/website/public/logo/blogs/blog_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions docs/website/public/logo/blogs/blog_1.svg

This file was deleted.

Binary file modified docs/website/public/logo/blogs/blog_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions docs/website/public/logo/blogs/blog_2.svg

This file was deleted.

Binary file removed docs/website/public/logo/blogs/blog_3.jpeg
Binary file not shown.
Binary file added docs/website/public/logo/blogs/blog_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions docs/website/public/logo/blogs/blog_3.svg

This file was deleted.

Loading