Skip to content

Commit

Permalink
fixed display issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram committed Jan 23, 2019
1 parent 0138624 commit 683ee2a
Show file tree
Hide file tree
Showing 28 changed files with 46 additions and 53 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can now visit http://localhost:8081/ and start using it.

1. Clone this repository
2. Run ```docker build . -t vesica/alquran.cloud```. This will build an image with production dependencies only.
3. Run ```docker run -it -p 8081:8080 -v ($pwd)/.:/var/www vesica/alquran.cloud``` to spin up the built image.
3. Run ```docker run -it -p 8081:8080 -v $(pwd)/.:/var/www vesica/alquran.cloud``` to spin up the built image.
3. Run ```composer install``` to add development dependencies.
6. Make sure you have internet connectivity so the app can connect to https://api.alquran.cloud.
7. Open your browser and browse to http://localhost:8081/.
Expand Down
8 changes: 0 additions & 8 deletions html/public/css/alquran.cloud.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,39 +71,31 @@ div.container {
.ayah-number {
width: 90%;
height: 90%;
position: absolute;
top: 0px;
left: 0;
z-index: 10;
margin-top: 25%;
margin-left: -20%;
font-size: 60%;
}

.ayah-number-2digit {
width: 90%;
height: 90%;
position: absolute;
top: 0px;
left: 0;
right: 5px;
z-index: 10;
margin-top: 25%;
margin-right: 20%;
font-size: 60%;
}

.ayah-number-3digit {
width: 90%;
height: 90%;
position: absolute;
top: 0px;
right: 1px;
left: 0;
z-index: 10;
margin-top: 25%;
margin-right: 20%;
font-size: 60%;
}

.ayahEditionName:first-letter {
Expand Down
2 changes: 1 addition & 1 deletion html/public/css/font-all.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

@font-face {
font-family: 'Uthmani';
src: url("//cdn.alquran.cloud/public/fonts/uthman_tn09.otf") format("opentype");
src: url("//cdn.alquran.cloud/public/fonts/uthman_tn09_archive.otf") format("opentype");
}

.font-uthmani {
Expand Down
6 changes: 3 additions & 3 deletions routes/ayah.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
} else {
$reference = '24:35';
}
$ayah = $this->client->AlQuranCloudApi->ayah($reference, 'quran-uthmani');
$ayah = $this->client->AlQuranCloudApi->ayah($reference, 'quran-simple');

return $this->view->render($response, 'ayah.php', [
'pageTitle' => 'Quran - Surah ' . $ayah->data->surah->englishName . ' Ayah ' . $ayah->data->numberInSurah . ' (' . $ayah->data->surah->number . ':' . $ayah->data->numberInSurah . ')',
Expand All @@ -29,7 +29,7 @@
if ($request->getQueryParam('reference') !== null && $request->getQueryParam('reference') != '') {
$reference = $request->getQueryParam('reference');
}
$ayah = $this->client->AlQuranCloudApi->ayah($reference, 'quran-uthmani');
$ayah = $this->client->AlQuranCloudApi->ayah($reference, 'quran-simple');
return $this->view->render($response, 'ayah.php', [
'pageTitle' => 'Quran - Surah ' . $ayah->data->surah->englishName . ' Ayah ' . $ayah->data->numberInSurah . ' (' . $ayah->data->surah->number . ':' . $ayah->data->numberInSurah . ')',
'metaDescription' => 'AlQuran Cloud',
Expand All @@ -49,7 +49,7 @@
if ($request->getQueryParam('reference') !== null && $request->getQueryParam('reference') != '') {
$reference = $request->getQueryParam('reference');
}
$ayah = $this->client->AlQuranCloudApi->ayah($reference, 'quran-uthmani');
$ayah = $this->client->AlQuranCloudApi->ayah($reference, 'quran-simple');
return $this->view->render($response, 'ayah.php', [
'pageTitle' => 'Quran - Surah ' . $ayah->data->surah->englishName . ' Ayah ' . $ayah->data->numberInSurah . ' (' . $ayah->data->surah->number . ':' . $ayah->data->numberInSurah . ')',
'metaDescription' => 'AlQuran Cloud',
Expand Down
6 changes: 3 additions & 3 deletions routes/juz.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
return $this->view->render($response, 'juz.php', [
'pageTitle' => 'Quran - Juz 1',
'metaDescription' => 'AlQuran Cloud',
'juz' => $this->client->AlQuranCloudApi->juz('1', 'quran-uthmani'),
'juz' => $this->client->AlQuranCloudApi->juz('1', 'quran-simple'),
'editions' => [
'editions' => $this->client->AlQuranCloudApi->editions(null, null, 'text'),
],
Expand All @@ -24,7 +24,7 @@

$app->get('/juz/{reference}', function ($request, $response, $args) {
$reference = $request->getAttribute('reference');
$juz = $this->client->AlQuranCloudApi->juz($reference, 'quran-uthmani');
$juz = $this->client->AlQuranCloudApi->juz($reference, 'quran-simple');
return $this->view->render($response, 'juz.php', [
'pageTitle' => 'Quran - Juz ' . $juz->data->number,
'metaDescription' => 'AlQuran Cloud',
Expand All @@ -40,7 +40,7 @@

$reference = $request->getAttribute('reference');
$edition = $request->getAttribute('edition');
$juz = $this->client->AlQuranCloudApi->juz($reference, 'quran-uthmani');
$juz = $this->client->AlQuranCloudApi->juz($reference, 'quran-simple');
$juzEdition = $this->client->AlQuranCloudApi->juz($reference, $edition);
return $this->view->render($response, 'juz.php', [
'pageTitle' => 'Quran - Juz ' . $juz->data->number . ' - ' . $juzEdition->data->edition->name,
Expand Down
4 changes: 2 additions & 2 deletions routes/quran.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
return $this->view->render($response, 'quran.php', [
'pageTitle' => 'The Holy Quran',
'metaDescription' => 'A Complete Rendering and Recitation of the Quran',
'quran' => $this->client->AlQuranCloudApi->quran('quran-uthmani'),
'quran' => $this->client->AlQuranCloudApi->quran('quran-simple'),
'suwar' => $this->client->AlQuranCloudApi->surahs(),
'editions' => [
'editions' => $this->client->AlQuranCloudApi->editions(null, null, 'text'),
Expand All @@ -31,7 +31,7 @@
return $this->view->render($response, 'quran.php', [
'pageTitle' => 'Al Quran Cloud',
'metaDescription' => 'AlQuran Cloud',
'quran' => $this->client->AlQuranCloudApi->quran('quran-uthmani'),
'quran' => $this->client->AlQuranCloudApi->quran('quran-simple'),
'suwar' => $this->client->AlQuranCloudApi->surahs(),
'quranEdition' => $this->client->AlQuranCloudApi->quran($edition),
'editions' => [
Expand Down
6 changes: 3 additions & 3 deletions routes/surah.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

$app->get('/surah', function ($request, $response, $args) {

$surah = $this->client->AlQuranCloudApi->surah('1', 'quran-uthmani');
$surah = $this->client->AlQuranCloudApi->surah('1', 'quran-simple');

return $this->view->render($response, 'surah.php', [
'pageTitle' => 'Quran - Surah ' . $surah->data->englishName . ' (' . $surah->data->name. ')',
Expand All @@ -31,7 +31,7 @@
$app->get('/surah/{reference}', function ($request, $response, $args) {

$reference = $request->getAttribute('reference');
$surah = $this->client->AlQuranCloudApi->surah($reference, 'quran-uthmani');
$surah = $this->client->AlQuranCloudApi->surah($reference, 'quran-simple');
return $this->view->render($response, 'surah.php', [
'pageTitle' => 'Quran - Surah ' . $surah->data->englishName . ' (' . $surah->data->name. ')',
'metaDescription' => 'AlQuran Cloud',
Expand All @@ -48,7 +48,7 @@

$reference = $request->getAttribute('reference');
$edition = $request->getAttribute('edition');
$surah = $this->client->AlQuranCloudApi->surah($reference, 'quran-uthmani');
$surah = $this->client->AlQuranCloudApi->surah($reference, 'quran-simple');
return $this->view->render($response, 'surah.php', [
'pageTitle' => 'Quran - Surah ' . $surah->data->englishName . ' (' . $surah->data->name. ')',
'metaDescription' => 'AlQuran Cloud',
Expand Down
5 changes: 3 additions & 2 deletions src/AlQuranCloud/Renderer/Ayah.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ public static function renderAyahEndingInArabic($number)
} else {
$ayahNumber = 'ayah-number';
}
return '<span class="ayah-ending">&#1757;
<span class="'. $ayahNumber . '">' .

return '<span class="ayah-ending">
<span class="'. $ayahNumber . ' label label-default">' .
Generic::latinToArabicNumerals($number)
. '
</span>
Expand Down
2 changes: 1 addition & 1 deletion views/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<?php // ================================================================ // ?>
<div class="container">
<div class="lead font-uthmani align-center">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<div class="page-header">
<h4>About</h4>
Expand Down
2 changes: 1 addition & 1 deletion views/adhans.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="container">
<div class="lead font-uthmani align-center">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<div class="page-header">
<h4><?= $pageTitle; ?></h4>
Expand Down
2 changes: 1 addition & 1 deletion views/api-client.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<?php // ================================================================ // ?>
<div class="container">
<div class="lead font-uthmani align-center">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<div class="page-header">
<h4>API Clients</h4>
Expand Down
2 changes: 1 addition & 1 deletion views/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<?php // ================================================================ // ?>
<div class="container">
<div class="lead font-uthmani align-center">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<h4>
Quran API Documentation
Expand Down
22 changes: 11 additions & 11 deletions views/arabic-fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
<div class="col-md-9">
<h1 class="">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>
</div>
</div>
Expand All @@ -20,7 +20,7 @@
</div>
<div class="col-md-9">
<h1 class="font-droid-arabic-naskh">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>
</div>
</div>
Expand All @@ -31,7 +31,7 @@
</div>
<div class="col-md-9">
<h1 class="font-droid-arabic-kufi">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>
</div>
</div>
Expand All @@ -42,7 +42,7 @@
</div>
<div class="col-md-9">
<h1 class="font-uthmani">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>
</div>
</div>
Expand All @@ -53,7 +53,7 @@
</div>
<div class="col-md-9">
<h1 class="font-scheherazade">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>

</div>
Expand All @@ -65,7 +65,7 @@
</div>
<div class="col-md-9">
<h1 class="font-thabit">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>

</div>
Expand All @@ -77,7 +77,7 @@
</div>
<div class="col-md-9">
<h1 class="font-mequran">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>

</div>
Expand All @@ -89,7 +89,7 @@
</div>
<div class="col-md-9">
<h1 class="font-nh">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>

</div>
Expand All @@ -101,7 +101,7 @@
</div>
<div class="col-md-9">
<h1 class="font-quran">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>

</div>
Expand All @@ -113,7 +113,7 @@
</div>
<div class="col-md-9">
<h1 class="font-othmani">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>

</div>
Expand All @@ -125,7 +125,7 @@
</div>
<div class="col-md-9">
<h1 class="font-uthmani">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</h1>

</div>
Expand Down
2 changes: 1 addition & 1 deletion views/ayah.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="container">
<div class="lead font-uthmani align-center">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<div class="page-header">
<h4>
Expand Down
2 changes: 1 addition & 1 deletion views/cdn.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<?php // ================================================================ // ?>
<div class="container">
<div class="lead font-uthmani align-center">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<h4>
Al Quran Content Delivery Network (CDN)
Expand Down
2 changes: 1 addition & 1 deletion views/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<?php // ================================================================ // ?>
<div class="container">
<div class="lead font-uthmani align-center">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<div class="page-header">
<h4>Contact</h4>
Expand Down
2 changes: 1 addition & 1 deletion views/contributors.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<?php // ================================================================ // ?>
<div class="container">
<div class="lead font-uthmani align-center">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<div class="page-header">
<h2>Contributors</h2>
Expand Down
2 changes: 1 addition & 1 deletion views/download-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<?php // ================================================================ // ?>
<div class="container">
<div class="lead font-uthmani align-center">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<div class="page-header">
<h4>Download Audio Files and Images</h4>
Expand Down
2 changes: 1 addition & 1 deletion views/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<?php // ================================================================ // ?>
<div class="container">
<div class="lead font-uthmani align-center">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<div class="lead font-uthmani align-center">
ٱلْحَمْدُ لِلّٰهِ ٱلَّذِي خَلَقَ ٱلْإِنْسَانَ وَٱلْجَانَ وَ ٱلسَّمٰوَاتِ وَ ٱلْأَرْضِ وَ مَا فِي هُمَا وَ مَا بَيْنَ هُمَا وَ هُوَا ذُوْ ٱلْجَلَالِ وَ ٱلْإِكْرَامِ وَ هُوَ عَلَى كُلِّ شَيْءٍ قَدِيرٌ۝
Expand Down
2 changes: 1 addition & 1 deletion views/juz-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="container">
<div class="lead font-uthmani align-center style-ayah">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<div class="page-header">
<h4>
Expand Down
2 changes: 1 addition & 1 deletion views/juz.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<div class="container">
<div class="lead font-uthmani align-center style-ayah" style="padding-top: 70px;">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<hr />
<?php
Expand Down
2 changes: 1 addition & 1 deletion views/quran.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<hr />
<?php if ($surah->number != 9) { ?>
<div class="lead font-uthmani align-center style-ayah">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<?php } ?>
<?php $ayahs = (array) $surah->ayahs;
Expand Down
2 changes: 1 addition & 1 deletion views/read.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="container">
<div class="lead font-uthmani align-center style-ayah">
بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ
بِسْمِ ٱللّٰهِ الرَّحْمٰنِ الرَّحِيْمِ
</div>
<div class="page-header">
<h4>
Expand Down
Loading

0 comments on commit 683ee2a

Please sign in to comment.