From 0e728d9654aaf542e4464886f80537999bac8125 Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 5 Jan 2022 22:04:53 -0500 Subject: [PATCH] Update LTD --- src/common/layout/LayoutGridItem.tsx | 2 +- .../limited-edition/LimitedEdition.scss | 112 ++++++++++++++++-- .../LimitedEditionCompactPlateView.tsx | 11 +- .../LimitedEditionCompletePlateView.tsx | 41 +++++++ .../LimitedEditionStyledNumberView.tsx | 6 +- .../LimitedEditionCompactPlateView.scss | 17 --- .../LimitedEditionCompactPlateView.types.ts | 7 -- .../LimitedEditionCompletePlateView.scss | 20 ---- .../LimitedEditionCompletePlateView.tsx | 26 ---- .../LimitedEditionCompletePlateView.types.ts | 5 - .../LimitedEditionStyledNumberView.scss | 62 ---------- .../LimitedEditionStyledNumberView.types.ts | 4 - 12 files changed, 160 insertions(+), 153 deletions(-) rename src/views/shared/limited-edition/{compact-plate => }/LimitedEditionCompactPlateView.tsx (74%) create mode 100644 src/views/shared/limited-edition/LimitedEditionCompletePlateView.tsx rename src/views/shared/limited-edition/{styled-number => }/LimitedEditionStyledNumberView.tsx (82%) delete mode 100644 src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.scss delete mode 100644 src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.types.ts delete mode 100644 src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.scss delete mode 100644 src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.tsx delete mode 100644 src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.types.ts delete mode 100644 src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.scss delete mode 100644 src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.types.ts diff --git a/src/common/layout/LayoutGridItem.tsx b/src/common/layout/LayoutGridItem.tsx index f0490b29..718b6409 100644 --- a/src/common/layout/LayoutGridItem.tsx +++ b/src/common/layout/LayoutGridItem.tsx @@ -1,6 +1,6 @@ import { FC, useMemo } from 'react'; import { ItemCountView } from '../../views/shared/item-count/ItemCountView'; -import { LimitedEditionStyledNumberView } from '../../views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView'; +import { LimitedEditionStyledNumberView } from '../../views/shared/limited-edition/LimitedEditionStyledNumberView'; import { Base } from '../Base'; import { Column, ColumnProps } from '../Column'; diff --git a/src/views/shared/limited-edition/LimitedEdition.scss b/src/views/shared/limited-edition/LimitedEdition.scss index 2ada0c1a..77d7a9b8 100644 --- a/src/views/shared/limited-edition/LimitedEdition.scss +++ b/src/views/shared/limited-edition/LimitedEdition.scss @@ -21,11 +21,13 @@ width: 100%; height: 100%; background: url("../../../assets/images/unique/grid-bg-glass.png") center no-repeat; - z-index: 3; + bottom: 0; + z-index: 4; } - &.sold-out:before { - background: url("../../../assets/images/unique/grid-bg-sold-out.png") center no-repeat, url("../../../assets/images/unique/grid-bg-glass.png") center no-repeat; + &.sold-out:after { + background: url("../../../assets/images/unique/grid-bg-sold-out.png") center no-repeat, + url("../../../assets/images/unique/grid-bg-glass.png") center no-repeat; } .unique-item-counter { @@ -37,7 +39,7 @@ width: 100%; height: 9px; background: url("../../../assets/images/unique/grid-count-bg.png") center no-repeat; - z-index: 4; + z-index: 3; } } @@ -57,6 +59,102 @@ } } -@import './compact-plate/LimitedEditionCompactPlateView'; -@import './complete-plate/LimitedEditionCompletePlateView'; -@import './styled-number/LimitedEditionStyledNumberView'; +.unique-compact-plate { + display: flex; + flex-direction: column; + justify-content: flex-end; + align-items: center; + right: 16px; + width: 34px; + height: 37px; + background: url("../../../assets/images/unique/inventory-info-amount-bg.png"); + + div { + display: flex; + justify-content: center; + align-items: center; + height: 9.5px; + } +} + +.unique-complete-plate { + width: 170px; + height: 29px; + background: url("../../../assets/images/unique/catalog-info-amount-bg.png") no-repeat center; + z-index: 1; + padding-top: 3px; + + .plate-container { + margin-left: 45px; + width: 100px; + font-size: 10px; + color: black; + + > :first-child { + margin-bottom: 2px; + } + } +} + +.limited-edition-number { + display: inline-block; + outline: 0; + height: 5px; + margin-right: 1px; + background-image: url('../../../assets/images/unique/numbers.png'); + background-repeat: no-repeat; + + &:last-child { + margin-right: 0px; + } + + &.n-0 { + width: 4px; + background-position: -1px 0px; + } + + &.n-1 { + width: 2px; + background-position: -6px 0px; + } + + &.n-2 { + width: 4px; + background-position: -9px 0px; + } + + &.n-3 { + width: 4px; + background-position: -14px 0px; + } + + &.n-4 { + width: 4px; + background-position: -19px 0px; + } + + &.n-5 { + width: 4px; + background-position: -24px 0px; + } + + &.n-6 { + width: 4px; + background-position: -29px 0px; + } + + &.n-7 { + width: 4px; + background-position: -34px 0px; + } + + &.n-8 { + width: 4px; + background-position: -39px 0px; + } + + &.n-9 { + width: 4px; + background-position: -44px 0px; + } +} diff --git a/src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.tsx b/src/views/shared/limited-edition/LimitedEditionCompactPlateView.tsx similarity index 74% rename from src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.tsx rename to src/views/shared/limited-edition/LimitedEditionCompactPlateView.tsx index f458d88d..74c93089 100644 --- a/src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.tsx +++ b/src/views/shared/limited-edition/LimitedEditionCompactPlateView.tsx @@ -1,7 +1,12 @@ import { FC, useMemo } from 'react'; -import { Base } from '../../../../common/Base'; -import { LimitedEditionStyledNumberView } from '../styled-number/LimitedEditionStyledNumberView'; -import { LimitedEditionCompactPlateViewProps } from './LimitedEditionCompactPlateView.types'; +import { Base, BaseProps } from '../../../common/Base'; +import { LimitedEditionStyledNumberView } from './LimitedEditionStyledNumberView'; + +export interface LimitedEditionCompactPlateViewProps extends BaseProps +{ + uniqueNumber: number; + uniqueSeries: number; +} export const LimitedEditionCompactPlateView: FC = props => { diff --git a/src/views/shared/limited-edition/LimitedEditionCompletePlateView.tsx b/src/views/shared/limited-edition/LimitedEditionCompletePlateView.tsx new file mode 100644 index 00000000..f6cee2b9 --- /dev/null +++ b/src/views/shared/limited-edition/LimitedEditionCompletePlateView.tsx @@ -0,0 +1,41 @@ +import { FC, useMemo } from 'react'; +import { LocalizeText } from '../../../api'; +import { Base, BaseProps } from '../../../common/Base'; +import { Column } from '../../../common/Column'; +import { Flex } from '../../../common/Flex'; +import { LimitedEditionStyledNumberView } from './LimitedEditionStyledNumberView'; + +export interface LimitedEditionCompletePlateViewProps extends BaseProps +{ + uniqueLimitedItemsLeft: number; + uniqueLimitedSeriesSize: number; +} + +export const LimitedEditionCompletePlateView: FC = props => +{ + const { uniqueLimitedItemsLeft = 0, uniqueLimitedSeriesSize = 0, classNames = [], ...rest } = props; + + const getClassNames = useMemo(() => + { + const newClassNames: string[] = [ 'unique-complete-plate' ]; + + if(classNames.length) newClassNames.push(...classNames); + + return newClassNames; + }, [ classNames ]); + + return ( + + + + { LocalizeText('unique.items.left') } + + + + { LocalizeText('unique.items.number.sold') } + + + + + ); +} diff --git a/src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.tsx b/src/views/shared/limited-edition/LimitedEditionStyledNumberView.tsx similarity index 82% rename from src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.tsx rename to src/views/shared/limited-edition/LimitedEditionStyledNumberView.tsx index 9d2c6483..29318e6a 100644 --- a/src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.tsx +++ b/src/views/shared/limited-edition/LimitedEditionStyledNumberView.tsx @@ -1,5 +1,9 @@ import { FC } from 'react'; -import { LimitedEditionStyledNumberViewProps } from './LimitedEditionStyledNumberView.types'; + +export interface LimitedEditionStyledNumberViewProps +{ + value: number; +} export const LimitedEditionStyledNumberView: FC = props => { diff --git a/src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.scss b/src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.scss deleted file mode 100644 index f9e5f792..00000000 --- a/src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.scss +++ /dev/null @@ -1,17 +0,0 @@ -.unique-compact-plate { - display: flex; - flex-direction: column; - justify-content: flex-end; - align-items: center; - right: 16px; - width: 34px; - height: 37px; - background: url("../../../../assets/images/unique/inventory-info-amount-bg.png"); - - div { - display: flex; - justify-content: center; - align-items: center; - height: 9.5px; - } -} diff --git a/src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.types.ts b/src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.types.ts deleted file mode 100644 index 10d371f2..00000000 --- a/src/views/shared/limited-edition/compact-plate/LimitedEditionCompactPlateView.types.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { BaseProps } from '../../../../common/Base'; - -export interface LimitedEditionCompactPlateViewProps extends BaseProps -{ - uniqueNumber: number; - uniqueSeries: number; -} diff --git a/src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.scss b/src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.scss deleted file mode 100644 index ba46a182..00000000 --- a/src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.scss +++ /dev/null @@ -1,20 +0,0 @@ -.unique-complete-plate { - top: 145px; - left: 10px; - width: 170px; - height: 29px; - background: url("../../../../assets/images/unique/catalog-info-amount-bg.png"); - - div { - position: relative; - padding-left: 45px; - padding-right: 20px; - font-size: 10px; - color: #000; - - div { - position: absolute; - right: 0px; - } - } -} diff --git a/src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.tsx b/src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.tsx deleted file mode 100644 index 744d33f6..00000000 --- a/src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { FC } from 'react'; -import { LocalizeText } from '../../../../api'; -import { LimitedEditionStyledNumberView } from '../styled-number/LimitedEditionStyledNumberView'; -import { LimitedEditionCompletePlateViewProps } from './LimitedEditionCompletePlateView.types'; - -export const LimitedEditionCompletePlateView: FC = props => -{ - const { uniqueLimitedItemsLeft = 0, uniqueLimitedSeriesSize = 0 } = props; - - return ( -
-
-
- -
- { LocalizeText('unique.items.left') } -
-
-
- -
- { LocalizeText('unique.items.number.sold') } -
-
- ); -} diff --git a/src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.types.ts b/src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.types.ts deleted file mode 100644 index 7e341e69..00000000 --- a/src/views/shared/limited-edition/complete-plate/LimitedEditionCompletePlateView.types.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface LimitedEditionCompletePlateViewProps -{ - uniqueLimitedItemsLeft: number; - uniqueLimitedSeriesSize: number; -} diff --git a/src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.scss b/src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.scss deleted file mode 100644 index a5e36263..00000000 --- a/src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.scss +++ /dev/null @@ -1,62 +0,0 @@ -.limited-edition-number { - display: inline-block; - outline: 0; - height: 5px; - margin-right: 1px; - background-image: url('../../../../assets/images/unique/numbers.png'); - background-repeat: no-repeat; - - &:last-child { - margin-right: 0px; - } - - &.n-0 { - width: 4px; - background-position: -1px 0px; - } - - &.n-1 { - width: 2px; - background-position: -6px 0px; - } - - &.n-2 { - width: 4px; - background-position: -9px 0px; - } - - &.n-3 { - width: 4px; - background-position: -14px 0px; - } - - &.n-4 { - width: 4px; - background-position: -19px 0px; - } - - &.n-5 { - width: 4px; - background-position: -24px 0px; - } - - &.n-6 { - width: 4px; - background-position: -29px 0px; - } - - &.n-7 { - width: 4px; - background-position: -34px 0px; - } - - &.n-8 { - width: 4px; - background-position: -39px 0px; - } - - &.n-9 { - width: 4px; - background-position: -44px 0px; - } -} diff --git a/src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.types.ts b/src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.types.ts deleted file mode 100644 index 75bdde39..00000000 --- a/src/views/shared/limited-edition/styled-number/LimitedEditionStyledNumberView.types.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface LimitedEditionStyledNumberViewProps -{ - value: number; -}