reduce bounce rate
This commit is contained in:
@@ -386,6 +386,15 @@ textarea:focus-visible {
|
||||
background 120ms ease;
|
||||
}
|
||||
|
||||
button.card {
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card-media {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
@@ -573,3 +582,335 @@ textarea:focus-visible {
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
/* --- Media Modal --- */
|
||||
|
||||
#media-modal {
|
||||
max-width: 800px;
|
||||
width: calc(100vw - 48px);
|
||||
max-height: 90vh;
|
||||
border-radius: 20px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.16);
|
||||
background: var(--bg1);
|
||||
color: var(--fg);
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
box-shadow:
|
||||
0 24px 80px rgba(0, 0, 0, 0.6),
|
||||
0 0 0 1px rgba(255, 255, 255, 0.08) inset;
|
||||
}
|
||||
|
||||
#media-modal::backdrop {
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.media-modal-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.media-modal-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 20px 24px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.media-modal-header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.media-modal-thumb {
|
||||
display: none;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 14px;
|
||||
object-fit: cover;
|
||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.media-modal-title-wrap {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.media-modal-kicker {
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
margin: 0 0 6px;
|
||||
}
|
||||
|
||||
.media-modal-title {
|
||||
margin: 0;
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
line-height: 1.3;
|
||||
letter-spacing: -0.02em;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.media-modal-close {
|
||||
flex: 0 0 auto;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 999px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
color: var(--fg);
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background 120ms ease,
|
||||
transform 120ms ease;
|
||||
}
|
||||
|
||||
.media-modal-close:hover {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.media-modal-embed-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
aspect-ratio: 16 / 9;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.media-modal-embed-container[data-embed-kind="spotify"],
|
||||
.media-modal-embed-container[data-embed-kind="audio"],
|
||||
.media-modal-embed-container[data-embed-kind="fallback"] {
|
||||
margin: 14px 24px 0;
|
||||
width: calc(100% - 48px);
|
||||
}
|
||||
|
||||
.media-modal-embed-container[data-embed-kind="spotify"] {
|
||||
aspect-ratio: auto;
|
||||
height: 232px;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.media-modal-embed-container[data-embed-kind="audio"] {
|
||||
aspect-ratio: auto;
|
||||
height: auto;
|
||||
padding: 12px;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.media-modal-embed-placeholder {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
z-index: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.media-modal-embed-fallback {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12px 14px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.16);
|
||||
background: rgba(10, 14, 28, 0.55);
|
||||
color: var(--fg);
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.media-modal-embed-container[data-embed-kind="fallback"] .media-modal-embed-placeholder::before,
|
||||
.media-modal-embed-container[data-embed-kind="fallback"] .media-modal-embed-placeholder::after {
|
||||
display: none;
|
||||
animation: none;
|
||||
}
|
||||
|
||||
.media-modal-embed-container[data-embed-kind="fallback"] .media-modal-embed-placeholder {
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
}
|
||||
|
||||
.media-modal-embed-container[data-embed-kind="fallback"] .media-modal-embed-fallback {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.media-modal-embed-placeholder::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
transparent 0%,
|
||||
rgba(255, 255, 255, 0.12) 35%,
|
||||
rgba(255, 255, 255, 0.22) 50%,
|
||||
rgba(255, 255, 255, 0.12) 65%,
|
||||
transparent 100%
|
||||
);
|
||||
animation: shimmer 1.6s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.media-modal-embed-placeholder::after {
|
||||
content: "";
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 3px solid rgba(255, 255, 255, 0.2);
|
||||
border-top-color: var(--accent2);
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.media-modal-embed {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.media-modal-embed-container[data-embed-kind="spotify"] .media-modal-embed,
|
||||
.media-modal-embed-container[data-embed-kind="spotify"] .media-modal-embed-placeholder {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.media-modal-audio {
|
||||
display: none;
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
color-scheme: dark;
|
||||
accent-color: var(--accent2);
|
||||
}
|
||||
|
||||
.media-modal-embed-container[data-embed-kind="audio"] .media-modal-audio {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.media-modal-audio::-webkit-media-controls-enclosure {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.media-modal-audio::-webkit-media-controls-panel {
|
||||
background: rgba(10, 14, 28, 0.55);
|
||||
}
|
||||
|
||||
.media-modal-body {
|
||||
padding: 24px;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.media-modal-description {
|
||||
margin: 0 0 16px;
|
||||
line-height: 1.6;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.media-modal-meta {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
font-size: 14px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.media-modal-meta span:not(:last-child)::after {
|
||||
content: "•";
|
||||
margin-left: 12px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.media-modal-ctas {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
padding: 16px 24px 24px;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.media-modal-ctas .cta {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 12px 16px;
|
||||
border-radius: 14px;
|
||||
border: 1px solid var(--stroke);
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.01em;
|
||||
transition:
|
||||
background 120ms ease,
|
||||
transform 120ms ease;
|
||||
}
|
||||
|
||||
.media-modal-ctas .cta:hover {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.media-modal-ctas .cta.primary {
|
||||
border-color: rgba(94, 228, 255, 0.55);
|
||||
background: linear-gradient(135deg, rgba(94, 228, 255, 0.24), rgba(255, 205, 74, 0.16));
|
||||
box-shadow:
|
||||
0 0 0 3px rgba(94, 228, 255, 0.14),
|
||||
0 10px 30px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
#media-modal {
|
||||
max-width: 96vw;
|
||||
max-height: 94vh;
|
||||
width: 96vw;
|
||||
}
|
||||
|
||||
.media-modal-header {
|
||||
padding: 16px 20px;
|
||||
}
|
||||
|
||||
.media-modal-embed-container[data-embed-kind="spotify"],
|
||||
.media-modal-embed-container[data-embed-kind="audio"],
|
||||
.media-modal-embed-container[data-embed-kind="fallback"] {
|
||||
margin: 12px 20px 0;
|
||||
width: calc(100% - 40px);
|
||||
}
|
||||
|
||||
.media-modal-title {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.media-modal-body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.media-modal-ctas {
|
||||
flex-direction: column;
|
||||
padding: 12px 20px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user