Skip to content

Commit 29ba9fc

Browse files
authored
Merge pull request #16 from ackers93/topics
Topics
2 parents 6e494c1 + ce5b9a8 commit 29ba9fc

33 files changed

Lines changed: 1425 additions & 9 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
/app/assets/builds/*
3434
!/app/assets/builds/.keep
3535

36+
# IDE files
3637
.vscode/settings.json
38+
.idea/
3739
Gemfile.lock
3840
/node_modules/*
3941
/node_modules

app/assets/stylesheets/components/_bible.scss

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,133 @@
453453
}
454454
}
455455

456+
// Topics styles
457+
.topics-grid {
458+
display: grid;
459+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
460+
gap: $space-4;
461+
462+
.topic-card {
463+
background: $white;
464+
border: 1px solid $gray-200;
465+
border-radius: $radius-md;
466+
padding: $space-4;
467+
transition: all 0.2s ease;
468+
469+
&:hover {
470+
box-shadow: $shadow-md;
471+
border-color: $primary;
472+
}
473+
474+
.topic-header {
475+
margin-bottom: $space-3;
476+
}
477+
478+
.topic-title {
479+
font-size: $font-size-lg;
480+
font-weight: $font-weight-semibold;
481+
margin-bottom: $space-2;
482+
483+
a {
484+
color: $gray-900;
485+
text-decoration: none;
486+
487+
&:hover {
488+
color: $primary;
489+
}
490+
}
491+
}
492+
493+
.topic-preview {
494+
.verse-preview {
495+
margin-top: $space-2;
496+
font-size: $font-size-sm;
497+
color: $gray-700;
498+
line-height: 1.6;
499+
500+
.verse-ref-link {
501+
color: $primary;
502+
text-decoration: none;
503+
504+
&:hover {
505+
text-decoration: underline;
506+
}
507+
}
508+
}
509+
}
510+
}
511+
}
512+
513+
.topic-verses-list {
514+
.topic-verse-item {
515+
background: $white;
516+
border: 1px solid $gray-200;
517+
border-radius: $radius-md;
518+
padding: $space-4;
519+
margin-bottom: $space-4;
520+
transition: all 0.2s ease;
521+
522+
&:hover {
523+
box-shadow: $shadow-sm;
524+
border-color: $primary;
525+
}
526+
527+
.topic-verse-header {
528+
margin-bottom: $space-3;
529+
}
530+
531+
.topic-verse-reference {
532+
font-size: $font-size-lg;
533+
margin-bottom: $space-2;
534+
}
535+
536+
.topic-verse-meta {
537+
color: $gray-600;
538+
}
539+
540+
.topic-verse-content-wrapper {
541+
display: flex;
542+
gap: $space-6;
543+
align-items: flex-start;
544+
545+
@media (max-width: $breakpoint-md) {
546+
flex-direction: column;
547+
gap: $space-4;
548+
}
549+
}
550+
551+
.topic-verse-text {
552+
flex: 1;
553+
color: $gray-800;
554+
line-height: 1.6;
555+
font-style: italic;
556+
min-width: 0; // Allows text to wrap properly
557+
}
558+
559+
.topic-verse-explanation {
560+
flex: 1;
561+
background: $gray-50;
562+
border-left: 4px solid $primary;
563+
padding: $space-4;
564+
border-radius: $radius-sm;
565+
min-width: 0; // Allows content to wrap properly
566+
567+
h4 {
568+
margin-bottom: $space-2;
569+
}
570+
}
571+
}
572+
}
573+
574+
.topic-link {
575+
color: $primary;
576+
text-decoration: none;
577+
578+
&:hover {
579+
text-decoration: underline;
580+
}
581+
}
582+
456583
.thread-verses {
457584
.thread-verse-item {
458585
display: flex;
@@ -804,6 +931,34 @@
804931
}
805932
}
806933
}
934+
935+
.verse-topics-section {
936+
margin-bottom: $space-3;
937+
font-size: $font-size-sm;
938+
939+
.verse-topics-section-title {
940+
font-weight: $font-weight-semibold;
941+
color: $gray-700;
942+
margin-right: $space-2;
943+
}
944+
945+
.topic-tag {
946+
color: $primary;
947+
font-weight: $font-weight-medium;
948+
949+
&.topic-link {
950+
text-decoration: none;
951+
952+
&:hover {
953+
text-decoration: underline;
954+
}
955+
}
956+
}
957+
}
958+
959+
.verse-actions-section {
960+
font-size: $font-size-sm;
961+
}
807962
}
808963

809964
// Verses list view styles

app/assets/stylesheets/components/_forms.scss

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@
5151
}
5252
}
5353

54+
// Ensure selects work with form-input class
55+
select.form-input {
56+
appearance: none;
57+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
58+
background-position: right $space-3 center;
59+
background-repeat: no-repeat;
60+
background-size: 1.5em 1.5em;
61+
padding-right: $space-10;
62+
63+
&:disabled {
64+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
65+
}
66+
}
67+
5468
.form-control-lg {
5569
padding: $space-4 $space-5;
5670
font-size: $font-size-base;
@@ -176,4 +190,45 @@
176190
.search-button {
177191
white-space: nowrap;
178192
}
193+
}
194+
195+
// Autocomplete dropdown styles
196+
[data-topic-autocomplete-target="dropdown"] {
197+
[data-topic-autocomplete-target="results"] {
198+
list-style: none;
199+
margin: 0;
200+
padding: 0;
201+
202+
li {
203+
list-style: none;
204+
margin: 0;
205+
padding: $space-3 $space-4;
206+
cursor: pointer;
207+
color: $gray-900;
208+
transition: background-color 0.15s ease;
209+
210+
&:hover,
211+
&.bg-gray-100 {
212+
background-color: $gray-100;
213+
}
214+
215+
&:first-child {
216+
border-top-left-radius: $radius;
217+
border-top-right-radius: $radius;
218+
}
219+
220+
&:last-child {
221+
border-bottom-left-radius: $radius;
222+
border-bottom-right-radius: $radius;
223+
}
224+
225+
span {
226+
display: block;
227+
}
228+
229+
strong {
230+
font-weight: $font-weight-semibold;
231+
}
232+
}
233+
}
179234
}

app/assets/stylesheets/layouts/_navigation.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
.nav-container {
1010
max-width: 1200px;
1111
margin: 0 auto;
12-
padding: 0 $space-6;
12+
padding: 0 $space-1;
1313
display: flex;
1414
align-items: center;
1515
justify-content: space-between;
@@ -59,6 +59,10 @@
5959
color: $primary;
6060
background-color: rgba($primary, 0.1);
6161
}
62+
63+
&.nav-link-sm {
64+
font-size: $font-size-sm;
65+
}
6266
}
6367
}
6468
}
@@ -256,7 +260,7 @@
256260
}
257261
}
258262

259-
@media (min-width: $breakpoint-md + 1) {
263+
@media (min-width: $breakpoint-md) {
260264
.navbar {
261265
.nav-menu-mobile {
262266
display: none;

0 commit comments

Comments
 (0)