Skip to content

Commit 61a7f57

Browse files
committed
feat: add themes
#7
1 parent 61a2884 commit 61a7f57

File tree

26 files changed

+147
-50
lines changed

26 files changed

+147
-50
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = {
3333
plugins: [
3434
heroui({
3535
themes: {
36-
'purple-dark': {
36+
'${networkNode}': {
3737
extend: 'dark',
3838
colors: {
3939
primary: {
@@ -60,10 +60,10 @@ module.exports = {
6060
```
6161

6262
```javascript
63-
// Example of customizing theme in layout.tsx, add corresponding theme name in className
63+
// Example of customizing theme in layout.tsx, corresponding theme name will be applied in className
6464

6565
<Providers>
66-
<div className="purple-dark flex flex-col min-h-screen">
66+
<div className="${networkNode} flex flex-col min-h-screen">
6767
<div className="flex-grow">
6868
{children}
6969
</div>
@@ -77,31 +77,31 @@ module.exports = {
7777

7878
#### Network Logo
7979

80-
Network logos should be placed in the `/public/images/network/` directory with the following specifications:
80+
Network logos should be placed in the `/public/images/network/${networkNode}` directory with the following specifications:
8181

8282
* File Format: PNG format (transparent background recommended)
83-
* File Naming: Should match the network identifier (e.g., `assethub-westend.png`, `paseo.png`)
8483
* Design Style: Both circular or square logos are acceptable, but visual clarity should be ensured
8584

8685
Currently available network logos:
8786

88-
* `assethub-westend.png`
89-
* `paseo.png`
87+
* `assethub-westend`
88+
* `paseo`
89+
* `bifrost-testnet`
9090

9191
#### Network Banner Images
9292

9393
Network banner images should be placed in:
9494

95-
* Path: `/public/images/banner/`
95+
* Path: `/public/images/network/${networkNode}`
9696
* File Format: PNG or JPG
9797
* Banner images will be displayed at the top of network pages
9898
* Design Style: Should reflect the network's characteristics and may include the network name, logo, and related visual elements
9999

100100
#### Adding New Network Images
101101

102102
1. Prepare image files according to the specifications above
103-
2. Add the network logo to `/public/images/network/[network-id].png`
104-
3. Update the network banner to `/public/images/banner/navbar.png`
103+
2. Add the network logo to `/public/images/network/${networkNode}/logo.png`
104+
3. Update the network banner to `/public/images/network/${networkNode}/banner.png`
105105
4. The application will automatically detect and display the corresponding images based on the network identifier
106106

107107
## Getting Started

jest.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const createJestConfig = nextJest({
77
const customJestConfig = {
88
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
99
testEnvironment: "jsdom",
10+
moduleNameMapper: {
11+
'^@/(.*)$': '<rootDir>/src/$1',
12+
},
1013
};
1114

12-
module.exports = createJestConfig(customJestConfig);
15+
module.exports = createJestConfig(customJestConfig);
138 KB
Loading
16.6 KB
Loading
493 KB
Loading
11.8 KB
Loading
File renamed without changes.
32.9 KB
Loading

0 commit comments

Comments
 (0)