05e519c737
UI changes
2023-10-14 09:21:39 -03:00
e9d35b51f7
Add stall recovery
2023-10-14 09:21:39 -03:00
150b391fdf
Add stall recovery
2023-10-14 09:21:39 -03:00
9e35b979db
Remove script from DOM after it has been loaded
2023-10-14 09:21:39 -03:00
04fb949a28
Add AudioControl
2023-10-13 00:37:16 -03:00
1d641e7c71
Re-organize project files
...
Attempt to simplify the layout of project files.
2023-10-08 06:31:29 -03:00
600f5cb799
Add / to end of links on the surah index
...
There is now a nginx rewrite rule in place that will automatically
redirect to a path with a trailing /.
2023-10-06 00:06:25 -03:00
84c91974ed
Fix 'refresh'
...
When the 'refresh' icon is clicked, we should reset 'endOfStream'
to false or the stream will stop playing after the first ayah.
2023-10-05 01:11:52 -03:00
461b3a0092
Remove Quran.Slice
...
Fix #147
2023-10-05 01:11:52 -03:00
226621b979
Swap the footer after the last ayah has finished playing
...
Rather than swapping the footer when the last ayah starts playing,
swap the footer when the last ayah stops playing.
2023-09-15 09:26:54 -03:00
e16f6b261f
Ensure the timer never displays a number less than 0
...
This can sometimes happen on iOS (eg -0, -0.1)
2023-07-23 18:10:54 -03:00
d30c9d1c3b
v0.5.0
2023-07-17 09:24:27 -03:00
2bb64eb390
Add spinner
...
When the audio is stalled or "waiting", show an animation
that indicates the loading state.
2023-07-17 09:16:22 -03:00
dd6857af7f
Avoid setting the same src
2023-07-17 09:14:10 -03:00
6a14d5f8fd
Replace useState (tid, setTid) with a local variable
2023-07-16 06:50:05 -03:00
8026101e07
linter: fix
2023-07-15 06:02:58 -03:00
ea9197ae6e
Don't reset timer when sound is turned off
...
Toggle of the speaker to "off" state should not reset the timer.
That should only happen when the speaker is turned "on".
2023-07-15 06:00:29 -03:00
e3ef370027
Improve iOS support
2023-07-15 00:48:22 -03:00
fdfb75a648
Update useEffect dependencies
2023-07-14 21:07:42 -03:00
5d934918fe
Clear all audio listeners
2023-07-14 18:17:14 -03:00
70a33d4bd7
Clear "ended" listener
2023-07-14 17:54:54 -03:00
7a60e36ff1
Don't fetch audio unless sound is on
2023-07-13 20:56:37 -03:00
a98703978f
Render <audio> tag conditionally
2023-07-13 18:17:07 -03:00
adabd152bd
prettier: maxwidth = 90
2023-07-13 14:14:22 -03:00
3def4f26e4
Run prettier over src/js/
2023-07-13 14:11:07 -03:00
dd833a384d
Additional changes for iOS
...
Still not flawless. More work required.
2023-07-13 12:21:55 -03:00
465e3bf224
Try to fix audio stream on iOS
2023-07-12 23:00:46 -03:00
7c8134cd05
Remove remnants of webpackage
2023-07-12 21:31:38 -03:00
5455881498
Add audio support
2023-07-12 17:20:32 -03:00
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
0a25e3aeb1
Remove another unused local
2023-07-01 19:36:17 -03:00
de070a08ad
Remove unused local
2023-07-01 19:32:17 -03:00
8e0bde6c44
Fix index, and stream loaders
2023-07-01 19:28:55 -03:00
Robert
5716425bd2
Rename Packet to Postman ( #131 )
2023-06-23 22:31:25 -03:00
Robert
5f300681d2
Add new packet interface ( #130 )
2023-06-23 21:58:56 -03:00
6935e67a49
WebPackage -> Packet
...
Rename WebPackage to Packet.
Move Packet to `/packages/typescript/packet`.
2023-06-21 19:58:31 -03:00
faa5f25a81
Follow up 7f4c8f723d
2023-03-15 18:48:55 -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
41c459e694
Follow up f23756014c
2023-03-15 17:18:59 -03:00
f23756014c
Avoid 404 for '/surahs.json'
...
The '/surahs.json' file is now inlined, and does not require being
fetched over the network.
2023-03-15 17:02:04 -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
3c6b2f6bf4
Fix scroll jump
...
When the 'pause' button was clicked, the text could jump and become
realigned according to the space taken by the now visible scrollbar.
This change fixes that issue by leaving a gap for the scrollbar whether
it is visible or hidden.
2023-03-12 19:33:36 -03:00
5f957af84c
Set document title at compile time
...
This change will hopefully make it easier for search engines to
pick up a page's title.
2023-03-12 11:23:48 -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
a22be0413e
Add /favicon.png
...
Enhances SEO and provides a familiar icon when used with bookmarks.
2023-03-11 18:03:38 -03:00
c1d23f27c7
Re-implement id_redirect.ts without a JS redirect
2023-03-11 16:04:21 -03:00
f691875012
Replace "File.read" with inline_json
2023-03-11 14:20:28 -03:00
d547c5420a
Add '.css.webpackage' class to inline style
2023-03-11 14:20:18 -03:00
3bbe8cf165
Inline surahs.json, slugs.json, and i18n.json
2023-03-11 09:27:31 -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
4d8a19cd95
React: add strict mode support
2023-03-11 08:04:06 -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
ce44f2e4d3
Open surah stream in the same tab
2023-03-10 08:52:53 -03:00
9fef5122eb
Add surah/id_redirect
2023-03-10 07:48:47 -03:00
2dfadcb937
Add surah/random
2023-03-10 07:39:03 -03:00
20b7420ac9
Replace TheSurahPage with surah/stream
2023-03-10 06:47:35 -03:00
eac53f8da1
Add surah/redirect
2023-03-10 06:13:49 -03:00
d8b63e4fd0
Replace TheSurahIndex with surah/index
2023-03-10 06:13:49 -03:00
c892d88e65
Redirect to the surah index from the root path
...
When a browser visits the root path (/) then redirect to
the surah index with the appropriate locale (eg /en/, /ar/).
2023-03-08 00:27:01 -03:00
c3e84202a2
Apply kanit regular to transliterated name
2023-03-06 17:37:18 -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
97f3add66a
Remove unused imports
2023-02-28 19:19:48 -03:00
18d84fa90c
Decouple LanguageSelect.tsx
from TheSurahPage
.
...
Ref #2
2023-02-28 19:19:48 -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
51b7a523ce
s/theme-and-language/dropdown-row/g
2023-02-28 05:03:09 -03:00
78a0146cf9
Generalize the CSS
2023-02-28 05:03:09 -03:00
438e327ea1
src/js/components/TheQuran -> src/js/components/TheSurahPage
2023-02-28 05:03:09 -03:00
7af6147172
Replace Ayah[] with Ayat type (LanguageSelect.tsx)
2023-01-12 21:51:52 -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
bc0078f5d4
Fix: remove 'slice' prop from Timer
2023-01-05 19:31:32 -03:00
5376b632dd
mv lib/slice.ts lib/Quran/slice.ts
2023-01-05 19:31:32 -03:00
88ca256355
Remove "ayah" prop from Timer component
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
2b06c933ee
Remove prefix from 'Props'
...
For example, 'StreamProps' is now simply 'Props'
2023-01-04 23:32:49 -03:00
56c8bfbbc6
Preload Arabic font (Vazitmatn Regular)
...
This change should improve performance when switching between
the English, and Arabic languages.
Fix #66
2022-12-30 08:58:43 -03:00
8626dad6d9
Revise HTML markup, and stylesheets
...
* Remove the 'AboutSurah' component:
It is too simple to be worth being a component.
* Prefer long-form CSS syntax over SCSS indentation:
I think it is easier to read, although there's probably
still a soft spot to find between the two.
* Rename root class from 'surah' to 'root-box'.
* Rename / revise other CSS class names.
2022-12-30 08:39:59 -03:00
37faf82a42
Prevent timer going out of sync when switching themes
...
I discovered this bug while testing recent changes on iOS.
After the theme was changed, there appeared to be two active
threads of execution that would step on each other's toes.
Storing the surah with useState() appears to have fixed the
bug.
2022-12-28 05:00:10 -03:00
652e787013
Add support for ?ayah=X query parameter
...
This query parameter can be used to start a surah at the given ayah,
and it is used by the LanguageSelect component when switching between
languages.
Fix https://github.com/ReflectsLight/al-quran/issues/61
2022-12-28 04:06:07 -03:00
431bde851c
Add Select component
...
The Select component renders a list, and provides more flexibility
in how the element is styled (compared to a regular "<select>").
2022-12-28 04:01:23 -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