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