diff --git a/src/pages/Halving/HalvingInfo.tsx b/src/pages/Halving/HalvingInfo.tsx
index f63ad33a8..037a48e3e 100644
--- a/src/pages/Halving/HalvingInfo.tsx
+++ b/src/pages/Halving/HalvingInfo.tsx
@@ -1,5 +1,6 @@
import { Tooltip } from 'antd'
import BigNumber from 'bignumber.js'
+import classnames from 'classnames'
import dayjs from 'dayjs'
import { ReactComponent as WarningCircle } from '../../assets/warning_circle.svg'
import i18n from '../../utils/i18n'
@@ -44,14 +45,20 @@ export const HalvingInfo = () => {
0 ? `+ ${utcOffset}` : utcOffset}`}
>
- {dayjs(estimatedDate).format('YYYY.MM.DD hh:mm:ss')}
+
+ {dayjs(estimatedDate).format('YYYY.MM.DD hh:mm:ss')}
+
+
-
{i18n.t('halving.estimated_time')}
+
+ {i18n.t('halving.estimated_time')}
+
>
@@ -90,7 +97,7 @@ export const HalvingInfo = () => {
overlayInnerStyle={{ color: '#333333' }}
title={`UTC ${utcOffset > 0 ? `+ ${utcOffset}` : utcOffset}`}
>
-
+
{i18n.t('halving.estimated_time')}
diff --git a/src/pages/Halving/index.module.scss b/src/pages/Halving/index.module.scss
index 1df8f2589..9c621e721 100644
--- a/src/pages/Halving/index.module.scss
+++ b/src/pages/Halving/index.module.scss
@@ -181,9 +181,13 @@
color: white;
background-color: rgb(5 22 6 / 100%);
background-position: bottom;
- background-size: 100% auto;
+ background-size: 200% auto;
background-repeat: no-repeat;
+ @media (width >= 750px) {
+ background-size: 100% auto;
+ }
+
.halvingBannerWrapper {
display: flex;
justify-content: center;
@@ -218,11 +222,20 @@
text-align: center;
}
+.halvingPanelWrapper {
+ background: linear-gradient(90deg, #00574380, #ffffff24, #00574380);
+ padding: 2px;
+ border-radius: 12px;
+
+ @media (width >= 750px) {
+ border-radius: 24px;
+ }
+}
+
.halvingPanel {
- background: rgb(21 19 23 / 100%);
+ background: #000f0b;
background-size: cover;
- border: 2px solid rgb(51 41 69 / 50%);
- border-radius: 12px;
+ border-radius: 10px;
overflow: hidden;
padding: 24px 16px;
gap: 24px;
@@ -230,7 +243,7 @@
flex-direction: column;
.halvingSuccessText {
- font-size: 24px;
+ font-size: 20px;
font-weight: 500;
}
@@ -252,7 +265,7 @@
@media (width >= 750px) {
padding: 32px 64px;
gap: 32px;
- border-radius: 24px;
+ border-radius: 22px;
.halvingPanelTitle {
font-weight: 700;
@@ -366,6 +379,15 @@
}
}
+.flexItemsCenter {
+ display: flex;
+ align-items: center;
+}
+
+.fontSizeSm {
+ font-size: 14px;
+}
+
.textSecondary {
color: rgb(240 240 240 / 50%);
}
@@ -381,3 +403,65 @@
.textCapitalize {
text-transform: capitalize;
}
+
+.halvingPopover {
+ border-radius: 4px;
+ width: 300px;
+
+ :global {
+ /* stylelint-disable-next-line selector-class-pattern */
+ .ant-popover-inner {
+ border-radius: 4px;
+ overflow: hidden;
+ }
+
+ /* stylelint-disable-next-line selector-class-pattern */
+ .ant-popover-inner-content {
+ padding: 0 16px;
+ }
+ }
+}
+
+.historyTable {
+ :global {
+ /* stylelint-disable-next-line selector-class-pattern */
+ .ant-table {
+ /* stylelint-disable-next-line selector-class-pattern */
+ .ant-table-thead {
+ tr > th {
+ background: transparent;
+ color: #666;
+ padding: 8px 20px;
+
+ &::before {
+ width: 0 !important;
+ }
+
+ &:first-child {
+ padding-left: 0;
+ }
+
+ &:last-child {
+ padding-right: 0;
+ }
+ }
+ }
+
+ /* stylelint-disable-next-line selector-class-pattern */
+ .ant-table-tbody {
+ tr > td {
+ padding: 8px 20px;
+ font-weight: 500;
+
+ &:first-child {
+ padding-left: 0;
+ }
+
+ &:last-child {
+ padding-right: 0;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/pages/Halving/index.tsx b/src/pages/Halving/index.tsx
index 614f4380d..60bcba6f9 100644
--- a/src/pages/Halving/index.tsx
+++ b/src/pages/Halving/index.tsx
@@ -84,42 +84,44 @@ export const HalvingCountdownPage = () => {
const renderHalvingPanel = () => {
if (isLoading || Number.isNaN(seconds)) {
return (
-
-
+
)
}
if (inCelebration) {
return (
-
-
- {i18n.t('halving.congratulations')}!
-
- {i18n.t('halving.the')}
- {i18n.t('symbol.char_space')}
- {i18n.t(`ordinal.${numberToOrdinal(halvingCount)}`)}
- {i18n.t('symbol.char_space')}
- {i18n.t('halving.halving')}
- {i18n.t('halving.actived')}{' '}
-
- {new BigNumber(getTargetBlockByHavingCount(halvingCount)).toFormat()}.
-
+
+
+
+ {i18n.t('halving.congratulations')}!
+
+
+
+
-
-
-
)
@@ -127,100 +129,118 @@ export const HalvingCountdownPage = () => {
if (expired) {
return (
-
- {i18n.t('halving.comming_soon')}
-
+
+
+ {i18n.t('halving.comming_soon')}
+
+
)
}
return (
-
-
- {i18n.t(`ordinal.${numberToOrdinal(halvingCount)}`)}
- {i18n.t('symbol.char_space')}
- {i18n.t('halving.halving')}
+
+
+
+ {i18n.t(`ordinal.${numberToOrdinal(halvingCount)}`)}
+ {i18n.t('symbol.char_space')}
+ {i18n.t('halving.halving')}
- {halvingCount > 1 && (
-
({
- key: index,
- event: `${i18n.t(`ordinal.${numberToOrdinal(index + 1)}`)}
+ {halvingCount > 1 && (
+ ({
+ className: styles.historyTableHeaderRow,
+ })}
+ size="middle"
+ className={styles.historyTable}
+ pagination={false}
+ dataSource={new Array(halvingCount - 1).fill({}).map((_, index) => ({
+ key: index,
+ event: `${i18n.t(`ordinal.${numberToOrdinal(index + 1)}`)}
${i18n.t('symbol.char_space')}
${i18n.t('halving.halving')}`,
- epoch: new BigNumber(EPOCHS_PER_HALVING * (index + 1)).toFormat(),
- height: getTargetBlockByHavingCount(index + 1),
- }))}
- columns={[
- {
- title: 'Event',
- dataIndex: 'event',
- key: 'event',
- render: event => {event},
- },
- { title: 'Epoch', dataIndex: 'epoch', key: 'epoch' },
- {
- title: 'Height',
- dataIndex: 'height',
- key: 'height',
- render: block => (
-
- {new BigNumber(block).toFormat()}
-
- ),
- },
- ]}
+ epoch: new BigNumber(EPOCHS_PER_HALVING * (index + 1)).toFormat(),
+ height: getTargetBlockByHavingCount(index + 1),
+ }))}
+ columns={[
+ {
+ title: 'Event',
+ dataIndex: 'event',
+ key: 'event',
+ render: event => {event},
+ },
+ { title: 'Epoch', dataIndex: 'epoch', key: 'epoch' },
+ {
+ title: 'Height',
+ dataIndex: 'height',
+ key: 'height',
+ render: block => (
+
+ {new BigNumber(block).toFormat()}
+
+ ),
+ },
+ ]}
+ />
+ }
+ title={null}
+ trigger="hover"
+ overlayClassName={styles.halvingPopover}
+ >
+
+
+ )}
+
+
+ {i18n.t('halving.countdown_tooltip_section1')}
+
+ {i18n.t('halving.countdown_tooltip_section2')}
+
+ {i18n.t('halving.countdown_tooltip_section3')}
+ >
}
- title={null}
- trigger="hover"
>
-
-
- )}
-
-
- {i18n.t('halving.countdown_tooltip_section1')}
-
- {i18n.t('halving.countdown_tooltip_section2')}
-
- {i18n.t('halving.countdown_tooltip_section3')}
- >
- }
- >
-
-
-
+
+
-
+
-
)
}