This commit is contained in:
parent
4146973cf6
commit
265b580a08
3 changed files with 11 additions and 4 deletions
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
* vNEXT
|
* vNEXT
|
||||||
|
|
||||||
|
** Apply Amiri font for Farsi
|
||||||
|
Similar to Arabic - apply the Amiri Regular font for the content
|
||||||
|
of a surah. With this change the distinction is more so between a
|
||||||
|
RTL language vs a LTR language rather than between Arabic vs English
|
||||||
|
vs Farsi
|
||||||
|
|
||||||
** Center-align ~ul.body.stream~
|
** Center-align ~ul.body.stream~
|
||||||
For RTL languages we will show the content of a surah centered,
|
For RTL languages we will show the content of a surah centered,
|
||||||
and within a max width of 470px
|
and within a max width of 470px
|
||||||
|
|
|
@ -19,7 +19,7 @@ body .root .content.theme {
|
||||||
}
|
}
|
||||||
|
|
||||||
body .root .content.theme.rtl {
|
body .root .content.theme.rtl {
|
||||||
ul.body.stream[lang="ar"] {
|
ul.body.stream {
|
||||||
li.ayah p {
|
li.ayah p {
|
||||||
@extend .font-amiri;
|
@extend .font-amiri;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ export function Stream({
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const className = endOfStream || isPaused ? ["scroll-y"] : [];
|
const className = endOfStream || isPaused ? ["scroll-y"] : [];
|
||||||
const isArabic = locale.name === "ar";
|
const isArabic = locale.name === "ar";
|
||||||
|
const isRTL = locale.direction === "rtl";
|
||||||
const ref = useRef<HTMLUListElement>(null);
|
const ref = useRef<HTMLUListElement>(null);
|
||||||
const ul = useMemo<JSX.Element>(() => {
|
const ul = useMemo<JSX.Element>(() => {
|
||||||
return (
|
return (
|
||||||
|
@ -38,8 +39,8 @@ export function Stream({
|
||||||
<li
|
<li
|
||||||
key={ayah.id}
|
key={ayah.id}
|
||||||
className={classNames("ayah fade", {
|
className={classNames("ayah fade", {
|
||||||
"mb-8": isArabic,
|
"mb-8": isRTL,
|
||||||
"mb-5": !isArabic,
|
"mb-5": !isRTL,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<span className="flex h-8 items-center color-primary">
|
<span className="flex h-8 items-center color-primary">
|
||||||
|
@ -63,7 +64,7 @@ export function Stream({
|
||||||
</span>
|
</span>
|
||||||
<p
|
<p
|
||||||
className={classNames("m-0 color-accent", {
|
className={classNames("m-0 color-accent", {
|
||||||
"text-2xl mt-5": isArabic,
|
"text-2xl mt-5": isRTL,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{ayah.body}
|
{ayah.body}
|
||||||
|
|
Loading…
Reference in a new issue