Add font: "Amiri Quran Regular"

This commit is contained in:
0x1eef 2024-09-18 10:53:36 -03:00
parent bf2d01c812
commit 7a9091fd6c
5 changed files with 21 additions and 2 deletions

View file

@ -2,6 +2,10 @@
** vNEXT
**** Add "Amiri Quran Regular" font
This new font is used specifically for the contents of a surah
in the Arabic locale / language
**** Replace custom z-index rule
Replace custom z-index rule with the CSS class ~.z-10~

View file

@ -19,6 +19,11 @@ body .root .content.theme {
}
body .root .content.theme.rtl {
ul.body.stream[lang="ar"] {
li.ayah p {
font-family: "Amiri Quran Regular";
}
}
ul.body.stream {
li.ayah p {
max-width: 470px;

Binary file not shown.

View file

@ -21,6 +21,7 @@ export function Stream({
t,
}: Props) {
const className = endOfStream || isPaused ? ["scroll-y"] : [];
const isArabic = locale.name === "ar";
const ref = useRef<HTMLUListElement>(null);
const ul = useMemo<JSX.Element>(() => {
const ltr = locale.direction === "ltr";
@ -37,7 +38,13 @@ export function Stream({
>
{stream.map((ayah: Ayah) => {
return (
<li key={ayah.id} className="ayah fade mb-5">
<li
key={ayah.id}
className={classNames("ayah fade", {
"mb-10": isArabic,
"mb-5": !isArabic,
})}
>
<span
className={classNames("flex h-8 items-center", { "mb-2": rtl })}
>
@ -59,7 +66,9 @@ export function Stream({
{formatNumber(locale, surah.ayat.length)}
</span>
</span>
<p className="m-0">{ayah.body}</p>
<p className={classNames("m-0", { "text-2xl": isArabic })}>
{ayah.body}
</p>
</li>
);
})}

View file

@ -22,6 +22,7 @@ import { formatNumber } from "~/lib/t";
item.script(`/js/main/vendor.js?v=${rev}`, { id: "0" }),
item.script(`/js/main/surah-stream.js?v=${rev}`, { id: "1" }),
item.font("Kanit Regular", "url(/fonts/kanit-regular.ttf)"),
item.font("Amiri Quran Regular", "url(/fonts/amiri-quran-regular.ttf)"),
/* eslint-disable */
item.json(`/json/${doc.lang}/${surahId}/info.json?v=${rev}`, { className: "json surahinfo" }),
item.json(`/json/${doc.lang}/${surahId}/surah.json?v=${rev}`, { className: "json surah" }),