Skip to content

Commit 80ecc37

Browse files
committed
Gallery modal reactivity; Wider margins; scrollbar styling (FF/Chromium)
1 parent d22facb commit 80ecc37

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

app/src/App.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#root {
2-
max-width: 2800px;
2+
max-width: 95%;
33
margin: 0 auto;
44
padding: 2rem;
55
text-align: center;
@@ -122,7 +122,7 @@
122122
.modalHeader {
123123
text-align: center;
124124
word-break: break-word;
125-
max-width: 2545px;
125+
max-width: 95%;
126126
}
127127

128128
.moreDocument pre {

app/src/GetImages.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function GetImages() {
3131
},
3232
content: {
3333
maxHeight: '90%',
34-
maxWidth: '2545px',
34+
maxWidth: '95%',
3535
top: '50%',
3636
left: '50%',
3737
right: 'auto',
@@ -40,6 +40,8 @@ export default function GetImages() {
4040
transform: 'translate(-50%, -50%)',
4141
backgroundColor: 'rgba(0,0,0,0.25)',
4242
border: 'none',
43+
scrollbarWidth: 'thin',
44+
scrollbarColor: '#141414 #000'
4345
},
4446
}
4547

@@ -253,7 +255,7 @@ export default function GetImages() {
253255
>
254256
{moreLoading && <div className="lds-ellipsis"><div></div><div></div><div></div><div></div></div>}
255257
{moreError && <h2>There was an error during loading.</h2>}
256-
{!moreLoading && !moreError && images[moreIndex] && moreImages[0] && !moreDocument && <div className="modalHeader" style={{width: `calc(224px * ${moreImages.length})`}}>{images[moreIndex].path + images[moreIndex].filename}</div>}
258+
{!moreLoading && !moreError && images[moreIndex] && moreImages[0] && !moreDocument && <div className="modalHeader" style={{width: `calc(224px * ${moreImages.length})`} /*adjust header size for # of images until max width*/}>{images[moreIndex].path + images[moreIndex].filename}</div>}
257259
{!moreLoading && !moreError && images[moreIndex] && moreImages[0] && !moreDocument && moreImages.map((image, index) => (
258260
<div key={index+1000000} className="imgCard" onClick={() => {navigator.clipboard.writeText(images[moreIndex].prompt)}}>
259261
<img width="224" height="336"

app/src/index.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
-webkit-font-smoothing: antialiased;
1313
-moz-osx-font-smoothing: grayscale;
1414
-webkit-text-size-adjust: 100%;
15+
scrollbar-width: thin;
16+
scrollbar-color: #111 #242424
1517
}
1618

1719
a {

0 commit comments

Comments
 (0)