Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: [BUG] Overflow of quotes content for large quotes in mobile view. #247

Merged
merged 6 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/bhagavad-gita-quotes/[[...locale]]/QuotesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default function QuotesPage(props: LocaleAndTranslations) {
const [quoteIndex, setQuoteIndex] = useState(0);

return (
<div className="mb-16">
<div className="min-h-[900px] md:flex md:min-h-[800px] md:flex-col md:justify-center">
<QuotesBanner translate={translate} />
<div className="relative z-10 m-auto h-96 p-0 md:w-[90%] lg:w-[73%] xl:w-[66%]">
<div className="relative z-10 m-auto w-full">
<QuotesNavigator
quoteCount={quotes.length}
quoteIndex={quoteIndex}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Quotes/Quote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Quote({ quoteNumber, quote, translate }: Props) {
<SvgChapterBackground className="relative inset-x-0 bottom-0 m-auto w-full rounded-full text-gray-300 text-opacity-25 dark:text-black dark:text-opacity-25 lg:top-12 lg:w-min" />
</div>

<div className="xs:py-24 relative mx-auto max-w-5xl px-4 text-center font-inter sm:px-6 sm:py-28">
<div className="xs:py-24 relative mx-auto max-w-5xl p-2 text-center font-inter sm:px-6 sm:py-8 ">
<h2
className={classNames(
"font-medium uppercase text-my-orange",
Expand Down
6 changes: 4 additions & 2 deletions src/components/Quotes/QuotesNavigator.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useEffect, useState } from "react";
import { Dispatch, SetStateAction } from "react";

import { SvgChevronLeft, SvgChevronRight } from "../svgs";
Expand Down Expand Up @@ -30,15 +31,16 @@ export default function QuotesNavigator({
{previousQuote >= 1 && (
<button
onClick={previous}
className="absolute left-1 top-1/2 z-[60] flex h-10 w-10 items-center justify-center rounded-full border bg-white hover:cursor-pointer hover:brightness-90 dark:border-gray-600 dark:bg-dark-100 dark:hover:bg-dark-bg md:top-1/2"
className={`absolute left-3 top-2 z-[60] flex h-10 w-10 items-center justify-center rounded-full border hover:cursor-pointer hover:brightness-90 dark:border-gray-600 dark:hover:bg-dark-bg md:top-1/2 lg:left-40`}
>
<SvgChevronLeft className="dark:text-gray-50" />
</button>
)}
{nextQuote <= quoteCount && (
<button
onClick={next}
className="absolute right-1 top-1/2 z-[60] flex h-10 w-10 items-center justify-center rounded-full border bg-white hover:cursor-pointer hover:brightness-90 dark:border-gray-600 dark:bg-dark-100 dark:hover:bg-dark-bg md:top-1/2"
className={`absolute right-3 top-2 z-[60] flex h-10 w-10 items-center justify-center rounded-full border hover:cursor-pointer hover:brightness-90 dark:border-gray-600 dark:hover:bg-dark-bg md:top-1/2 lg:right-40
`}
>
<SvgChevronRight className="dark:text-gray-50" />
</button>
Expand Down
Loading