Fix index, and stream loaders
This commit is contained in:
parent
d186dce484
commit
8e0bde6c44
3 changed files with 5 additions and 5 deletions
|
@ -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)'),
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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)'),
|
||||
|
|
Loading…
Reference in a new issue