From 6cfb9278c10f0fae4709930161f70f902cc1c17a Mon Sep 17 00:00:00 2001 From: altaf-creator <64111012+altaf-creator@users.noreply.github.com> Date: Tue, 9 May 2023 21:52:30 +0700 Subject: New sidebar, sura.html improvements --- src/attribution.html | 23 ++++++++++++++++----- src/index.html | 11 +++++++--- src/scripts/quran.js | 17 +++++++++++----- src/scripts/sura-list.js | 2 ++ src/styles/style.css | 52 +++++++++++++++++++++++++++++++++++++++++++++--- src/sura.html | 15 +++++++++----- 6 files changed, 99 insertions(+), 21 deletions(-) diff --git a/src/attribution.html b/src/attribution.html index 7f7c45a..19493ea 100644 --- a/src/attribution.html +++ b/src/attribution.html @@ -27,15 +27,16 @@ try { process.versions['electron']; var windowBtns = document.getElementsByClassName('window-button-container'); - + for (var i = 0; i < windowBtns.length; i++) { windowBtns[i].style.display = 'grid'; } document.getElementById('openquran-link').href = 'index.html' + document.getElementById('openquran-home').href = 'index.html' } catch { var windowBtns = document.getElementsByClassName('window-button-container'); - + for (var i = 0; i < windowBtns.length; i++) { windowBtns[i].style.display = 'none'; } @@ -68,24 +69,36 @@
-
+
+ + + +
+

Credits & Attribution



- GitHub + GitHub

Quran Text, Metadata, & Translations

The Tanzil Project

Developer

altaf-creator +

Icons

+ Font Awesome - licensed under the CC + BY 4.0 license

More Information

  • Script Type: Uthmani
  • English Translation Author: Saheeh International
  • Indonesia Translation Author: Kementerian Agama Indonesia
- Licensed under the MIT License + Licensed under the MIT + License
diff --git a/src/index.html b/src/index.html index 813573f..89acd8c 100644 --- a/src/index.html +++ b/src/index.html @@ -51,13 +51,18 @@ Attribution
-
+
+ + + +
+
-
+

Sura List


-
    +
diff --git a/src/scripts/quran.js b/src/scripts/quran.js index 76c18bf..c50d9c0 100644 --- a/src/scripts/quran.js +++ b/src/scripts/quran.js @@ -23,22 +23,29 @@ function getUrlVars() { function quranOnLoad() { var a = getUrlVars()["sura"]; - load(a, tIndex); + + if (a) { + load(a, tIndex); + } else { + load(1, tIndex) + } + loadSuraButtons(); try { process.versions['electron']; - + var windowBtns = document.getElementsByClassName('window-button-container'); - + for (var i = 0; i < windowBtns.length; i++) { windowBtns[i].style.display = 'grid'; } - + document.getElementById('openquran-link').href = 'index.html' + document.getElementById('openquran-home').href = 'index.html' } catch { var windowBtns = document.getElementsByClassName('window-button-container'); - + for (var i = 0; i < windowBtns.length; i++) { windowBtns[i].style.display = 'none'; } diff --git a/src/scripts/sura-list.js b/src/scripts/sura-list.js index a799b02..abbae2e 100644 --- a/src/scripts/sura-list.js +++ b/src/scripts/sura-list.js @@ -20,6 +20,8 @@ function load() { for (var i = 0; i < windowBtns.length; i++) { windowBtns[i].style.display = 'grid'; } + + document.getElementById('openquran-home').href = 'index.html' } catch { var windowBtns = document.getElementsByClassName('window-button-container'); diff --git a/src/styles/style.css b/src/styles/style.css index 1279478..435bc6a 100644 --- a/src/styles/style.css +++ b/src/styles/style.css @@ -203,16 +203,53 @@ hr { background-color: rgba(0, 0, 0, 0.2) !important; } +.main-sidebar { + position: fixed; + padding-left: 12.5px; + padding-right: 12.5px; + height: 100%; + z-index: 3; +} + +.sidebar-buttons { + width: 35px; + height: 35px; + background-color: rgba(0, 0, 0, 0); + border-radius: 17.5px; + display: block; + display: grid; + box-sizing: border-box; + padding: 8px; + color: #000; + text-decoration: none; + transition: all 150ms; + margin-top: 12.5px; + text-align: center; +} + +.sidebar-buttons:hover { + background-color: rgba(0, 0, 0, 0.1); +} + +.sidebar-buttons:active { + background-color: rgba(0, 0, 0, 0.2) !important; +} + +.sidebar-buttons:focus { + background-color: rgba(0, 0, 0, 0.1) !important; +} + .sidebar { position: fixed; height: 100%; - width: 260px; + width: 230px; background-color: #F3F3F3; z-index: 1; + margin-left: 60px; } .main { - margin-left: 260px; + margin-left: 290px; background-color: #FFF; border-top-left-radius: 15px; z-index: 3; @@ -298,6 +335,7 @@ hr { z-index: 2; border-top-right-radius: 10px; background-color: #F3F3F3; + display: none; } .dropdown-button { @@ -393,7 +431,7 @@ hr { .main { border-top-left-radius: 0; - margin-left: 0; + margin-left: 0 !important; } #dropdown-alternate { @@ -407,4 +445,12 @@ hr { .window-button-container { display: none; } + + .sidebar-links { + display: block; + } + + .main-sidebar { + display: none; + } } \ No newline at end of file diff --git a/src/sura.html b/src/sura.html index e90d78a..b003f75 100644 --- a/src/sura.html +++ b/src/sura.html @@ -49,6 +49,11 @@
+
+ + + +
-

Choose a sura

+

Loading...

-- cgit v1.2.3