diff --git a/src/css/_layout.scss b/src/css/_layout.scss index 3ae2a23..d668aae 100644 --- a/src/css/_layout.scss +++ b/src/css/_layout.scss @@ -2,7 +2,7 @@ $black: #454545; $max-width: 1024px; * { - line-height: 1.5; + line-height: 1; } html[lang="en"] { diff --git a/src/css/components/Icon.scss b/src/css/components/Icon.scss index f8ffad2..05cee5d 100644 --- a/src/css/components/Icon.scss +++ b/src/css/components/Icon.scss @@ -66,11 +66,10 @@ } } -.content.theme ul.stream span.title { +.content.theme ul.stream span { .sound-on.icon, .sound-off.icon { width: 24px; height: 24px; - transform: translate(0, 4px); } } diff --git a/src/css/pages/SurahStream.scss b/src/css/pages/SurahStream.scss index f1475b6..71cef23 100644 --- a/src/css/pages/SurahStream.scss +++ b/src/css/pages/SurahStream.scss @@ -6,6 +6,14 @@ body .root .content.theme { ul.body.stream { scrollbar-gutter: stable; li.ayah.fade { + .sound-on.icon, .sound-off.icon { + width: 24px; + height: 24px; + g { + transform: translate(0, 12px); + } + } + @keyframes FadeIn { 0% { opacity: 0;} 25% { opacity: 0.25; } @@ -28,7 +36,6 @@ body .root .content.theme { body .root .content.theme.en { ul.body.stream { .sound-off.icon, .sound-on.icon { - transform: translate(0, 10px); } } } @@ -48,12 +55,8 @@ body .root .content.theme.ar { ul.body.stream { li.ayah { - .title { - display: block; - margin-bottom: 5px; - } .sound-off.icon, .sound-on.icon { - transform: rotate(180deg) translate(0, -4px); + transform: rotate(180deg); } } } diff --git a/src/js/components/Head.tsx b/src/js/components/Head.tsx index adab060..be08d81 100644 --- a/src/js/components/Head.tsx +++ b/src/js/components/Head.tsx @@ -3,33 +3,27 @@ import type { ReactNode } from "react"; import { ThemeSelect } from "~/components/ThemeSelect"; import { LanguageSelect } from "~/components/LanguageSelect"; import * as Quran from "~/lib/Quran"; -import classNames from "classnames"; import { Theme } from "~/hooks/useTheme"; type Props = { locale: Quran.Locale; theme: string; setTheme: (t: Theme) => void; - children: ReactNode + children: ReactNode; }; -export function Head({locale, theme, setTheme, children}: Props) { +export function Head({ locale, theme, setTheme, children }: Props) { return ( -
-

- - {children} - -

- +
+

+ + {children} + +

+
- ) + ); } diff --git a/src/js/components/LanguageSelect.tsx b/src/js/components/LanguageSelect.tsx index 8249dd4..9b3408e 100644 --- a/src/js/components/LanguageSelect.tsx +++ b/src/js/components/LanguageSelect.tsx @@ -3,7 +3,7 @@ import { Select } from "~/components/Select"; type Props = { locale: string; -} +}; export function LanguageSelect({ locale }: Props) { return ( @@ -15,7 +15,7 @@ export function LanguageSelect({ locale }: Props) { const content = document.querySelector(".content.theme"); const path = location.pathname.replace( new RegExp(`^/${locale}/`), - `/${newLocale}/` + `/${newLocale}/`, ); content.classList.add("invisible"); location.replace(path); diff --git a/src/js/components/Stream.tsx b/src/js/components/Stream.tsx index 54de685..0de6dc8 100644 --- a/src/js/components/Stream.tsx +++ b/src/js/components/Stream.tsx @@ -26,6 +26,8 @@ export function Stream({ const className = endOfStream || isPaused ? ["scroll-y"] : []; const ref = useRef(); const ul = useMemo(() => { + const ltr = locale === "en"; + const rtl = locale === "ar"; return (
    {stream.map((ayah: Quran.Ayah) => { return ( -
  • - +
  • + {(isPaused || endOfStream) && ( -

    {ayah.text}

    +

    {ayah.text}

  • ); })} diff --git a/src/js/components/SurahIndex.tsx b/src/js/components/SurahIndex.tsx index c892177..939e616 100644 --- a/src/js/components/SurahIndex.tsx +++ b/src/js/components/SurahIndex.tsx @@ -34,7 +34,7 @@ export function SurahIndex({ locale, surahs, t }: Props) { locale, )} > - + {t(locale, "TheNobleQuran")}