forgot the css
This commit is contained in:
parent
5ee13a9326
commit
196967ebf5
52
src/App.css
52
src/App.css
@ -522,10 +522,60 @@ h1, h2, h3 { font-weight: 900; letter-spacing: -1px; }
|
|||||||
.screenshot-gallery {
|
.screenshot-gallery {
|
||||||
margin-bottom: 3rem;
|
margin-bottom: 3rem;
|
||||||
}
|
}
|
||||||
|
.lightbox-overlay {
|
||||||
|
position: fixed; /* Fixes it to the screen, not the page */
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: rgba(0, 0, 0, 0.9); /* Dark background like Steam */
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 9999; /* Higher than your navbar */
|
||||||
|
cursor: pointer; /* Click anywhere to close */
|
||||||
|
backdrop-filter: blur(4px); /* Modern touch */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The container for the image */
|
||||||
|
.lightbox-content {
|
||||||
|
position: relative;
|
||||||
|
max-width: 90%;
|
||||||
|
max-height: 90%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: default; /* Don't show pointer on the image itself */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The image itself */
|
||||||
|
.lightbox-img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 85vh;
|
||||||
|
object-fit: contain;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The close button */
|
||||||
|
.lightbox-close {
|
||||||
|
position: absolute;
|
||||||
|
top: -40px;
|
||||||
|
right: 0;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
font-size: 2.5rem;
|
||||||
|
cursor: pointer;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Update your main screenshot cursor to pointer */
|
||||||
.main-screenshot {
|
.main-screenshot {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
transition: opacity 0.2s;
|
cursor: pointer; /* Steam uses a pointer, not a zoom cursor */
|
||||||
|
transition: opacity 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-screenshot:hover {
|
.main-screenshot:hover {
|
||||||
|
|||||||
@ -351,7 +351,7 @@ const PluginDetail = () => {
|
|||||||
src={mainScreenshot || plugin.screenshots[0].path}
|
src={mainScreenshot || plugin.screenshots[0].path}
|
||||||
alt="Main"
|
alt="Main"
|
||||||
className="main-screenshot"
|
className="main-screenshot"
|
||||||
style={{ cursor: 'pointer' }}
|
style={{ cursor: 'pointer' }}
|
||||||
onClick={() => setLightboxImage(mainScreenshot || plugin.screenshots[0].path)}
|
onClick={() => setLightboxImage(mainScreenshot || plugin.screenshots[0].path)}
|
||||||
/>
|
/>
|
||||||
<div className="thumbnail-strip">
|
<div className="thumbnail-strip">
|
||||||
@ -613,7 +613,9 @@ const PluginDetail = () => {
|
|||||||
<div className="lightbox-overlay" onClick={() => setLightboxImage(null)}>
|
<div className="lightbox-overlay" onClick={() => setLightboxImage(null)}>
|
||||||
<div className="lightbox-content" onClick={(e) => e.stopPropagation()}>
|
<div className="lightbox-content" onClick={(e) => e.stopPropagation()}>
|
||||||
<img src={lightboxImage} alt="Expanded view" className="lightbox-img" />
|
<img src={lightboxImage} alt="Expanded view" className="lightbox-img" />
|
||||||
<button className="lightbox-close" onClick={() => setLightboxImage(null)}>×</button>
|
<button className="lightbox-close" onClick={() => setLightboxImage(null)}>
|
||||||
|
×
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user