- {i18n.t('halving.banner_congratulation', {
- times: i18n.t(`ordinal.${numberToOrdinal(nextHalvingCount - 1)}`),
- })}
+
+ {i18n
+ .t('halving.banner_congratulation', {
+ times: i18n.t(`ordinal.${numberToOrdinal(nextHalvingCount - 1)}`),
+ })
+ .toUpperCase()}
+
Nervos CKB Layer 1 {capitalizeFirstLetter(i18n.t('halving.halving'))}
)}
diff --git a/src/components/BannerFallback/index.module.scss b/src/components/BannerFallback/index.module.scss
index 810088035e..e641976a3a 100644
--- a/src/components/BannerFallback/index.module.scss
+++ b/src/components/BannerFallback/index.module.scss
@@ -15,10 +15,12 @@ $backgroudColor: #232323;
}
.halvingBannerSuccess {
- @media (max-width: 750px) {
- background-size: 200% !important;
- }
+ background-size: cover;
background-position: center !important;
+
+ @media (min-width: 750px) {
+ background-size: 250% !important;
+ }
}
.halvingBannerWrapper {
@@ -29,6 +31,10 @@ $backgroudColor: #232323;
background-repeat: no-repeat;
background-position: bottom;
background-size: cover;
+
+ @media (min-width: 750px) {
+ height: 300px;
+ }
}
.halvingBannerShadow {
@@ -43,7 +49,20 @@ $backgroudColor: #232323;
align-items: center;
justify-content: center;
flex-direction: column;
- gap: 24px;
+ gap: 8px;
+
+ @media (min-width: 750px) {
+ gap: 16px;
+ }
+}
+
+.halvingBannerAnimation {
+ margin-top: -16px;
+ height: 64px;
+
+ @media (min-width: 750px) {
+ height: 100px;
+ }
}
.halvingBannerText {
@@ -51,10 +70,24 @@ $backgroudColor: #232323;
display: flex;
font-size: 24px;
font-weight: bold;
+ text-align: center;
+
+ &.linear {
+ background: linear-gradient(45deg, rgb(183, 129, 219), rgba(133, 69, 178, 1), rgb(183, 129, 219));
+ background-clip: text;
+ -webkit-text-fill-color: transparent;
+ }
+
+ &.success {
+ transform: rotate(-2deg);
+ text-shadow: 1px 1px 1px rgba(172, 54, 244, 1), -0.5px -0.5px 1px white;
+ color: rgb(28, 28, 28);
+ margin-top: -12px;
- background: linear-gradient(45deg, rgb(183, 129, 219), rgba(133, 69, 178, 1), rgb(183, 129, 219));
- background-clip: text;
- -webkit-text-fill-color: transparent;
+ @media (min-width: 750px) {
+ text-shadow: 1px 1px 1px rgba(172, 54, 244, 1), -1px -1px 1px white;
+ }
+ }
@media (min-width: 750px) {
font-size: 40px;
@@ -73,4 +106,8 @@ $backgroudColor: #232323;
padding: 8px 16px;
user-select: none;
background: linear-gradient(180deg, rgba(172, 54, 244, 1), rgba(138, 25, 207, 1));
+
+ @media (min-width: 750px) {
+ padding: 16px 24px;
+ }
}
diff --git a/src/pages/Home/Banner/index.tsx b/src/pages/Home/Banner/index.tsx
index 589beba4ed..5fc7529861 100644
--- a/src/pages/Home/Banner/index.tsx
+++ b/src/pages/Home/Banner/index.tsx
@@ -77,10 +77,11 @@ const _Banner: FC<{ latestBlock?: State.Block }> = ({ latestBlock }) => {
)
}
+export const Banner = HalvingBanner as FC<{ latestBlock?: State.Block }>
/*
* FIXME: this is a fallback for https://github.com/Magickbase/ckb-explorer-public-issues/issues/218 and should be restored once performance issue is fixed
*/
const isMainnet = isMainnetFunc()
-export const Banner = isMainnet
+export const Other = isMainnet
? HalvingBanner
: memo(_Banner, (a, b) => a.latestBlock?.number === b.latestBlock?.number)