Add special-sale title with daily flip countdown.
Show a theme-colored (#c96) hour/minute/second flip clock on the left of the sale carousel that resets each Tehran day. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
1d52d78513
commit
30f1f8d67d
+185
@@ -621,6 +621,169 @@ textarea {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.section-title-with-aside {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.flip-countdown {
|
||||
--flip-h: 42px;
|
||||
--flip-w: 30px;
|
||||
--flip-radius: 8px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
gap: 6px;
|
||||
flex-shrink: 0;
|
||||
direction: ltr;
|
||||
color: #c96;
|
||||
}
|
||||
|
||||
.flip-unit {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
justify-items: center;
|
||||
}
|
||||
|
||||
.flip-unit-digits {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.flip-digit {
|
||||
position: relative;
|
||||
width: var(--flip-w);
|
||||
height: var(--flip-h);
|
||||
perspective: 280px;
|
||||
transform-style: preserve-3d;
|
||||
border-radius: var(--flip-radius);
|
||||
background: #c96;
|
||||
box-shadow:
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.18),
|
||||
0 10px 22px rgba(204, 153, 102, 0.28);
|
||||
font-family: var(--font-en);
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.flip-half {
|
||||
position: absolute;
|
||||
inset-inline: 0;
|
||||
height: 50%;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.flip-half-top,
|
||||
.flip-anim-top {
|
||||
top: 0;
|
||||
background: linear-gradient(180deg, #d9b087 0%, #c96 100%);
|
||||
border-radius: var(--flip-radius) var(--flip-radius) 0 0;
|
||||
}
|
||||
|
||||
.flip-half-bottom,
|
||||
.flip-anim-bottom {
|
||||
bottom: 0;
|
||||
background: linear-gradient(180deg, #bf8a55 0%, #a87440 100%);
|
||||
border-radius: 0 0 var(--flip-radius) var(--flip-radius);
|
||||
}
|
||||
|
||||
.flip-num {
|
||||
position: absolute;
|
||||
inset-inline: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: var(--flip-h);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.flip-half-top .flip-num,
|
||||
.flip-anim-top .flip-num {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.flip-half-bottom .flip-num,
|
||||
.flip-anim-bottom .flip-num {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.flip-digit-hinge {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
inset-inline: 0;
|
||||
z-index: 6;
|
||||
height: 1px;
|
||||
background: rgba(0, 0, 0, 0.28);
|
||||
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16);
|
||||
transform: translateY(-50%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.flip-anim {
|
||||
z-index: 4;
|
||||
backface-visibility: hidden;
|
||||
-webkit-backface-visibility: hidden;
|
||||
}
|
||||
|
||||
.flip-anim-top {
|
||||
z-index: 5;
|
||||
transform-origin: 50% 100%;
|
||||
animation: flip-top-down 0.3s ease-in forwards;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.flip-anim-bottom {
|
||||
z-index: 4;
|
||||
transform-origin: 50% 0%;
|
||||
transform: rotateX(90deg);
|
||||
animation: flip-bottom-up 0.3s ease-out 0.3s forwards;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.flip-unit-label {
|
||||
color: #c96;
|
||||
font-family: var(--font-fa);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.flip-separator {
|
||||
align-self: center;
|
||||
margin-bottom: 18px;
|
||||
color: #c96;
|
||||
font-family: var(--font-en-title);
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
@keyframes flip-top-down {
|
||||
0% {
|
||||
transform: rotateX(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotateX(-90deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes flip-bottom-up {
|
||||
0% {
|
||||
transform: rotateX(90deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotateX(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.flip-anim-top,
|
||||
.flip-anim-bottom {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
gap: 20px;
|
||||
@@ -1740,6 +1903,28 @@ a.article-card:hover .article-media img {
|
||||
.section-title {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.section-title-with-aside {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.flip-countdown {
|
||||
--flip-h: 36px;
|
||||
--flip-w: 26px;
|
||||
}
|
||||
|
||||
.flip-digit {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.flip-separator {
|
||||
font-size: 18px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
|
||||
Reference in New Issue
Block a user