kjellouli / ayat.js Goto Github PK
View Code? Open in Web Editor NEWAyat.js - Generate Quranic Verses by Topics, Languages, Reciters and other Options
License: MIT License
Ayat.js - Generate Quranic Verses by Topics, Languages, Reciters and other Options
License: MIT License
The sample call reads :
$("#container").Ayat({
topic: 'women'...
This attribute should be "theme", not "topic." Passing topic causes the code to consider the theme unset and return random verses, which could be confusing if you haven't looked through the code.
At least for English, perhaps for more languages, it would be cool if this supported all the translations available from api.globalquran. Or, for a small first pass, a few of the more well-known English tranlations in addition to currently-used yusufAli, such as sahih, arberry, pickthall, asad and maududi.
It would be to also serve as a sort of topic-driven wrapper to api.globalquran, by providing the ability to return ayat in plain JSON as well as the current HTML output.
Quranindex.info has ~700 topics so it would be great to increase the data.js to include that full set.
E.G. return "http://quranindex.info/search/abraham" for input topic "Abraham." Or perhaps a shortened version of such a link.
This would be a nice option for outputting links to post in social media etc, since quranindex already provides a hosted space for reaching the ayah by topic. Not sure how passing along language/translation params would work though.
I guess for this use case maybe you would not even need to call the globalquran api directly (instead letting quranindex do it when the returned link is visted)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.