quran-madina-html 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.jshintignore CHANGED
@@ -1 +1 @@
1
- src/x-tag-components.js
1
+ src/x-tag-components.js
package/Gruntfile.js CHANGED
@@ -1,77 +1,77 @@
1
- module.exports = function(grunt) {
2
-
3
- grunt.initConfig({
4
- pkg: grunt.file.readJSON('package.json'),
5
- concat: {
6
- options: {
7
- separator: ';'
8
- },
9
- dist: {
10
- src: ['src/<%= pkg.name %>.js',
11
- 'bower_components/x-tag-core/dist/x-tag-core.min.js'],
12
- dest: 'dist/<%= pkg.name %>.js'
13
- }
14
- },
15
- uglify: {
16
- options: {
17
- banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
18
- },
19
- dist: {
20
- files: {
21
- 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
22
- }
23
- }
24
- },
25
- cssmin: {
26
- target: {
27
- files: [{
28
- expand: true,
29
- cwd: 'src',
30
- src: ['*.css', '!*.min.css'],
31
- dest: 'dist',
32
- ext: '.min.css'
33
- }]
34
- }
35
- },
36
- jshint: {
37
- files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
38
- options: {
39
- // options here to override JSHint defaults
40
- globals: {
41
- jQuery: true,
42
- console: true,
43
- module: true,
44
- document: true
45
- },
46
- esnext: true
47
- }
48
- },
49
- 'json-minify': {
50
- build: {
51
- files: 'assets/db/*.json'
52
- }
53
- },
54
- clean : {
55
- yourTarget : {
56
- src : [ "dist"
57
- ]
58
- }
59
- },
60
- watch: {
61
- files: ['<%= jshint.files %>'],
62
- tasks: ['jshint']
63
- }
64
- });
65
-
66
- grunt.loadNpmTasks('grunt-contrib-uglify');
67
- grunt.loadNpmTasks('grunt-contrib-jshint');
68
- grunt.loadNpmTasks('grunt-contrib-watch');
69
- grunt.loadNpmTasks('grunt-contrib-concat');
70
- grunt.loadNpmTasks('grunt-contrib-clean');
71
- grunt.loadNpmTasks('grunt-contrib-cssmin');
72
- grunt.loadNpmTasks('grunt-json-minify');
73
-
74
- grunt.registerTask('test', ['jshint']);
75
- grunt.registerTask('default', ['jshint', 'clean', 'concat', 'uglify', 'cssmin', 'json-minify']);
76
-
1
+ module.exports = function(grunt) {
2
+
3
+ grunt.initConfig({
4
+ pkg: grunt.file.readJSON('package.json'),
5
+ concat: {
6
+ options: {
7
+ separator: ';'
8
+ },
9
+ dist: {
10
+ src: ['src/<%= pkg.name %>.js',
11
+ 'bower_components/x-tag-core/dist/x-tag-core.min.js'],
12
+ dest: 'dist/<%= pkg.name %>.js'
13
+ }
14
+ },
15
+ uglify: {
16
+ options: {
17
+ banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
18
+ },
19
+ dist: {
20
+ files: {
21
+ 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
22
+ }
23
+ }
24
+ },
25
+ cssmin: {
26
+ target: {
27
+ files: [{
28
+ expand: true,
29
+ cwd: 'src',
30
+ src: ['*.css', '!*.min.css'],
31
+ dest: 'dist',
32
+ ext: '.min.css'
33
+ }]
34
+ }
35
+ },
36
+ jshint: {
37
+ files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
38
+ options: {
39
+ // options here to override JSHint defaults
40
+ globals: {
41
+ jQuery: true,
42
+ console: true,
43
+ module: true,
44
+ document: true
45
+ },
46
+ esnext: true
47
+ }
48
+ },
49
+ 'json-minify': {
50
+ build: {
51
+ files: 'assets/db/*.json'
52
+ }
53
+ },
54
+ clean : {
55
+ yourTarget : {
56
+ src : [ "dist"
57
+ ]
58
+ }
59
+ },
60
+ watch: {
61
+ files: ['<%= jshint.files %>'],
62
+ tasks: ['jshint']
63
+ }
64
+ });
65
+
66
+ grunt.loadNpmTasks('grunt-contrib-uglify');
67
+ grunt.loadNpmTasks('grunt-contrib-jshint');
68
+ grunt.loadNpmTasks('grunt-contrib-watch');
69
+ grunt.loadNpmTasks('grunt-contrib-concat');
70
+ grunt.loadNpmTasks('grunt-contrib-clean');
71
+ grunt.loadNpmTasks('grunt-contrib-cssmin');
72
+ grunt.loadNpmTasks('grunt-json-minify');
73
+
74
+ grunt.registerTask('test', ['jshint']);
75
+ grunt.registerTask('default', ['jshint', 'clean', 'concat', 'uglify', 'cssmin', 'json-minify']);
76
+
77
77
  };
package/README.md CHANGED
@@ -1,55 +1,55 @@
1
- # Quran Madina Html (no-images)
2
- [![pylint](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/pylint.yml/badge.svg)](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/pylint.yml)
3
- [![db_test](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/db_test.yml/badge.svg)](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/db_test.yml)
4
- [![npm-grunt](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/npm-grunt.yml/badge.svg)](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/npm-grunt.yml)
5
-
6
- A Madina Quran HTML Renderer without images
7
-
8
- Theres a pre-processing python script to generate Json databases with quran text with special metadata. The preprocessing is based on text from [Tanzil](tanzil.net), and the [OCR DB](https://github.com/quran/ayah-detection) downloaded from [Murtaza Raja](https://github.com/murtraja/quran-android-images-helper) helper project.
9
- Afterwards, the JS library uses those Json objects to render Madina-based Quran pages and lines.
10
-
11
- The main purpose of this library is:
12
- * Render Quran text that's visually similar to Madina Printed Pages
13
- * Efficient Loading of Quran Visual Text (Not image-based, but pure Html)
14
- * Easy to use: just a simple HTML tag!
15
-
16
- <img src="https://github.com/tarekeldeeb/quran-madina-html/assets/90985/dc3972c3-71a6-4f48-8d45-2df28ddc409f" width="750px">
17
-
18
- # Getting Started
19
- In your Html header, add this script:
20
- ```html
21
- <script type="text/javascript" src="https://unpkg.com/quran-madina-html"></script>
22
- ```
23
- * Supported ``data-name`` parameters are: Madina05 (default), others are under development (Shemerly, Qaloon, Newer Madina)
24
- * Supported ``data-font`` parameters are: Hafs (default), Uthman, Amiri Quran, Amiri Quran Colored
25
- * Other options include: ``data-font-size`` which defaults to 16 (px)
26
-
27
- Then in your body, just add the tag.
28
- ```html
29
- <quran-madina-html sura="2" aya="8-10"></quran-madina-html>
30
- ```
31
- If the selected aya(s) fit on a single line, the default is to generate an inline ``<span>`` element, otherwise a ``<div>`` is generated.
32
-
33
- # Dev Setup
34
-
35
- The project is published on npm ``npm install quran-madina-html``, with sources, assets and distributables.
36
- Alternatively, you can fork this repo, then clone it.
37
-
38
- ```
39
- $ apt install python3-distutils nodejs npm chromium-driver
40
- $ npm install // install components and scripts
41
- $ bower install // install bower libs
42
- $ npm run build-db // build all json Db files
43
- $ npm run release // build the dist with dependencies
44
-
45
- ```
46
-
47
- # Demo
48
-
49
- https://tarekeldeeb.github.io/quran-madina-html/demo/index.html
50
-
51
- Don't forget to see the page source!
52
-
53
- # Links
54
-
55
- [X-Tags Docs](http://x-tags.org/docs)
1
+ # Quran Madina Html (no-images)
2
+ [![pylint](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/pylint.yml/badge.svg)](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/pylint.yml)
3
+ [![db_test](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/db_test.yml/badge.svg)](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/db_test.yml)
4
+ [![npm-grunt](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/npm-grunt.yml/badge.svg)](https://github.com/tarekeldeeb/quran-madina-html/actions/workflows/npm-grunt.yml)
5
+
6
+ A Madina Quran HTML Renderer without images
7
+
8
+ Theres a pre-processing python script to generate Json databases with quran text with special metadata. The preprocessing is based on text from [Tanzil](tanzil.net), and the [OCR DB](https://github.com/quran/ayah-detection) downloaded from [Murtaza Raja](https://github.com/murtraja/quran-android-images-helper) helper project.
9
+ Afterwards, the JS library uses those Json objects to render Madina-based Quran pages and lines.
10
+
11
+ The main purpose of this library is:
12
+ * Render Quran text that's visually similar to Madina Printed Pages
13
+ * Efficient Loading of Quran Visual Text (Not image-based, but pure Html)
14
+ * Easy to use: just a simple HTML tag!
15
+
16
+ <img src="https://github.com/tarekeldeeb/quran-madina-html/assets/90985/dc3972c3-71a6-4f48-8d45-2df28ddc409f" width="750px">
17
+
18
+ # Getting Started
19
+ In your Html header, add this script:
20
+ ```html
21
+ <script type="text/javascript" src="https://unpkg.com/quran-madina-html"></script>
22
+ ```
23
+ * Supported ``data-name`` parameters are: Madina05 (default), others are under development (Shemerly, Qaloon, Newer Madina)
24
+ * Supported ``data-font`` parameters are: Hafs (default), Uthman, Amiri Quran, Amiri Quran Colored
25
+ * Other options include: ``data-font-size`` which defaults to 16 (px)
26
+
27
+ Then in your body, just add the tag.
28
+ ```html
29
+ <quran-madina-html sura="2" aya="8-10"></quran-madina-html>
30
+ ```
31
+ If the selected aya(s) fit on a single line, the default is to generate an inline ``<span>`` element, otherwise a ``<div>`` is generated.
32
+
33
+ # Dev Setup
34
+
35
+ The project is published on npm ``npm install quran-madina-html``, with sources, assets and distributables.
36
+ Alternatively, you can fork this repo, then clone it.
37
+
38
+ ```
39
+ $ apt install python3-distutils nodejs npm chromium-driver
40
+ $ npm install // install components and scripts
41
+ $ bower install // install bower libs
42
+ $ npm run build-db // build all json Db files
43
+ $ npm run release // build the dist with dependencies
44
+
45
+ ```
46
+
47
+ # Demo
48
+
49
+ https://tarekeldeeb.github.io/quran-madina-html/demo/index.html
50
+
51
+ Don't forget to see the page source!
52
+
53
+ # Links
54
+
55
+ [X-Tags Docs](http://x-tags.org/docs)