Skip to content

Commit

Permalink
feat: update brand logo (#3205)
Browse files Browse the repository at this point in the history
* feat: update brand logo

* fix path
  • Loading branch information
jojoo-eth authored Jan 19, 2025
1 parent fb1da2a commit 493cc8a
Show file tree
Hide file tree
Showing 44 changed files with 266 additions and 26 deletions.
5 changes: 3 additions & 2 deletions docs/website/components/pages/brand.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import axios from 'axios'
import { useRouter } from 'next/router'
import JSZip from 'jszip'
import FileSaver from 'file-saver'
import clsx from 'clsx'

const Brand = () => {
const basePath = useRouter().basePath
Expand Down Expand Up @@ -105,8 +106,8 @@ const Brand = () => {
)}
</div>
</div>
<div className="basis-1/2 mt-6 mb-6 bg-white p-3">
<img className="mx-auto" src={basePath + pngUrl} alt={`${category} image`} />
<div className={clsx("basis-1/2 mt-6 mb-6 p-3", svgUrl?.includes('white') ?'bg-black':'bg-white', {'!bg-white': category==='banner'})}>
<img className="mx-auto max-h-[256px]" src={basePath + category==='banner' ? pngUrl : svgUrl} alt={`${category} image`} />
</div>
</div>
)
Expand Down
55 changes: 48 additions & 7 deletions docs/website/data/assets.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,59 @@
export enum category {
banner = 'banner',
wordmark = 'wordmark',
combine = 'combine',
logo = 'logo',
}

export enum type {
svg = 'svg',
png = 'png',
}

const BASE_PATH = '/logo/'

const getAssetPath = (category: category, assets: string[], type: type) => {
const paths = assets.map((asset) => `${BASE_PATH}${category}/${asset}.${type}`)
return paths
}

const assetsList = {
[category.banner]: ['rooch-banner'],
[category.wordmark]: ['rooch_black_text', 'rooch_white_text'],
[category.combine]: [
'rooch_black_combine_wrap',
'rooch_color_combine_wrap',
'rooch_color_light_combine_wrap',
'rooch_white_combine_wrap',
'rooch_black_combine',
'rooch_white_combine',
'rooch_color_combine',
],
[category.logo]: [
'rooch_circle_black_logo',
'rooch_circle_logo',
'rooch_color_light_logo',
'rooch_color_logo',
'rooch_black_logo',
'rooch_white_logo',
],
}

export const ROOCH_ASSETS = {
banner: {
png: ['/logo/rooch-banner.png'],
png: getAssetPath(category.banner, assetsList[category.banner], type.png),
},
wordmark: {
png: ['/logo/rooch_black_text.png', '/logo/rooch_white_text.png'],
svg: ['/logo/rooch_black_text.svg', '/logo/rooch_white_text.svg'],
png: getAssetPath(category.wordmark, assetsList[category.wordmark], type.png),
svg: getAssetPath(category.wordmark, assetsList[category.wordmark], type.svg),
},
combine: {
png: ['/logo/rooch_black_combine.png', '/logo/rooch_white_combine.png'],
svg: ['/logo/rooch_black_combine.svg', '/logo/rooch_white_combine.svg'],
png: getAssetPath(category.combine, assetsList[category.combine], type.png),
svg: getAssetPath(category.combine, assetsList[category.combine], type.svg),
},
logo: {
png: ['/logo/rooch_black_logo.png', '/logo/rooch_white_logo.png'],
svg: ['/logo/rooch_black_logo.svg', '/logo/rooch_white_logo.svg'],
png: getAssetPath(category.logo, assetsList[category.logo], type.png),
svg: getAssetPath(category.logo, assetsList[category.logo], type.svg),
},
}

Expand Down
4 changes: 2 additions & 2 deletions docs/website/pages/learn/welcome.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import Image from "next/image";

<div>
<Image
src="/logo/rooch_black_combine.svg"
src="/logo/combine/rooch_black_combine.svg"
alt="Rooch Architecture"
width={600}
height={600}
className="dark:hidden"
/>
<Image
src="/logo/rooch_white_combine.svg"
src="/logo/combine/rooch_white_combine.svg"
alt="Rooch Architecture"
width={600}
height={600}
Expand Down
4 changes: 2 additions & 2 deletions docs/website/pages/learn/welcome.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import Image from "next/image";

<div>
<Image
src="/logo/rooch_black_combine.svg"
src="/logo/combine/rooch_black_combine.svg"
alt="Rooch Architecture"
width={600}
height={600}
className="dark:hidden"
/>
<Image
src="/logo/rooch_white_combine.svg"
src="/logo/combine/rooch_white_combine.svg"
alt="Rooch Architecture"
width={600}
height={600}
Expand Down
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/website/public/logo/combine/rooch_black_combine.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/website/public/logo/combine/rooch_black_combine_wrap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/website/public/logo/combine/rooch_color_combine.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 493cc8a

Please sign in to comment.