diff --git a/packages/frontend/public/images/icons/block-present.svg b/packages/frontend/public/images/icons/block-present.svg new file mode 100644 index 00000000..a4ae3300 --- /dev/null +++ b/packages/frontend/public/images/icons/block-present.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/packages/frontend/src/app/home/Home.js b/packages/frontend/src/app/home/Home.js index 449bd862..19a09476 100644 --- a/packages/frontend/src/app/home/Home.js +++ b/packages/frontend/src/app/home/Home.js @@ -83,6 +83,7 @@ function Home () { documents={status.data?.documentsCount} identities={status.data?.identitiesCount} loading={status.loading} + event={'christmas'} /> diff --git a/packages/frontend/src/components/blocks/BlocksTotal.js b/packages/frontend/src/components/blocks/BlocksTotal.js index 2d0db4e1..4f57c62c 100644 --- a/packages/frontend/src/components/blocks/BlocksTotal.js +++ b/packages/frontend/src/components/blocks/BlocksTotal.js @@ -25,6 +25,7 @@ export default function BlocksTotal () { return ( {cards.map((card, i) => ( @@ -14,6 +14,7 @@ export default function TotalCards ({ cards, loading = false }) { value={card.value} icon={card.icon} formats={card.format} + event={event} /> : } diff --git a/packages/frontend/src/components/total/TotalInfo.js b/packages/frontend/src/components/total/TotalInfo.js index 783c4f17..902b7c52 100644 --- a/packages/frontend/src/components/total/TotalInfo.js +++ b/packages/frontend/src/components/total/TotalInfo.js @@ -3,10 +3,22 @@ import './TotalInfoItem.scss' import { Container, Flex } from '@chakra-ui/react' import Link from 'next/link' -export default function TotalInfo ({ blocks, transactions, dataContracts, documents, identities, loading }) { +export default function TotalInfo ({ + blocks, + transactions, + dataContracts, + documents, + identities, + loading, + event = null +}) { + const eventClasses = { + christmas: 'TotalInfo--Christmas' + } + return ( { if (format === 'elipsed') return 'ValueBlock__Value--Elipsed' @@ -9,7 +12,7 @@ export default function ValueBlock ({ title, value, icon, formats = [], classNam }).join(' ') return ( -
+
{icon &&
} diff --git a/packages/frontend/src/components/total/ValueBlock.scss b/packages/frontend/src/components/total/ValueBlock.scss index 4a07a542..85934980 100644 --- a/packages/frontend/src/components/total/ValueBlock.scss +++ b/packages/frontend/src/components/total/ValueBlock.scss @@ -2,101 +2,113 @@ @import '../../styles/variables.scss'; .ValueBlock { - position: relative; - display: flex; - align-items: center; - padding-left: 44px; + position: relative; + display: flex; + align-items: center; + padding-left: 44px; + &::before { + content: ''; + display: block; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + width: 28px; + height: 28px; + } + + &--Blocks { &::before { - content: ''; - display: block; - position: absolute; - left: 0; - top: 50%; - transform: translateY(-50%); - width: 28px; - height: 28px; + background: url('/images/icons/block.svg') no-repeat center; + background-size: contain; } + } - &--Blocks { - &::before { - background: url("/images/icons/transactions.svg") no-repeat center; - background-size: contain; - } + &--Transactions { + &::before { + background: url('/images/icons/transactions.svg') no-repeat center; + background-size: contain; } + } - &--Transactions { - &::before { - background: url('/images/icons/block.svg') no-repeat center; - background-size: contain; - } + &--Timer { + &::before { + background: url('/images/icons/timer.svg') no-repeat center; + background-size: contain; } + } - &--Timer { - &::before { - background: url('/images/icons/timer.svg') no-repeat center; - background-size: contain; - } + &--Epoch { + &::before { + background: url('/images/icons/timer.svg') no-repeat center; + background-size: contain; } + } - &--Epoch { - &::before { - background: url('/images/icons/timer.svg') no-repeat center; - background-size: contain; - } + &--Sandglass { + &::before { + background: url('/images/icons/sandglass.svg') no-repeat center; + background-size: contain; } + } - &--Sandglass { - &::before { - background: url('/images/icons/sandglass.svg') no-repeat center; - background-size: contain; - } + &--Nodes { + &::before { + background: url('/images/icons/nodes.svg') no-repeat center; + background-size: contain; } + } - &--Nodes { - &::before { - background: url('/images/icons/nodes.svg') no-repeat center; - background-size: contain; - } + &--Coins { + &::before { + background: url('/images/icons/coins.svg') no-repeat center; + background-size: contain; } + } - &--Coins { - &::before { - background: url('/images/icons/coins.svg') no-repeat center; - background-size: contain; - } + &--StarCheck { + &::before { + background: url('/images/icons/star-check.svg') no-repeat center; + background-size: contain; } + } - &--StarCheck { - &::before { - background: url('/images/icons/star-check.svg') no-repeat center; - background-size: contain; - } + &--Christmas.ValueBlock { + &--Blocks { + &::before { + background: url('/images/icons/block-present.svg') no-repeat center; + background-size: contain; + width: 30px; + height: 30px; + margin: -1px; + } } + } + + &__Title { + color: var(--chakra-colors-brand-deep); + font-size: 1rem; + margin-right: 10px; + white-space: nowrap; + } - &__Title { - color: var(--chakra-colors-brand-deep); - font-size: 1rem; - margin-right: 10px; - white-space: nowrap; + &__Value { + font-size: 1.125rem; + + &--Loading { + @include mixins.LoadingLine; + + opacity: .5; + border-radius: 5px; + animation-delay: 100ms; } - - &__Value { - font-size: 1.125rem; - - &--Loading { - @include mixins.LoadingLine; - - opacity: .5; - border-radius: 5px; - animation-delay: 100ms; - } - - &--Elipsed { - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } + + &--Elipsed { + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } + } } \ No newline at end of file