Skip to content

Commit 8c32b0e

Browse files
committed
bbox: hide buttons fully; closes #180
1 parent 9bc4c5d commit 8c32b0e

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

copyparty/web/baguettebox.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,9 +592,7 @@ window.baguetteBox = (function () {
592592
preloadPrev(currentIndex);
593593
});
594594

595-
clmod(ebi('bbox-btns'), 'off');
596-
clmod(btnPrev, 'off');
597-
clmod(btnNext, 'off');
595+
show_buttons(0);
598596

599597
updateOffset();
600598
overlay.style.display = 'block';

copyparty/web/browser.css

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,18 +2199,25 @@ html.y #bbox-overlay figcaption a {
21992199
top: calc(50% - 30px);
22002200
width: 44px;
22012201
height: 60px;
2202+
transition: background-color .3s ease, color .3s ease, left .3s ease, right .3s ease;
2203+
}
2204+
#bbox-btns button {
2205+
transition: background-color .3s ease, color .3s ease;
2206+
}
2207+
#bbox-btns {
2208+
transition: top .3s ease;
22022209
}
22032210
.bbox-btn {
22042211
position: fixed;
22052212
}
2206-
.bbox-btn,
2207-
#bbox-btns {
2208-
opacity: 1;
2209-
animation: opacity .2s infinite ease-in-out;
2213+
#bbox-next.off {
2214+
right: -2.6em;
2215+
}
2216+
#bbox-prev.off {
2217+
left: -2.6em;
22102218
}
2211-
.bbox-btn.off,
22122219
#bbox-btns.off {
2213-
opacity: 0;
2220+
top: -2.2em;
22142221
}
22152222
#bbox-overlay button {
22162223
cursor: pointer;
@@ -2221,8 +2228,6 @@ html.y #bbox-overlay figcaption a {
22212228
border-radius: 15%;
22222229
background: rgba(50, 50, 50, 0.5);
22232230
color: rgba(255,255,255,0.7);
2224-
transition: background-color .3s ease;
2225-
transition: color .3s ease;
22262231
font-size: 1.4em;
22272232
line-height: 1.4em;
22282233
vertical-align: top;
@@ -3267,4 +3272,9 @@ html.d #treepar {
32673272
.dropdesc>div>div {
32683273
transition: none;
32693274
}
3275+
#bbox-next,
3276+
#bbox-prev,
3277+
#bbox-btns {
3278+
transition: background-color .3s ease, color .3s ease;
3279+
}
32703280
}

0 commit comments

Comments
 (0)