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
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
e2111e33c6
Display the name of a surah in Arabic when locale is "ar"
2022-12-24 15:52:14 -03:00
0cf6089fb7
Fit content on 1378x768 device (follow up)
...
The previous commits broke support on Chrome / Safari on iOS.
`HTMLElement.scroll` does not seem to work when the height is set
as a percentage. This commit also uses `HTMLElement#scrollHeight`
instead of "offsetHeight".
2022-12-24 14:13:22 -03:00
c928f56601
Fit content on 1368x768 device (follow up)
...
Follow up to 80881311badb47133cbcdf440ee0cf470efae6ae
2022-12-24 13:01:53 -03:00
ce7606b62c
The theme image is now a link that goes to /
2022-12-07 14:25:27 -03:00
45a39b6d25
src/css: assign meaningful class names to "span:first-child"
2022-11-20 06:31:00 -03:00
8b01a5f575
redirect from index.html with one redirect rather than two.
...
Fix #41
2022-11-19 19:28:10 -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
eb724a14b4
redirect to Al-Kahf if today's Friday
2022-11-11 16:09:33 -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
cdd4ce61ed
src/: replace location.href = '...' with location.replace('...')
2022-11-08 05:59:45 -03:00
0254d444e9
src/: allow locale-specific styles
2022-11-06 07:11:27 -03:00
37a3706b04
eslint: fix
2022-11-06 06:57:36 -03:00
296aa9a165
src/: add src/js/pages/redirect-to-surah-slug.ts
2022-11-06 06:55:13 -03:00
e31fac44bb
src/: add src/js/pages/redirect-to-random-surah.ts
2022-11-06 06:55:13 -03:00
d00b8277a3
redirect from /<locale>/<surah-id>/ to /<locale>/<surah-slug>/
...
This change will trigger redirects from - for example, "/en/1/"
to "/en/al-fatihah".
2022-11-05 19:49:11 -03:00
c28e7497d4
fix a couple of 404s, and 'rake deploy:local'
2022-11-02 06:23:24 -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
dfee1d25e2
s/surahByNum/surahId/g
2022-11-01 22:37:25 -03:00
757b66f6f0
ThemeSelect.jsx: store theme choice in a cookie
...
Fix #1
2022-11-01 19:22:37 -03:00
e3c794448f
src/surah.html: add title to page
...
Fix #4
2022-11-01 09:28:06 -03:00