lbry-desktop/ui/scss/component/_purchase.scss

276 lines
4.2 KiB
SCSS
Raw Permalink Normal View History

2020-09-02 22:08:37 +02:00
.credit-amount {
font-weight: bold;
2020-09-30 22:54:34 +02:00
color: var(--color-text);
2020-09-02 22:08:37 +02:00
.icon {
margin-bottom: 2px;
2020-09-02 22:08:37 +02:00
}
}
2020-05-21 17:38:28 +02:00
.file-price {
position: relative;
display: flex;
align-items: center;
color: var(--color-purchased-text);
.credit-amount,
2020-05-22 22:47:10 +02:00
.icon--Key {
2020-05-21 17:38:28 +02:00
position: relative;
2020-06-01 19:03:19 +02:00
margin-left: var(--spacing-m);
2020-05-21 17:38:28 +02:00
white-space: nowrap;
2020-09-30 22:54:34 +02:00
color: var(--color-purchased-text);
2020-05-21 17:38:28 +02:00
}
&::before {
position: absolute;
content: '';
left: 0;
width: 250%;
height: 160%;
transform: skew(15deg);
border-radius: var(--border-radius);
background-color: var(--color-purchased-alt);
border: 2px solid var(--color-purchased);
}
}
.file-price__key {
@extend .file-price;
color: var(--color-gray-5);
.icon {
fill: white;
}
&::before {
background-color: var(--color-purchased);
height: 180%;
}
}
.file-price--filepage {
font-size: var(--font-body);
2020-06-01 19:03:19 +02:00
top: calc(var(--spacing-xxs) * -1);
margin-left: var(--spacing-m);
2020-05-21 17:38:28 +02:00
.credit-amount {
2020-06-01 19:03:19 +02:00
margin: 0 var(--spacing-m);
2020-05-21 17:38:28 +02:00
}
&::before {
height: 250%;
2020-06-01 19:03:19 +02:00
left: calc(var(--spacing-m) * -1);
2020-05-21 17:38:28 +02:00
border-radius: 0;
border-bottom-left-radius: var(--border-radius);
border-width: 5px;
border-top-width: 0;
}
@media (max-width: $breakpoint-small) {
2020-06-01 19:03:19 +02:00
padding: var(--spacing-s);
2020-05-21 17:38:28 +02:00
&::before {
height: 140%;
}
}
}
.file-price__key--filepage {
@extend .file-price--filepage;
top: 0;
&::before {
height: 300%;
}
.icon {
2020-06-01 19:03:19 +02:00
margin: 0 var(--spacing-m);
2020-05-21 17:38:28 +02:00
}
@media (max-width: $breakpoint-small) {
&::before {
2020-06-01 19:03:19 +02:00
top: calc(-1 * var(--spacing-s));
2020-05-21 17:38:28 +02:00
height: 110%;
}
.icon {
2020-06-01 19:03:19 +02:00
top: calc(-1 * var(--spacing-s));
margin: 0 var(--spacing-xs);
2020-05-21 17:38:28 +02:00
}
}
}
.file-price--modal {
border: 5px solid var(--color-purchased);
.credit-amount {
2020-06-01 19:03:19 +02:00
margin: 0 var(--spacing-m);
margin-left: var(--spacing-l);
2020-05-21 17:38:28 +02:00
font-weight: var(--font-bold);
}
}
.file-price--modal {
font-size: var(--font-body);
height: 4rem;
background-color: var(--color-purchased-alt);
border-radius: var(--border-radius);
transform: skew(15deg);
.icon,
.credit-amount {
transform: skew(-15deg);
}
.credit-amount {
font-size: var(--font-large);
}
&::before {
content: none;
}
}
.file-price__key--modal {
@extend .file-price--modal;
2020-06-01 19:03:19 +02:00
top: var(--spacing-m);
2020-05-21 17:38:28 +02:00
.icon {
height: 100%;
width: auto;
2020-06-01 19:03:19 +02:00
left: calc(var(--spacing-xl) * 1.5);
2020-05-21 17:38:28 +02:00
animation: moveKey 2.5s 1 ease-out;
overflow: visible;
stroke: var(--color-black);
g {
animation: turnKey 2.5s 1 ease-out;
}
}
&::before {
content: '';
transform: skew(15deg);
animation: expand 2.5s 1 ease-out;
}
}
.purchase-stuff {
display: flex;
align-items: center;
> *:first-child {
width: 60%;
2020-06-01 19:03:19 +02:00
padding-right: var(--spacing-s);
2020-05-21 17:38:28 +02:00
}
.file-price,
.file-price__key {
width: 900%;
}
.file-price__key {
background-color: transparent;
border-width: 0;
@media (max-width: $breakpoint-small) {
2020-06-01 19:03:19 +02:00
margin-top: calc(var(--spacing-xl) * 2);
2020-05-21 17:38:28 +02:00
}
}
}
.purchase-stuff__text--purchased {
font-weight: bold;
font-size: var(--font-title);
color: var(--color-black);
position: absolute;
2020-06-01 19:03:19 +02:00
top: calc(var(--spacing-xl) * 1.6);
left: var(--spacing-l);
2020-05-21 17:38:28 +02:00
bottom: 0;
right: 0;
z-index: 9999999999;
animation: display 1s 1 ease-in;
opacity: 1;
}
.purchase_stuff__subtext--purchased {
color: var(--color-black);
font-size: var(--font-body);
2020-06-01 19:03:19 +02:00
margin-top: var(--spacing-m);
2020-05-21 17:38:28 +02:00
}
@keyframes display {
0% {
opacity: 0;
}
20% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes expand {
0% {
left: 50%;
}
50% {
height: 30rem;
}
100% {
height: 30rem;
left: -200%;
}
}
@keyframes moveKey {
0% {
max-height: 3rem;
left: -20rem;
}
20% {
2020-06-01 19:03:19 +02:00
left: calc(var(--spacing-xl) * 1.5);
2020-05-21 17:38:28 +02:00
}
50% {
2020-06-01 19:03:19 +02:00
left: calc(var(--spacing-xl) * 1.5);
2020-05-21 17:38:28 +02:00
}
70% {
2020-06-01 19:03:19 +02:00
left: calc(var(--spacing-xl) * 1.5);
2020-05-21 17:38:28 +02:00
}
100% {
max-height: 10rem;
opacity: 1;
left: 30rem;
}
}
@keyframes turnKey {
0% {
transform: rotate3d(0, 0, 0, 0);
}
50% {
transform: rotate3d(0, 0, 1, 45deg);
}
60% {
transform: rotate3d(1, 0, 1, 45deg);
}
70% {
transform: rotate3d(0, 0, 1, 45deg);
}
100% {
transform: rotate3d(0, 0, 1, 45deg);
}
}