feat: add responsive case study sharing
This commit is contained in:
@@ -528,6 +528,163 @@
|
||||
border-color: rgba(255, 255, 255, 0.16);
|
||||
}
|
||||
|
||||
.shareDialog {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
display: grid;
|
||||
width: 100vw;
|
||||
max-width: none;
|
||||
height: 100dvh;
|
||||
max-height: none;
|
||||
margin: 0;
|
||||
padding: var(--space-4);
|
||||
place-items: center;
|
||||
overflow: hidden;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.shareDialog:not([open]) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.shareDialog::backdrop {
|
||||
background: rgba(1, 13, 39, 0.62);
|
||||
opacity: 0;
|
||||
backdrop-filter: blur(4px);
|
||||
transition: opacity 180ms var(--motion-ease-out);
|
||||
}
|
||||
|
||||
.shareDialog[data-state='open']::backdrop {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.shareDialog[data-state='closing']::backdrop {
|
||||
opacity: 0;
|
||||
transition-duration: 140ms;
|
||||
}
|
||||
|
||||
.sharePanel {
|
||||
width: min(30rem, 100%);
|
||||
padding: var(--space-5);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--radius-xl);
|
||||
background: var(--bg-raised);
|
||||
box-shadow: 0 1.5rem 5rem rgba(1, 13, 39, 0.3);
|
||||
opacity: 0;
|
||||
transform: scale(0.97) translateY(0.5rem);
|
||||
transition:
|
||||
opacity 180ms var(--motion-ease-out),
|
||||
transform 180ms var(--motion-ease-out);
|
||||
}
|
||||
|
||||
.shareDialog[data-state='open'] .sharePanel {
|
||||
opacity: 1;
|
||||
transform: scale(1) translateY(0);
|
||||
}
|
||||
|
||||
.shareDialog[data-state='closing'] .sharePanel {
|
||||
opacity: 0;
|
||||
transform: scale(0.98) translateY(0.25rem);
|
||||
transition-duration: 140ms;
|
||||
}
|
||||
|
||||
.shareDialog[data-motion='none'] .sharePanel,
|
||||
.shareDialog[data-motion='none']::backdrop {
|
||||
transition-duration: 0ms;
|
||||
}
|
||||
|
||||
.shareHeader {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-4);
|
||||
padding-bottom: var(--space-4);
|
||||
border-bottom: 1px solid var(--border-default);
|
||||
}
|
||||
|
||||
.shareHeader h2 {
|
||||
margin-bottom: var(--space-1);
|
||||
color: var(--text-primary);
|
||||
font-size: var(--font-size-h3);
|
||||
line-height: var(--line-height-h3);
|
||||
}
|
||||
|
||||
.shareHeader p {
|
||||
max-width: 22rem;
|
||||
color: var(--text-secondary);
|
||||
font-size: var(--font-size-body-small);
|
||||
line-height: var(--line-height-body-small);
|
||||
}
|
||||
|
||||
.shareOptions {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: var(--space-3);
|
||||
margin-block: var(--space-5);
|
||||
}
|
||||
|
||||
.shareOptions a {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
min-height: 5rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-3) var(--space-2);
|
||||
border: 1px solid var(--border-default);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--bg-surface);
|
||||
color: var(--text-primary);
|
||||
font-size: var(--font-size-label-small);
|
||||
font-weight: 650;
|
||||
text-align: center;
|
||||
transition:
|
||||
border-color var(--motion-duration-fast) ease,
|
||||
background-color var(--motion-duration-fast) ease,
|
||||
transform var(--motion-duration-fast) var(--motion-ease-out);
|
||||
}
|
||||
|
||||
.shareOptions svg,
|
||||
.copyLinkButton svg {
|
||||
width: var(--size-icon-md);
|
||||
height: var(--size-icon-md);
|
||||
}
|
||||
|
||||
.copyLinkButton {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
min-height: 3rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--space-2);
|
||||
padding: var(--space-3) var(--space-4);
|
||||
border: 1px solid var(--border-strong);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--bg-surface);
|
||||
color: var(--text-primary);
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
font-weight: 700;
|
||||
transition:
|
||||
border-color var(--motion-duration-fast) ease,
|
||||
background-color var(--motion-duration-fast) ease,
|
||||
transform var(--motion-duration-fast) var(--motion-ease-out);
|
||||
}
|
||||
|
||||
.galleryStage:focus-visible,
|
||||
.thumbnailButton:focus-visible,
|
||||
.viewerThumbnail:focus-visible,
|
||||
.viewerIconButton:focus-visible,
|
||||
.viewerNavButton:focus-visible,
|
||||
.shareOptions a:focus-visible,
|
||||
.copyLinkButton:focus-visible {
|
||||
outline: 3px solid var(--focus-ring, var(--accent-default));
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.galleryStage:active,
|
||||
.thumbnailButton:active,
|
||||
.viewerThumbnail:active,
|
||||
@@ -535,6 +692,11 @@
|
||||
transform: scale(0.97);
|
||||
}
|
||||
|
||||
.shareOptions a:active,
|
||||
.copyLinkButton:active {
|
||||
transform: scale(0.97);
|
||||
}
|
||||
|
||||
.storyGrid,
|
||||
.stackGrid {
|
||||
display: grid;
|
||||
@@ -780,6 +942,14 @@
|
||||
justify-content: flex-start;
|
||||
padding-inline: var(--space-3);
|
||||
}
|
||||
|
||||
.sharePanel {
|
||||
padding: var(--space-4);
|
||||
}
|
||||
|
||||
.shareOptions {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
@@ -798,6 +968,12 @@
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.shareOptions a:hover,
|
||||
.copyLinkButton:hover {
|
||||
border-color: var(--accent-default);
|
||||
background: var(--bg-subtle);
|
||||
}
|
||||
|
||||
.projectNavLink:hover {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
@@ -822,6 +998,16 @@
|
||||
transition-duration: 120ms;
|
||||
}
|
||||
|
||||
.sharePanel,
|
||||
.shareDialog::backdrop {
|
||||
transition-duration: 120ms;
|
||||
}
|
||||
|
||||
.sharePanel,
|
||||
.shareDialog[data-state='closing'] .sharePanel {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.thumbnailRail {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user