Skip to content

Commit 18b35ac

Browse files
committed
fix: update slideshow styles and improve responsiveness; bump Playwright version
1 parent 2b76f28 commit 18b35ac

File tree

6 files changed

+42
-10
lines changed

6 files changed

+42
-10
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ go.work.sum
1515
# env file
1616
.env
1717

18-
1918
# Ignore log files
2019
*.log
2120

dist/slideshow-gallery.scss

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/* Normal view - Constrain height within page context */
23
.slideshow-gallery {
34
position: relative;
@@ -40,6 +41,7 @@
4041
align-items: center;
4142
justify-content: center;
4243
overflow: hidden;
44+
touch-action: pan-y pinch-zoom;
4345
}
4446

4547
/* Image Gallery Item */
@@ -53,9 +55,12 @@
5355

5456
.slideshow-image-gallery-item img {
5557
max-width: 100%;
56-
max-height: 100%;
57-
object-fit: inherit;
58+
max-height: 90vh;
59+
object-fit: contain;
5860
display: none;
61+
-webkit-tap-highlight-color: transparent;
62+
-webkit-user-select: none;
63+
user-select: none;
5964
}
6065

6166
.slideshow-image-gallery-item img.active {
@@ -69,7 +74,7 @@
6974
color: #ddd;
7075
text-align: center;
7176
padding: 10px;
72-
font: 14px / 1.5 sans-serif;
77+
font: 14px / 1.5 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
7378
}
7479

7580
.slideshow-caption-container .lightbox-title {
@@ -86,17 +91,19 @@
8691
overflow-y: hidden;
8792
background-color: #222;
8893
padding: 10px 0;
94+
-webkit-overflow-scrolling: touch;
95+
scrollbar-width: thin;
8996
}
9097

9198
.slideshow-thumbnail-column {
92-
flex: 0 0 16.66%;
99+
flex: 0 0 10%;
93100
padding: 5px;
94101
box-sizing: border-box;
95102
}
96103

97104
.slideshow-thumbnail-column img {
98105
width: 100%;
99-
height: 100px;
106+
height: auto;
100107
object-fit: cover;
101108
opacity: 0.6;
102109
transition: opacity 0.3s;
@@ -114,7 +121,7 @@
114121
position: fixed;
115122
top: 0;
116123
left: 0;
117-
// width: 100vw;
124+
width: 100%;
118125
height: 100vh;
119126
z-index: 9999;
120127
background-color: black;
@@ -154,6 +161,7 @@
154161
padding: 10px;
155162
cursor: pointer;
156163
z-index: 10;
164+
transition: background-color 0.3s;
157165
}
158166

159167
.slideshow-prev-button { left: 0px; }
@@ -171,6 +179,29 @@
171179
@media (max-width: 768px) {
172180
.slideshow-thumbnail-column {
173181
flex: 0 0 25%;
182+
min-width: 80px;
183+
}
184+
185+
.slideshow-image-gallery-item img {
186+
max-height: 85vh;
187+
}
188+
189+
.slideshow-prev-button,
190+
.slideshow-next-button,
191+
.slideshow-fullscreen-button {
192+
padding: 15px;
193+
min-width: 44px;
194+
min-height: 44px;
195+
background-color: rgba(0, 0, 0, 0.7);
196+
}
197+
198+
.slideshow-caption-container {
199+
font-size: 13px;
200+
padding: 8px;
201+
}
202+
203+
.slideshow-thumbnail-column img {
204+
height: 80px;
174205
}
175206
}
176207

exampleSite/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.19
44

55
require (
66
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
7-
github.com/gethinode/hinode v0.29.2 // indirect
7+
github.com/gethinode/hinode v0.29.3 // indirect
88
github.com/gethinode/mod-bootstrap v1.3.2 // indirect
99
github.com/gethinode/mod-csp v1.0.7 // indirect
1010
github.com/gethinode/mod-flexsearch/v2 v2.1.0 // indirect

exampleSite/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ github.com/gethinode/hinode v0.27.18 h1:rlksX+VmW37ORcoyE9n33uFF6NdINgmN5fsTtgag
1010
github.com/gethinode/hinode v0.27.18/go.mod h1:k+TUNPNBbNY2kNlzDySw3k/GuDHetfKN/qTXKHwlbk0=
1111
github.com/gethinode/hinode v0.29.2 h1:ozsbmXzjfXTW/+QscUcE1/2+uDkNwksEjAAeAmkLX9o=
1212
github.com/gethinode/hinode v0.29.2/go.mod h1:DJiRTOdTULMQNqgXm7npCXmtQsMtDm7pRX1pi/L/+qM=
13+
github.com/gethinode/hinode v0.29.3 h1:pXT7TH+ZtFRTp987musJ/u0KibVS/oMC3HQkDyFuzcg=
14+
github.com/gethinode/hinode v0.29.3/go.mod h1:wh0Tu9qzrKyyDWlCA1vlxvJvXAubhI+mK8O4kUXLf84=
1315
github.com/gethinode/mod-bootstrap v1.3.1 h1:ZUX72St0WZ5tyXpEPBJlayX/dmCH3cGErzsozkUKCok=
1416
github.com/gethinode/mod-bootstrap v1.3.1/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ=
1517
github.com/gethinode/mod-bootstrap v1.3.2 h1:mf9Qgr+xHZeHjZGYFdurETfdEKKldB158fpjH0GoaNU=

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"cz-conventional-changelog": "^3.3.0",
4848
"hugo-bin": "^0.139.0",
4949
"husky": "^9.1.7",
50-
"playwright": "^1.49.1",
50+
"playwright": "^1.50.0",
5151
"rimraf": "^6.0.1",
5252
"semantic-release": "^24.2.1"
5353
},

0 commit comments

Comments
 (0)