Skip to content

Commit 50feedd

Browse files
committed
update theme webpage
1 parent 7cf32fe commit 50feedd

10 files changed

Lines changed: 3633 additions & 3534 deletions
-76.1 KB
Binary file not shown.
-95.8 KB
Binary file not shown.
-73.2 KB
Binary file not shown.
-92.9 KB
Binary file not shown.
-91.5 KB
Binary file not shown.
-99.2 KB
Binary file not shown.
-75.3 KB
Binary file not shown.

docs/index.html

Lines changed: 3584 additions & 3528 deletions
Large diffs are not rendered by default.

docs/scripts.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
document.querySelectorAll('.portfolio-item').forEach(item => {
2+
const img = item.querySelector('img');
3+
if (!img.dataset.images) return;
4+
const base = img.dataset.imageBase || '';
5+
const images = img.dataset.images.split(',');
6+
let index = 0;
7+
8+
item.querySelector('.prev').addEventListener('click', () => {
9+
index = (index - 1 + images.length) % images.length;
10+
img.src = base + images[index];
11+
});
12+
13+
item.querySelector('.next').addEventListener('click', () => {
14+
index = (index + 1) % images.length;
15+
img.src = base + images[index];
16+
});
17+
});
18+
119
document.addEventListener('DOMContentLoaded', function() {
220
// UI elements
321
const deviceFilterMenu = document.getElementById('device-filter');
@@ -59,8 +77,7 @@ document.addEventListener('DOMContentLoaded', function() {
5977
isMatchingGroupIDFilter;
6078

6179
// Only show items that match all filters
62-
const parentItem = item.closest('a');
63-
parentItem.style.display = isMatchingAllFilters ? 'block' : 'none';
80+
item.style.display = isMatchingAllFilters ? 'block' : 'none';
6481
});
6582
}
6683

docs/styles.css

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,11 @@ input[type="text"]::placeholder {
125125
display: grid;
126126
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
127127
gap: 20px;
128+
row-gap: 40px;
128129
padding: 20px;
129130

130131
}
131132

132-
.portfolio a {
133-
margin: 10px 0;
134-
}
135-
136133
.portfolio-item {
137134
background-color: #4a4a4a;
138135
padding: 20px;
@@ -183,4 +180,33 @@ a {
183180
a:hover {
184181
text-decoration: none;
185182
color: inherit;
183+
}
184+
185+
.image-wrap {
186+
position: relative; /* ← THIS is what fixes it */
187+
display: inline-block;
188+
}
189+
190+
.image-wrap .prev,
191+
.image-wrap .next {
192+
position: absolute;
193+
top: 26%;
194+
transform: translateY(-26%);
195+
z-index: 2;
196+
197+
background: none;
198+
color: white;
199+
border: none;
200+
font-size: 2rem;
201+
line-height: 1;
202+
203+
cursor: pointer;
204+
}
205+
206+
.image-wrap .prev {
207+
left: -1.5rem;
208+
}
209+
210+
.image-wrap .next {
211+
right: -1.5rem;
186212
}

0 commit comments

Comments
 (0)