Skip to content

Commit 3964cae

Browse files
Merge PR #611 manually (skipping broken parts) - styling for modal buttons, pwa banner fix, missing pwa.css links
1 parent 903466d commit 3964cae

5 files changed

Lines changed: 108 additions & 9 deletions

File tree

‎frontend/css/style.css‎

Lines changed: 96 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,29 +1221,118 @@ main {
12211221
.modal-actions {
12221222
margin-top: auto;
12231223
display: flex;
1224-
gap: 1rem;
1224+
gap: 0.75rem;
1225+
align-items: center;
1226+
justify-content: flex-end;
1227+
flex-wrap: wrap;
12251228
}
12261229

12271230
.btn-primary {
12281231
background: var(--text-main);
12291232
color: var(--bg-color);
12301233
border: none;
1231-
padding: 1rem 2rem;
1232-
border-radius: 30px;
1234+
padding: 0.8rem 1.25rem;
1235+
min-height: 44px;
1236+
min-width: 140px;
1237+
border-radius: 12px;
12331238
font-family: "Georgia", serif;
1234-
font-size: 1.1rem;
1239+
font-size: 1.05rem;
12351240
cursor: pointer;
1236-
transition: all 0.3s;
1241+
transition: all 0.18s ease;
12371242
display: flex;
12381243
align-items: center;
1239-
gap: 0.8rem;
1244+
gap: 0.6rem;
12401245
}
12411246

12421247
.btn-primary:hover {
12431248
background: var(--accent-gold);
12441249
color: #fff;
12451250
transform: translateY(-2px);
1246-
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
1251+
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
1252+
}
1253+
1254+
/* Preview & Secondary buttons aligned with primary style */
1255+
.btn-preview,
1256+
.modal-share-btn {
1257+
min-height: 44px;
1258+
min-width: 120px;
1259+
padding: 0.7rem 1rem;
1260+
border-radius: 12px;
1261+
display: inline-flex;
1262+
align-items: center;
1263+
gap: 0.6rem;
1264+
font-family: inherit;
1265+
font-size: 0.98rem;
1266+
}
1267+
1268+
.btn-preview {
1269+
background: transparent;
1270+
color: var(--text-main);
1271+
border: 2px solid var(--glass-border);
1272+
}
1273+
1274+
.btn-preview:hover {
1275+
background: rgba(212,175,55,0.08);
1276+
border-color: var(--accent-gold);
1277+
}
1278+
1279+
.modal-share-btn {
1280+
background: transparent;
1281+
border: 1px solid var(--glass-border);
1282+
}
1283+
1284+
.modal-share-btn:hover {
1285+
background: rgba(0,0,0,0.04);
1286+
transform: translateY(-1px);
1287+
}
1288+
1289+
/* Accessible focus outlines */
1290+
.btn-primary:focus-visible,
1291+
.btn-preview:focus-visible,
1292+
.modal-share-btn:focus-visible {
1293+
outline: 3px solid rgba(212,175,55,0.18);
1294+
outline-offset: 3px;
1295+
}
1296+
1297+
/* Make Add to Library button visually match the Preview button */
1298+
#modal-add-btn {
1299+
min-height: 44px;
1300+
min-width: 140px;
1301+
padding: 0.8rem 1.25rem;
1302+
border-radius: 12px;
1303+
display: inline-flex;
1304+
align-items: center;
1305+
gap: 0.6rem;
1306+
background: transparent;
1307+
border: 2px solid var(--glass-border);
1308+
color: var(--text-main);
1309+
font-family: inherit;
1310+
font-size: 1rem;
1311+
cursor: pointer;
1312+
transition: all 0.18s ease;
1313+
}
1314+
1315+
#modal-add-btn:hover {
1316+
background: rgba(212,175,55,0.06);
1317+
border-color: var(--accent-gold);
1318+
transform: translateY(-1px);
1319+
}
1320+
1321+
/* When the book is already in the library show a filled accent state */
1322+
#modal-add-btn.library-remove-btn {
1323+
background: linear-gradient(135deg, var(--accent-gold), #e6c44a);
1324+
color: var(--wood-dark);
1325+
border-color: var(--accent-gold);
1326+
box-shadow: 0 8px 28px rgba(212,175,55,0.18);
1327+
}
1328+
1329+
#modal-add-btn.library-remove-btn:hover {
1330+
transform: translateY(-2px);
1331+
}
1332+
1333+
#modal-add-btn:focus-visible {
1334+
outline: 3px solid rgba(212,175,55,0.18);
1335+
outline-offset: 3px;
12471336
}
12481337

12491338
/* Responsive Modal */

‎frontend/js/pwa.js‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,14 @@
148148
</div>
149149
`;
150150

151-
document.querySelector("main").appendChild(banner);
151+
const footer = document.querySelector(".main-footer");
152+
if (footer) {
153+
footer.parentNode.insertBefore(banner, footer);
154+
} else {
155+
const main = document.querySelector("main");
156+
if (main) main.appendChild(banner);
157+
else document.body.appendChild(banner);
158+
}
152159

153160
// Animate in
154161
requestAnimationFrame(() => banner.classList.add('pwa-banner-visible'));

‎frontend/pages/chat.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@
264264
</style>
265265
<link rel="icon" href="../assets/images/biblioDrift_favicon.png" type="image/png">
266266
<!-- PWA -->
267+
<link rel="stylesheet" href="../css/pwa.css">
267268
<link rel="manifest" href="../manifest.json">
268269
<meta name="theme-color" content="#2c2420">
269270
<meta name="apple-mobile-web-app-capable" content="yes">

‎frontend/pages/library.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
4141
<link rel="icon" href="../assets/images/biblioDrift_favicon.png" type="image/png">
4242
<!-- PWA -->
43-
<link rel="manifest" href="/manifest.json">
43+
<link rel="stylesheet" href="../css/pwa.css">
44+
<link rel="manifest" href="../manifest.json">
4445
<meta name="theme-color" content="#2c2420">
4546
<meta name="apple-mobile-web-app-capable" content="yes">
4647
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

‎frontend/pages/profile.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
2323
<link rel="icon" href="../assets/images/biblioDrift_favicon.png" type="image/png">
2424
<!-- PWA -->
25+
<link rel="stylesheet" href="../css/pwa.css">
2526
<link rel="manifest" href="../manifest.json">
2627
<meta name="theme-color" content="#2c2420">
2728
<meta name="apple-mobile-web-app-capable" content="yes">

0 commit comments

Comments
 (0)