Skip to content

Commit

Permalink
Merge pull request #1852 from nervosnetwork/testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Jan 21, 2025
2 parents 6e56a74 + 75b48df commit 6436415
Show file tree
Hide file tree
Showing 15 changed files with 316 additions and 74 deletions.
Binary file added public/images/Hot.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/components/Header/MenusComp/icons/Assets.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/components/Header/MenusComp/icons/Charts.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/components/Header/MenusComp/icons/Faucet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/components/Header/MenusComp/icons/FeeRate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/components/Header/MenusComp/icons/Fiber.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/components/Header/MenusComp/icons/Home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/components/Header/MenusComp/icons/NervosDao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/components/Header/MenusComp/icons/Rgbpp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/components/Header/MenusComp/icons/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { ReactComponent as Home } from './Home.svg'
import { ReactComponent as NervosDao } from './NervosDao.svg'
import { ReactComponent as Assets } from './Assets.svg'
import { ReactComponent as RGBPP } from './Rgbpp.svg'
import { ReactComponent as Charts } from './Charts.svg'
import { ReactComponent as Fiber } from './Fiber.svg'
import { ReactComponent as Faucet } from './Faucet.svg'
import { ReactComponent as FeeRate } from './FeeRate.svg'

export { Fiber, NervosDao, RGBPP, Faucet, Charts, Home, Assets, FeeRate }
80 changes: 69 additions & 11 deletions src/components/Header/MenusComp/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,48 @@
.submenu {
padding: 4px 12px;
border-radius: 4px;
--dim-color: rgb(244 244 245);

background: #fff;
color: #333;
box-shadow: 0 4px 4px 0 rgb(16 16 16 / 5%);
border-radius: 4px;
overflow: hidden;

.link {
display: block;
padding: 12px 0;
border-top: 1px solid #e5e5e5;
display: flex;
justify-content: flex-start;
align-items: center;
gap: 4px;
padding: 8px 20px;
line-height: 1;
margin: 4px;
border-radius: 4px;

&:hover {
background: var(--dim-color);
}

&:first-child {
border-top: 0;
&[data-is-inset='true'] {
padding-left: 28px;
}

.hot {
width: 14px;
height: 10px;
object-fit: cover;
margin-bottom: 4px;
}
}

.label {
font-weight: bold;
font-size: 1.2em;
margin: 4px;
padding: 8px 20px 2px;
}

.separator {
height: 1px;
background: var(--dim-color);
}
}

Expand Down Expand Up @@ -59,16 +88,20 @@
justify-content: space-between;

.icon {
margin-left: auto;
transform: rotate(180deg);
transition: transform 0.1s;
}
}

.headerMenusItem {
--dim-color: rgb(244 244 245);

position: relative;
color: white;
display: flex;
align-items: center;
margin-right: 56px;
margin-right: 50px;
font-size: 14px;
font-weight: regular;

Expand All @@ -77,17 +110,42 @@
}

@media (width <= 1200px) {
margin-right: 20px;
margin-right: 16px;
}

@media (width >= 1024px) and (width <= 1044px) {
margin-right: calc(56px - ((1440px - 100vw) * calc((56 - 8) / (1440 - 1024))));
svg:hover {
filter: drop-shadow(0 0 4px var(--primary-color));
mix-blend-mode: difference;
}

&:hover {
font-weight: medium;
color: var(--primary-color);
}

&[data-popup] {
&::after {
position: absolute;
top: calc(100% + 10px);
display: none;
content: attr(data-popup);
white-space: nowrap;
padding: 2px 20px;
background: var(--dim-color);
color: #333;
left: 50%;
transform: translateX(-50%);
border-radius: 2px;
box-shadow: 0 4px 4px 0 rgb(16 16 16 / 5%);
opacity: 0.8;
}

&:hover {
&::after {
display: block;
}
}
}
}

.moreMenus {
Expand Down
Loading

0 comments on commit 6436415

Please sign in to comment.