-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
824 lines (717 loc) · 19.3 KB
/
styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
/* styles.css */
@font-face {
font-family: 'sbl_greek';
src: url('./fonts/sbl_greek.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
/* Base Styles */
body {
margin: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: var(--base-font-size); /* Base font size for other elements */
background-color: var(--background-color);
color: var(--text-color);
transition: background-color 0.3s, color 0.3s;
}
:root {
--primary-color: #007bff; /* Default blue for light mode */
--primary-color-hover: #0056b3; /* Darker shade for hover in light mode */
--background-color: #ffffff;
--text-color: #000000;
--header-background: #f8f9fa;
--modal-background: rgba(0, 0, 0, 0.5);
--content-background: #ffffff;
--nav-select-background: #ffffff;
--nav-select-color: #000000;
--nav-select-border-color: #ced4da;
--button-background: #007bff;
--button-color: #ffffff;
--button-hover-background: #0056b3;
--nav-button-background: rgba(0, 123, 255, 0.8);
--nav-button-color: #ffffff;
--nav-button-hover-background: rgba(0, 123, 255, 1);
--checkbox-color: #007bff;
--base-font-size: 16px; /* Base font size for other elements */
--verse-font-size: 20px; /* Font size for verses */
--range-track-bg-color: #3a3a3a;
--chapter-button-bg: #ffffff; /* White background */
--chapter-button-text: #000000; /* Black text */
--chapter-button-hover-bg: #ddd; /* Light gray on hover */
--chapter-button-active-bg: #3399ff; /* Blue when active */
--chapter-button-active-text: #ffffff; /* White text when active */
}
body.dark {
--primary-color: #28a745; /* Green for dark mode */
--primary-color-hover: #218838; /* Darker shade for hover in dark mode */
--background-color: #121212;
--text-color: #e0e0e0;
--header-background: #1f1f1f;
--modal-background: rgba(255, 255, 255, 0.1);
--content-background: #1e1e1e;
--nav-select-background: #2c2c2c;
--nav-select-color: #ffffff;
--nav-select-border-color: #555;
--button-background: #28a745;
--button-color: #ffffff;
--button-hover-background: #218838;
--nav-button-background: rgba(40, 167, 69, 0.8);
--nav-button-color: #ffffff;
--nav-button-hover-background: rgba(40, 167, 69, 1);
--checkbox-color: #28a745;
--range-track-bg-color: #555;
--chapter-button-bg: #2c2c2c; /* Dark gray background */
--chapter-button-text: #ffffff; /* White text */
--chapter-button-hover-bg: #3a3a3a; /* Slightly lighter gray on hover */
--chapter-button-active-bg: var(--primary-color); /* Green when active */
--chapter-button-active-text: #ffffff; /* White text when active */
}
header {
position: fixed;
top: 0;
width: 100%;
background-color: var(--header-background);
padding: 10px 15px;
display: flex;
align-items: center;
justify-content: space-between; /* Distribute space between elements */
box-sizing: border-box; /* Ensure padding is included in width */
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
z-index: 1000;
}
.logo {
flex: 1 1 auto; /* Allow the logo to grow and shrink */
text-align: center; /* Center the logo text */
font-size: 1.2em;
font-weight: 600;
color: var(--text-color);
white-space: nowrap; /* Prevent the text from wrapping */
overflow: hidden; /* Hide overflow if necessary */
text-overflow: ellipsis; /* Add ellipsis if text overflows */
}
.logo i {
margin-right: 8px;
color: var(--button-background);
}
.hamburger-button,
.settings-button {
background: none;
border: none;
color: var(--text-color);
font-size: 1.5em;
cursor: pointer;
padding: 8px;
flex-shrink: 0; /* Prevent buttons from shrinking */
}
.hamburger-button:hover,
.settings-button:hover {
color: var(--primary-color-hover);
}
@media (min-width: 961px) {
.hamburger-button {
display: none; /* Hide hamburger button on desktop */
}
.chapter-navigation {
left: calc(50% + 125px); /* Shift right by half of the sidebar's width (250px / 2) */
transform: translateX(-50%);
}
.modal-content {
margin-left: 250px; /* Half of the side-nav width */
}
.chapter {
padding-left: 10px;
}
}
.side-nav {
position: fixed;
top: 60px; /* Height of the header */
left: 0;
width: 250px;
height: calc(100% - 60px);
background-color: var(--header-background);
overflow-y: auto;
padding: 10px;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
z-index: 10000;
}
@media (max-width: 960px) {
header {
padding: 8px 10px;
}
.logo {
font-size: 1em;
}
.hamburger-button,
.settings-button {
font-size: 1.2em;
padding: 6px;
}
.side-nav {
-webkit-transition: left 0.3s ease-in-out;
-moz-transition: left 0.3s ease-in-out;
-o-transition: left 0.3s ease-in-out;
transition: left 0.3s ease-in-out;
left: -250px; /* Hidden by default */
width: 250px;
top: 50px;
height: calc(100% - 50px);
box-sizing: border-box; /* Include padding and border in width */
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
z-index: 10000;
}
.side-nav.open {
left: 0;
z-index: 10000; /* Ensure it's on top when opened */
}
/* Backdrop behind the menu to handle clicks outside */
.side-nav-backdrop {
display: none;
position: fixed;
top: 50px; /* Same as side-nav */
left: 0;
width: 100%;
height: calc(100% - 50px);
background-color: rgba(0, 0, 0, 0.5);
z-index: 975; /* Below the side-nav but above other content */
}
.side-nav.open ~ .side-nav-backdrop {
display: block;
}
.hamburger-button {
display: block; /* Show on mobile */
z-index: 10001; /* Ensure the hamburger button is on top */
}
body main {
padding: 80px 20px 20px 20px;
}
.chapter-navigation {
bottom: 70px;
left: 50%;
}
.side-nav.open ~ .chapter-navigation {
display: none;
}
}
body.no-scroll {
overflow: hidden;
}
.book-list {
list-style: none;
padding: 0 0 20px;
margin: 0;
}
.book-title {
padding: 10px 15px;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
display: flex;
align-items: center;
position: relative;
font-family: 'sbl_greek';
font-weight: 400;
}
.book-item.active .book-title {
background-color: var(--primary-color);
color: #fff;
}
.book-item:hover .book-title {
background-color: var(--primary-color);
color: #fff;
}
/* Chapter Grid Styles within Book Items */
.book-item .chapter-grid {
margin-top: 5px;
gap: 5px;
transition: max-height 0.3s ease, opacity 0.3s ease;
overflow: hidden;
max-height: 0; /* Hidden by default */
opacity: 0;
}
.book-item .chapter-grid:not(.hidden) {
max-height: 1000px; /* Sufficiently large to show all chapters */
opacity: 1;
display: grid; /* Ensure grid is displayed when visible */
}
/* Optional: Add a caret icon to indicate expandable items */
.book-title::after {
content: '\f0da'; /* FontAwesome caret-down icon */
font-family: 'Font Awesome 6 Free';
font-weight: 900;
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
transition: transform 0.3s;
}
.book-item.active .book-title::after {
transform: translateY(-50%) rotate(180deg);
}
.book-item:last-child .chapter-grid:not(.hidden) {
margin-bottom: 100px; /* Adjust the value as needed */
}
/* Chapter Button Styles */
.chapter-button {
padding: 6px;
background-color: transparent;
color: var(--chapter-button-text);
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
font-size: 0.9em;
}
.chapter-button:hover {
background-color: var(--chapter-button-hover-bg);
}
.chapter-button:active,
.chapter-button:focus {
background-color: var(--chapter-button-active-bg);
color: var(--chapter-button-active-text);
outline: none; /* Removes the default focus outline */
}
.chapter-button.active {
background-color: var(--chapter-button-active-bg);
color: var(--chapter-button-active-text);
}
.hidden {
display: none;
}
main {
padding: 80px 20px 20px 270px; /* Left padding to accommodate side nav */
max-width: 800px;
margin: 0 auto;
min-height: 100vh;
}
.chapter {
margin-bottom: 40px;
background-color: var(--content-background);
box-shadow: 0 0 0 60px var(--content-background);
}
.chapter h2 {
font-size: clamp(1.5em, 5vw, 2em);
margin-top: 0;
margin-bottom: 10px;
border-bottom: 2px solid #dee2e6;
padding-bottom: 10px;
color: var(--button-background);
font-family: 'sbl_greek';
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.verse {
font-weight: normal;
font-size: var(--verse-font-size);
margin-bottom: 15px;
line-height: 1.6;
}
.verse-number {
font-size: 0.6em;
vertical-align: super;
font-weight: normal;
margin-right: 6px;
color: var(--text-color);
}
.bold-word {
font-weight: bold;
}
.unbold-word {
font-weight: normal;
}
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--modal-background);
display: flex;
justify-content: center;
align-items: center;
z-index: 950;
}
.modal.hidden {
display: none;
}
.modal-content {
background-color: var(--content-background);
padding: 25px 30px;
border-radius: 8px;
width: 90%;
max-width: 450px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
color: var(--text-color);
position: relative; /* To position the close button */
}
.close-button {
position: absolute;
top: 15px;
right: 20px;
font-size: 1.5em;
cursor: pointer;
color: var(--text-color);
}
.setting {
display: flex;
align-items: center;
margin-bottom: 20px;
}
.setting label {
flex: 0 0 150px;
margin-right: 10px;
font-weight: 600;
}
.setting select {
width: 100%; /* Full width for dropdown */
padding: 5px;
font-size: 1em;
border: 1px solid var(--nav-select-border-color);
border-radius: 4px;
background-color: var(--nav-select-background);
color: var(--nav-select-color);
}
.setting select:focus {
outline: none;
border-color: #80bdff;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}
.font-size-setting {
display: flex;
align-items: center;
flex: 1;
}
.font-size-setting input[type="range"] {
flex: 1;
margin: 0 10px;
}
.setting label {
flex: 0 0 150px;
margin-right: 10px;
font-weight: 600;
}
.font-size-icon {
font-size: 1.2em; /* Font size for the A icons */
font-weight: normal; /* Ensure it's not bold */
color: var(--text-color); /* Use the text color from the theme */
}
/* Smaller 'A' for the left */
.font-size-icon.small {
font-size: 0.9em; /* Make the 'A' smaller on the left */
}
/* Larger 'A' for the right */
.font-size-icon.large {
font-size: 1.8em; /* Make the 'A' larger on the right */
}
.setting input[type="checkbox"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
width: 20px;
height: 20px;
border: 1px solid var(--nav-select-border-color);
border-radius: 4px;
background-color: var(--nav-select-background);
color: var(--nav-select-color);
accent-color: var(--checkbox-color);
transition: background-color 0.3s, border-color 0.3s, accent-color 0.3s;
position: relative;
}
.setting input[type="checkbox"]:checked {
background-color: var(--checkbox-color);
border-color: var(--checkbox-color);
}
.setting input[type="checkbox"]:checked::after {
content: '\2714'; /* Checkmark symbol */
color: white;
font-size: 14px;
position: absolute;
top: 0;
left: 3px;
display: block;
line-height: 18px;
}
.setting input[type="range"] {
flex: 1;
margin: 0 10px;
-webkit-appearance: none;
height: 4px;
border-radius: 5px;
background: var(--range-track-bg-color);
outline: none;
transition: opacity 0.2s, background 0.3s;
}
/* Styles for the slider thumb */
.setting input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 15px;
height: 15px;
border-radius: 50%;
background: var(--primary-color);
cursor: pointer;
transition: background 0.3s;
}
.setting input[type="range"]::-moz-range-thumb {
width: 15px;
height: 15px;
border-radius: 50%;
background: var(--primary-color);
cursor: pointer;
transition: background 0.3s;
}
.setting input[type="range"]::-ms-thumb {
width: 15px;
height: 15px;
border-radius: 50%;
background: var(--primary-color);
cursor: pointer;
transition: background 0.3s;
}
.setting button#save-settings-button {
width: 100%;
padding: 12px;
background-color: var(--button-background);
color: var(--button-color);
border: none;
border-radius: 4px;
font-size: 1em;
cursor: pointer;
transition: background-color 0.3s;
}
.setting button#save-settings-button:hover {
background-color: var(--button-hover-background);
}
/* Smooth Scroll Behavior */
html {
scroll-behavior: smooth;
}
/* Chapter Navigation Arrows */
.chapter-navigation {
position: fixed;
bottom: 20px;
transform: translateX(-50%);
display: flex;
gap: 20px;
z-index: 850;
}
.nav-button {
background-color: var(--nav-button-background);
color: var(--nav-button-color);
border: none;
border-radius: 50%;
width: 50px;
height: 50px;
font-size: 1.2em;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.3s, transform 0.2s ease-in-out;
}
/* Apply hover effects only on devices that support hover */
@media (hover: hover) {
.nav-button:hover {
background-color: var(--nav-button-hover-background);
transform: scale(1.1);
}
}
.nav-button:active {
transform: scale(0.95);
}
.nav-button:focus {
outline: none;
transform: scale(1);
}
.nav-button:disabled {
background-color: #cccccc;
cursor: not-allowed;
transform: scale(1);
}
.paragraph {
text-indent: 2em;
padding-bottom: 1em;
}
@media (max-width: 480px) {
.chapter h2 {
font-size: clamp(1em, 6vw, 1.5em);
}
.nav-button {
width: 40px;
height: 40px;
font-size: 1em;
}
.chapter-navigation {
bottom: 10px;
gap: 10px;
}
.modal-content {
padding: 15px;
}
.setting label {
font-size: 0.9em;
width: auto;
margin-right: 5px;
}
}
.side-nav-backdrop {
display: none;
position: fixed;
top: 50px; /* Same as side-nav */
left: 0;
width: 100%;
height: calc(100% - 50px);
background-color: rgba(0, 0, 0, 0.5);
z-index: 975;
}
.side-nav.open ~ .side-nav-backdrop {
display: block;
}
/* General Tooltip Styles */
#tooltip {
position: absolute;
background-color: var(--content-background);
color: var(--text-color);
border: 1px solid var(--nav-select-border-color);
border-radius: 10px;
min-width: 300px;
max-width: 300px;
max-height: 70vh; /* Prevent the tooltip from stretching beyond 70% of the viewport height */
z-index: 900;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
font-size: 12px;
line-height: 22px;
font-family: Gotham, "Gentium Plus", Ezra, Helvetica, Arial, sans-serif;
padding: 10px;
overflow-y: auto; /* Enable scrolling if content exceeds height */
opacity: 0;
transition: opacity 0.3s ease, transform 0.3s ease;
transform: translateY(5%);
pointer-events: none;
word-wrap: break-word; /* Ensure long words wrap */
white-space: normal; /* Allow text to wrap */
box-sizing: border-box; /* Ensure padding is included in width */
}
#tooltip.visible {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
.tooltip-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10px;
border-bottom: 1px solid var(--nav-select-border-color);
font-family: 'sbl_greek';
}
.tooltip-lemma {
font-size: 20px;
color: var(--text-color);
}
.tooltip-close button {
background: none;
border: none;
color: var(--text-color);
font-size: 16px;
cursor: pointer;
text-decoration: none;
}
.tooltip-close button:hover {
color: var(--primary-color);
}
.tooltip-content {
padding-top: 10px;
}
.tooltip-pos-tag,
.tooltip-gloss,
.tooltip-literal,
.tooltip-louw,
.tooltip-strong,
.tooltip-mounce {
margin-bottom: 5px;
}
.tooltip-pos-tag {
border-bottom: 1px solid var(--nav-select-border-color);
padding-bottom: 5px;
}
/* Mobile Styling: Make tooltips modal-like */
@media (max-width: 768px) {
#tooltip {
position: fixed;
bottom: 0;
left: 0;
right: 0;
width: 100vw;
margin: 0;
padding: 20px;
background-color: var(--content-background);
font-size: 16px;
line-height: 24px;
border-radius: 0; /* No round top corners */
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
z-index: 900;
transition: bottom 0.3s ease-in-out, opacity 0.3s ease-in-out;
max-width: none;
word-wrap: break-word;
white-space: normal;
}
.tooltip-header {
padding-bottom: 15px;
}
.tooltip-lemma {
font-size: 20px;
}
.tooltip-close a {
font-size: 18px;
}
.tooltip-content {
padding-top: 15px;
}
}
/* Ensure tooltip does not go off-screen on desktop */
@media (min-width: 769px) {
#tooltip {
max-width: 300px;
}
#tooltip.above-word {
transform: translateY(-105%);
}
#tooltip.below-word {
transform: translateY(5%);
}
#tooltip {
transform-origin: top;
transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
}
/* Adjust the font size for very small devices */
@media (max-width: 480px) {
#tooltip {
font-size: 14px;
line-height: 20px;
}
}
/* Global Custom Scrollbar Styles */
html, body {
scrollbar-color: var(--nav-select-border-color) var(--content-background); /* Firefox Thumb and Track Color */
}
/* WebKit-based browsers (Chrome, Edge, Safari) */
html::-webkit-scrollbar, body::-webkit-scrollbar {
width: 12px; /* Set width for vertical scrollbar */
height: 12px; /* Set height for horizontal scrollbar (if applicable) */
}
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track {
background-color: var(--content-background); /* Track color */
}
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb {
background-color: var(--primary-color); /* Thumb color */
border-radius: 10px; /* Rounded corners for the thumb */
border: 3px solid var(--content-background); /* Creates some padding effect */
}
html::-webkit-scrollbar-thumb:hover, body::-webkit-scrollbar-thumb:hover {
background-color: var(--primary-color-hover); /* Thumb color on hover */
}
html::-webkit-scrollbar-corner, body::-webkit-scrollbar-corner {
background-color: var(--content-background); /* Bottom corner between vertical and horizontal scrollbars */
}