mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03:00
Carousel very buggy on mobile. Add close button.
This commit is contained in:
parent
5797b9bc38
commit
80b3432ccb
2 changed files with 29 additions and 5 deletions
15
src/app.css
15
src/app.css
|
@ -325,16 +325,22 @@ a.hashtag {
|
|||
max-height: 100vh;
|
||||
}
|
||||
|
||||
.carousel-top-controls {
|
||||
top: 0;
|
||||
}
|
||||
.carousel-controls {
|
||||
bottom: 0;
|
||||
}
|
||||
:is(.carousel-top-controls, .carousel-controls) {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
text-align: center;
|
||||
padding: 32px;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
justify-content: space-between;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button.carousel-button {
|
||||
font-weight: bold;
|
||||
color: var(--link-color);
|
||||
|
@ -460,4 +466,7 @@ button.carousel-dot.active {
|
|||
.box {
|
||||
padding: 32px;
|
||||
}
|
||||
:is(.carousel-top-controls, .carousel-controls) {
|
||||
padding: 32px;
|
||||
}
|
||||
}
|
|
@ -785,10 +785,25 @@ function Status({ statusID, status, withinContext, size = 'm', skeleton }) {
|
|||
</div>
|
||||
{showMediaModal !== false && (
|
||||
<Modal>
|
||||
<div class="carousel-top-controls">
|
||||
<span />
|
||||
<button
|
||||
type="button"
|
||||
class="carousel-button plain"
|
||||
onClick={() => setShowMediaModal(false)}
|
||||
>
|
||||
<Icon icon="x" />
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
class="carousel"
|
||||
onClick={() => {
|
||||
onClick={(e) => {
|
||||
if (
|
||||
e.target.classList.contains('carousel-item') ||
|
||||
e.target.classList.contains('media')
|
||||
) {
|
||||
setShowMediaModal(false);
|
||||
}
|
||||
}}
|
||||
tabindex="0"
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue