Fix index, and stream loaders

This commit is contained in:
0x1eef 2023-07-01 19:28:55 -03:00
parent d186dce484
commit 8e0bde6c44
3 changed files with 5 additions and 5 deletions

View file

@ -10,7 +10,7 @@ import postman, { item } from 'postman';
item.script('/js/pages/surah/index.js'),
item.css('/css/pages/surah/index.css'),
item.image('/images/moon.svg'),
item.image('/images/leaf/svg'),
item.image('/images/leaf.svg'),
item.font('Kanit Regular', 'url(/fonts/kanit-regular.ttf)'),
item.font('Vazirmatn Regular', 'url(/fonts/vazirmatn-regular.ttf)'),
item.font('Roboto Mono Regular', 'url(/fonts/roboto-mono-regular.ttf)'),

View file

@ -115,7 +115,7 @@ function SurahStream({ node, locale, slice, paused, t }: Props) {
const locale = root.getAttribute('data-locale') as Quran.Locale;
const surahId = parseInt(root.getAttribute('data-surah-id')!);
const path = `/${locale}/${surahId}/surah.json`;
const node: HTMLScriptElement = document.querySelector(`script[src="${path}"]`)!;
const node: HTMLScriptElement = document.querySelector('script.surah')!;
const toBoolean = (str: string | null): boolean => str !== null && ['1', 't', 'true', 'yes'].includes(str);
const params = new URLSearchParams(location.search);
const slice = Slice.fromParam(params.get('ayah'));

View file

@ -9,10 +9,10 @@ import postman, { item } from 'postman';
postman(
item.script('/js/pages/surah/stream.js'),
item.css('/css/pages/surah/strean.css'),
item.image('/images/moon,svg'),
item.css('/css/pages/surah/stream.css'),
item.image('/images/moon.svg'),
item.image('/images/leaf.svg'),
item.json(`/${locale}/${surahId}/surah.json`),
item.json(`/${locale}/${surahId}/surah.json`, {className: 'surah'}),
item.font('Kanit Regular', 'url(/fonts/kanit-regular.ttf)'),
item.font('Vazirmatn Regular', 'url(/fonts/vazirmatn-regular.ttf)'),
item.font('Roboto Mono Regular', 'url(/fonts/roboto-mono-regular.ttf)'),