mirror of
https://github.com/ParkerTenBroeck/ParkerTenBroeck.github.io.git
synced 2026-06-06 21:14:06 -04:00
updated QTip
This commit is contained in:
parent
9356e79e1a
commit
458a6ced12
11 changed files with 428 additions and 4 deletions
56
sass/img.scss
Normal file
56
sass/img.scss
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/* Prevent page scroll when lightbox is open */
|
||||
body.lb-open {
|
||||
overflow: hidden;
|
||||
touch-action: none; /* disables background gestures */
|
||||
}
|
||||
|
||||
figure.image img.zoomable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
// figure.image img.zoomable:hover {
|
||||
// transform: scale(1.02);
|
||||
// }
|
||||
|
||||
|
||||
/* Overlay */
|
||||
.lightbox {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.92);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.15s ease;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.lightbox.open {
|
||||
opacity: 1;
|
||||
pointer-events: auto; /* blocks clicks/scroll to the page behind */
|
||||
}
|
||||
|
||||
/* Stage fills viewport; it’s the only interaction surface */
|
||||
.lightbox__stage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden; /* hide panned edges */
|
||||
cursor: zoom-out; /* click outside to close */
|
||||
}
|
||||
|
||||
.lightbox__img {
|
||||
max-width: 95vw;
|
||||
max-height: 95vh;
|
||||
user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
cursor: grab;
|
||||
transform-origin: 50% 50%;
|
||||
will-change: transform;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.lightbox__img.dragging {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
@use "footer.scss";
|
||||
@use "blog.scss";
|
||||
@use "fonts.scss";
|
||||
@use "img.scss";
|
||||
|
||||
.z-code{
|
||||
overflow-x: auto;
|
||||
|
|
@ -90,4 +91,31 @@ code {
|
|||
time {
|
||||
padding-bottom: 1em;
|
||||
color: var(--fg-2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
figure {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
figure.image {
|
||||
margin: 2rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figure.image img {
|
||||
max-width: 80%;
|
||||
height: auto;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
figure.image figcaption {
|
||||
max-width: 80%;
|
||||
margin-top: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
color: var(--fg-muted);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue