f5472a3b6c
Remove lib/WebPackage.ts
2023-07-11 20:10:27 -03:00
61728e7216
git rm -r src/js/lib/WebPackage
2023-07-11 18:59:58 -03:00
7f4c8f723d
Display eastern arabic numerals on Iridium / OpenBSD
...
With Iridium running on OpenBSD, '1.toLocaleString("ar")' does not
return an eastern arabic numeral. The more specific locale, "ar-SA",
works as expected.
2023-03-15 17:21:58 -03:00
ae2f4f23c5
Synchronize ?ayah=x parameter on language change
...
When given - for example, `?ayah=5` and then the language is
changed at ayah 7, the "ayah" parameter should be updated to 7.
Fix #85
2023-03-13 20:21:57 -03:00
e4af56c162
Add Quran.Ayah
2023-03-12 11:20:10 -03:00
ad84105776
Add Quran.Surah.mapFromJSON
2023-03-11 18:52:47 -03:00
4e383ec107
numberToDecimal -> formatNumber
2023-03-11 08:35:50 -03:00
914c918eaa
Add a simpler, more organized i18n.ts implementation
2023-03-11 08:35:49 -03:00
e96795f077
await in async function
2023-03-11 08:11:52 -03:00
f1e1f69d56
WebPackage: add strict mode support
2023-03-11 08:03:02 -03:00
667f63fa06
Add link to /<locale>/random
...
Fix #87
2023-03-10 13:13:21 -03:00
3b9bd762f1
Replace surah.translatedName
with surah.localizedName
2023-03-06 17:31:36 -03:00
0073c76fbb
Add TheSurahIndex.tsx
...
TheSurahIndex.tsx provides a list of surahs (aka chapters) from
The Quran. Fix #2 .
2023-03-06 17:30:38 -03:00
f62b3df8c5
linter: fix
2023-02-28 05:03:09 -03:00
941ba2b1e0
Replace custom i18n with toLocaleString
...
And remove IDObject. The ayah ID, and surah ID are now simple
integers.
2023-02-28 05:03:09 -03:00
481ff9274a
Namespace classes, types, etc within "Quran"
2023-02-28 05:03:09 -03:00
7945a1667a
Add slice support to the LanguageSelect component
2023-01-12 21:51:52 -03:00
13789768a1
Add ability to pause, and resume the stream
...
This change allows the stream to be paused, and
resumed on-demand.
2023-01-12 21:51:52 -03:00
44fdb443f8
Enable eslint rule "object-curly-spacing"
2023-01-09 07:03:05 -03:00
25e5703e1a
Add random redirect from the paths /en, and /ar
...
When the theme logo is clicked, the user will be redirected
to a random surah and the current active language will remain
the same.
2023-01-09 05:15:18 -03:00
a5e69e6c23
Fix bug when "slice.coversOneAyah"
...
I discovered a bug where when the "ayah" parameter is set to a single
ayah, and the end of the surah is reached - the "endOfStream" variable
would continue to return false. This would lead to an error in the Timer
component where "ayah" would be accessed as an undefined value.
2023-01-06 21:14:41 -03:00
5376b632dd
mv lib/slice.ts lib/Quran/slice.ts
2023-01-05 19:31:32 -03:00
5715cfb1a1
Add support streaming a given ayah range
...
The "ayah" query parameter can be used to select a
specific range of a surah. For example:
'/en/al-fatihah/?ayah=3..7'
2023-01-05 19:31:32 -03:00
30cf8e96b7
Fix Slice.fromParam
2023-01-05 19:31:32 -03:00
5c8247aedb
Add lib/slice.ts
2023-01-05 19:31:32 -03:00
af5ecfef66
Add eslint "quotes" rule
...
By default this rule expects single quotes to be used
2023-01-05 00:16:30 -03:00
22fd27bba9
Add "@typescript-eslint/member-delimiter-style" rule
...
Apply to all files in /src/js/
2023-01-04 23:48:35 -03:00
76db482721
Surah.ts: add 'slug' getter.
2022-12-27 03:42:20 -03:00
4cef8416fd
WebPackage: add 'fetchOptions'.
2022-12-27 03:42:20 -03:00
5a7f49c2c2
add LanguageSelect.tsx
2022-12-27 03:42:20 -03:00
3b9c68ebe6
Replace useSurah with Surah.fromDOMNode
...
Fix https://github.com/ReflectsLight/al-quran/issues/56
2022-12-26 19:10:22 -03:00
f1f94f46ea
Adjust read time calculations
...
A baseline of two seconds is introduced, and when
the Arabic locale is being used, each word has a
weight of 750ms rather than 500ms.
2022-12-26 17:37:43 -03:00
f1fd6c4e00
Add localization for hard-coded English strings
...
* Replace "Surah X, Ayah Y" with its Arabic equivalenets.
* Add support for Eastern Arabic Numerals . For use with
the Arabic, and Farsi languages.
2022-12-25 20:15:30 -03:00
616f5d6073
add "WebPackage"
...
The "WebPackage" object allows for scripts, stylesheets, fonts, images
and other webpage assets to be downloaded for the page's primary content
to use afterwards.
2022-11-18 17:09:32 -03:00
Gyen Abubakar
5e2ab86e22
eslint & prettier setup
2022-11-11 16:09:33 -03:00
172f25bd62
src/: add src/js/lib/locales.ts
2022-11-08 07:41:43 -03:00
2eeeb439ec
TypeScript: add ts-standard
2022-11-02 00:53:00 -03:00
36f21c8936
s/readingTime/readTimeMs/g
2022-11-01 23:28:03 -03:00
4dd2d20766
Surah.ts: add getters
2022-10-31 15:35:43 -03:00
f28725d0f3
src/js: extract surah id, and locale from location.pathname
2022-10-31 15:35:43 -03:00
34cd6129e8
js/lib/: add Quran.ts, Quran/Surah.ts
2022-10-31 15:35:43 -03:00