Skip to content

Commit

Permalink
fix bible ui styling
Browse files Browse the repository at this point in the history
  • Loading branch information
narthur committed Dec 25, 2024
1 parent 35f7a28 commit d2051ca
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 19 deletions.
4 changes: 3 additions & 1 deletion src/components/organisms/passageNavigation/bookGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ type Props = {
selectedBook: Book;
selectBook: (book: Book) => void;
chapterId: ChapterId;
className?: string;
};

export default function BookGrid({
books,
selectedBook,
selectBook,
chapterId,
className,
}: Props) {
return (
<ul className={clsx(styles.books, styles.grid)}>
<ul className={clsx(className, styles.books, styles.grid)}>
{books.map((book) => {
const chapters = book.recordings.nodes;

Expand Down
26 changes: 9 additions & 17 deletions src/components/organisms/passageNavigation/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

.hat {
background-color: var(--bibleHatBackground);
padding: 16px 24px;
padding: 0 24px;
height: 48px;
display: flex;
text-decoration: none;
color: var(--bibleHatTextColor, --bibleTextColor);
Expand All @@ -40,10 +41,6 @@
margin-top: 8px;
margin-bottom: 16px;
}

@media (min-width: $breakpoint-xl) {
flex-direction: row;
}
}

.content {
Expand All @@ -70,11 +67,6 @@
padding-bottom: 16px;
}

// .content .books:global(.grid) {
// display: grid;
// grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
// }

.content li,
.content li button,
.content li a {
Expand All @@ -90,6 +82,10 @@
color: $ts-salmon;
}

.switch {
border-bottom: 1px solid $ts-midTone;
}

.switch > :global(button.active) {
color: $ts-salmon;
}
Expand All @@ -104,16 +100,12 @@
width: 100%;
}

// .books:global(.grid) .chapters {
// grid-column: 1 / -1;
// }

.chapters {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));

border-top: 1px solid $ts-salmon;
border-bottom: 1px solid $ts-salmon;
background-color: $ts-darkened-bibleH;
}

.chapter a {
Expand Down Expand Up @@ -147,8 +139,8 @@
float: left;
}

.books.grid {
border-top: 1px solid $ts-dark;
.nt {
border-top: 1px solid $ts-midTone;
}

.books.grid .book {
Expand Down
3 changes: 2 additions & 1 deletion src/components/organisms/passageNavigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import clsx from 'clsx';
import React, { ReactNode, useEffect, useState } from 'react';
import { FormattedMessage } from 'react-intl';

import IconDisclosure from '~public/img/icons/icon-disclosure.svg';
import IconDisclosure from '~public/img/icons/icon-disclosure-light-small.svg';
import BibleVersionTypeLockup from '~src/components/molecules/bibleVersionTypeLockup';
import Button from '~src/components/molecules/button';
import Dropdown from '~src/components/molecules/dropdown';
Expand Down Expand Up @@ -166,6 +166,7 @@ export default function PassageNavigation({
chapterId={selectedChapterId}
/>
<BookGrid
className={styles.nt}
books={books.filter((book) =>
BIBLE_BOOKS.slice(39).includes(book.title),
)}
Expand Down

0 comments on commit d2051ca

Please sign in to comment.