Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/layouts/PostLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ const year = date.getFullYear();
<span class="lightbox-title">Full-size image</span>
<span class="lightbox-hint">Click outside or press Esc to close</span>
</div>
<button class="lightbox-nav lightbox-prev" aria-label="Previous image">&#8249;</button>
<button class="lightbox-nav lightbox-prev" aria-label="Previous image"></button>
<div class="lightbox-container">
<img src="" alt="" />
</div>
<button class="lightbox-nav lightbox-next" aria-label="Next image">&#8250;</button>
<button class="lightbox-close" aria-label="Close">&times;</button>
<button class="lightbox-nav lightbox-next" aria-label="Next image"></button>
<button class="lightbox-close" aria-label="Close"></button>
<div class="lightbox-footer">
<span class="lightbox-counter"></span>
</div>
Expand Down
42 changes: 39 additions & 3 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ code {
right: 1rem;
background: var(--color-primary);
border: none;
color: white;
font-size: 1.5rem;
font-size: 0;
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
Expand All @@ -196,6 +195,24 @@ code {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.lightbox-close::before,
.lightbox-close::after {
content: '';
position: absolute;
width: 1.1rem;
height: 2.5px;
background: white;
border-radius: 1px;
}

.lightbox-close::before {
transform: rotate(45deg);
}

.lightbox-close::after {
transform: rotate(-45deg);
}

.lightbox-close:hover {
background: var(--color-primary-hover);
transform: scale(1.1);
Expand Down Expand Up @@ -227,7 +244,7 @@ code {
background: var(--color-primary);
border: none;
color: white;
font-size: 2rem;
font-size: 0;
width: 3rem;
height: 3rem;
border-radius: 50%;
Expand All @@ -240,6 +257,25 @@ code {
z-index: 10;
}

.lightbox-nav::before {
content: '';
display: block;
width: 0.6rem;
height: 0.6rem;
border-top: 2.5px solid white;
border-right: 2.5px solid white;
}

.lightbox-prev::before {
transform: rotate(-135deg);
margin-left: 0.2rem;
}

.lightbox-next::before {
transform: rotate(45deg);
margin-right: 0.2rem;
}

.lightbox-nav:hover:not(.disabled) {
background: var(--color-primary-hover);
transform: translateY(-50%) scale(1.1);
Expand Down