From 43f7fc85c9723598155c3ce0c4f5f26f310c6482 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sun, 29 Oct 2023 20:02:46 -0300 Subject: [PATCH] Add semantic-HTML improvements, CSS improvements --- src/css/_layout.scss | 85 ++++++++++++-------- src/css/components/Select.scss | 27 ++++--- src/css/pages/SurahIndex.scss | 2 - src/css/pages/SurahStream.scss | 28 +++---- src/css/themes/blue/_layout.scss | 9 ++- src/css/themes/blue/components/_Select.scss | 14 +--- src/css/themes/blue/pages/_SurahIndex.scss | 6 +- src/css/themes/blue/pages/_SurahStream.scss | 18 +++-- src/css/themes/green/_layout.scss | 10 ++- src/css/themes/green/pages/_SurahStream.scss | 19 +++-- src/js/pages/SurahIndex.tsx | 8 +- src/js/pages/SurahStream.tsx | 32 ++++---- 12 files changed, 134 insertions(+), 124 deletions(-) diff --git a/src/css/_layout.scss b/src/css/_layout.scss index 9489a31..ec52bbd 100644 --- a/src/css/_layout.scss +++ b/src/css/_layout.scss @@ -23,26 +23,45 @@ body .root { height: 100%; } -body .root .content { +body .root .content.theme { margin: 0 auto; height: 100%; - width: 90%; + width: 85%; max-width: $max-width; - .row.details { - height: 30px; - } + header { + h1 { + display: flex; + align-items: center; + flex-direction: column; + font-size: xx-large; + margin: 0; + line-height: 1.5; - h1 { - display: flex; - align-items: center; - flex-direction: column; - font-size: xx-large; - margin: 0; - line-height: 1.5; + a { + text-decoration: none; + } + } - a { - text-decoration: none; + div { + display: flex; + justify-content: space-between; + min-height: 35px; + + .react-select { + display: flex; + justify-content: center; + } + + .react-select.theme { + min-width: 35px; + } + + .react-select.language { + min-width: 70px; + text-align: right; + li { font-family: "Kanit Regular"; } + } } } @@ -53,7 +72,7 @@ body .root .content { margin: 0; overflow: auto; height: 73%; - padding: 0 0 35px 0; + padding: 0 0 30px 0; } footer { @@ -67,26 +86,6 @@ body .root .content { width: 100%; } } - - .row { - height: 30px; - display: flex; - flex-direction: row; - justify-content: space-between; - direction: ltr; - } - - .row.dropdown-row { - .react-select.theme { - width: 35px; - } - - .react-select.language { - width: 70px; - text-align: right; - li { font-family: "Kanit Regular"; } - } - } } body .root .content.en { @@ -96,6 +95,22 @@ body .root .content.en { } body .root .content.ar { + header { + div { + direction: ltr; + .localized-name { + display: flex; + font-size: x-large; + justify-content: flex-end; + align-items: flex-end; + width: 100%; + } + .transliterated-name { + display: none; + } + } + } + footer { flex-direction: row-reverse; } diff --git a/src/css/components/Select.scss b/src/css/components/Select.scss index 61b3dc5..b8a5721 100644 --- a/src/css/components/Select.scss +++ b/src/css/components/Select.scss @@ -12,17 +12,16 @@ } ul { - position: relative; margin: 0; padding: 0; - background: #FFF; + height: 0; + background: #fff; list-style-type: none; } ul li { height: 100%; width: 100%; - display: block; font-weight: normal; cursor: pointer; } @@ -32,17 +31,17 @@ display: flex; align-items: flex-end; flex-direction: column-reverse; - justify-content: flex-start; .selected-option.ar { font-size: large; } ul { + height: 0; li { display: flex; align-items: center; - justify-content: flex-end; + justify-content: center; font-size: medium; min-height: 35px; min-width: 125px; @@ -75,7 +74,7 @@ ul { border: none; - height: 50px; + height: 0; width: 50px; } @@ -96,8 +95,10 @@ .content.theme.en { .react-select.language { ul { - top: 52px; - li.en { display: none; } + li.en { + display: flex; + visibility: hidden; + } } } } @@ -105,9 +106,13 @@ .content.theme.ar { .react-select.language { ul { - top: 75px; - li.ar { display: none; } + li { + justify-content: flex-end; + } + li.ar { + display: flex; + visibility: hidden; + } } } } - diff --git a/src/css/pages/SurahIndex.scss b/src/css/pages/SurahIndex.scss index 4a5eb88..4b46fd8 100644 --- a/src/css/pages/SurahIndex.scss +++ b/src/css/pages/SurahIndex.scss @@ -80,8 +80,6 @@ body .root .content.theme.ar { height: 70%; li.surah a { div:first-child .id { - position: relative; - top: 7px; font-family: "Kanit Regular"; font-size: large; width: 55px; diff --git a/src/css/pages/SurahStream.scss b/src/css/pages/SurahStream.scss index d349c30..4ffae14 100644 --- a/src/css/pages/SurahStream.scss +++ b/src/css/pages/SurahStream.scss @@ -57,36 +57,32 @@ } .content.theme.ar { - .row.details { - justify-content: flex-end; - .localized-name { - display: flex; - width: 180px; - font-size: x-large; - align-items: flex-end; - justify-content: flex-end; - } - .transliterated-name { - display: none; - } - } + header { } ul.body.stream { + li.ayah:first-child { + span.title { + padding: 15px 0 20px 0; + } + } li.ayah { span.title { font-size: x-large; height: 0; - padding: 35px 0 25px 0; + padding: 35px 0 20px 0; } p { font-size: x-large; font-weight: normal; } } + padding: 0; } - footer .timer { - align-items: flex-start; + footer { + .timer { + align-items: flex-start; + } } } diff --git a/src/css/themes/blue/_layout.scss b/src/css/themes/blue/_layout.scss index b23a667..b8a76ac 100644 --- a/src/css/themes/blue/_layout.scss +++ b/src/css/themes/blue/_layout.scss @@ -1,9 +1,10 @@ .root .content.theme.blue { @import "colors"; - h1 , h1 a { color: $blue1; } - - .row.dropdown-row .react-select { - color: $gold1; + header { + h1 , h1 a { color: $blue1; } + div .react-select { + color: $gold1; + } } } diff --git a/src/css/themes/blue/components/_Select.scss b/src/css/themes/blue/components/_Select.scss index b063def..7487ef6 100644 --- a/src/css/themes/blue/components/_Select.scss +++ b/src/css/themes/blue/components/_Select.scss @@ -21,7 +21,9 @@ } .react-select.theme { - ul li.blue { display: none; } + ul li.blue { + display: none; + } } .react-select.language ul { @@ -30,13 +32,3 @@ } } } - -.content.theme.blue.ar { - @import "themes/blue/colors"; - - .row.details { - .localized-name { - color: $blue1; - } - } -} diff --git a/src/css/themes/blue/pages/_SurahIndex.scss b/src/css/themes/blue/pages/_SurahIndex.scss index db0428b..8d47425 100644 --- a/src/css/themes/blue/pages/_SurahIndex.scss +++ b/src/css/themes/blue/pages/_SurahIndex.scss @@ -26,8 +26,10 @@ .root .content.theme.blue.en { @import "themes/blue/colors"; - .row.details span { - color: $gold1; + header { + div { + color: $gold1; + } } } diff --git a/src/css/themes/blue/pages/_SurahStream.scss b/src/css/themes/blue/pages/_SurahStream.scss index d375370..44a2174 100644 --- a/src/css/themes/blue/pages/_SurahStream.scss +++ b/src/css/themes/blue/pages/_SurahStream.scss @@ -1,10 +1,6 @@ .root .content.theme.blue { @import "themes/blue/colors"; - footer .timer { - color: $blue1; - } - ul.body.stream { li.ayah { span.title span { @@ -13,14 +9,22 @@ p { } } } + + footer { + .timer { + color: $blue1; + } + } } .root .content.theme.blue.ar { @import "themes/blue/colors"; - .row.details { - .localized-name { - color: $blue1; + header { + div { + .localized-name { + color: $blue1; + } } } } diff --git a/src/css/themes/green/_layout.scss b/src/css/themes/green/_layout.scss index e3b1505..d0721bf 100644 --- a/src/css/themes/green/_layout.scss +++ b/src/css/themes/green/_layout.scss @@ -1,10 +1,12 @@ .root .content.theme.green { @import "colors"; - h1 , h1 a { color: $green1; } + header { + h1 , h1 a { color: $green1; } - .row.dropdown-row .react-select { - background-color: transparent; - color: $green1; + div .react-select { + background-color: transparent; + color: $green1; + } } } diff --git a/src/css/themes/green/pages/_SurahStream.scss b/src/css/themes/green/pages/_SurahStream.scss index ad3ad73..4720732 100644 --- a/src/css/themes/green/pages/_SurahStream.scss +++ b/src/css/themes/green/pages/_SurahStream.scss @@ -1,23 +1,22 @@ .root .content.theme.green { @import "themes/green/colors"; - .row.details { + header { + h1, h1 a { color: $green1; } color: $green1; } - ul.body.stream li.ayah { - span.title span:first-child { + ul.body.stream { + li.ayah { color: $green1; + p { color: $black; } } } - .timer { - color: $green1; - } - - .row .shape.refresh { - background: unset; - fill: $green1; + footer { + .timer { + color: $green1; + } } .sound-on.icon, .svg.sound-off.icon { diff --git a/src/js/pages/SurahIndex.tsx b/src/js/pages/SurahIndex.tsx index 98d93ae..2795452 100644 --- a/src/js/pages/SurahIndex.tsx +++ b/src/js/pages/SurahIndex.tsx @@ -35,11 +35,11 @@ function SurahIndex({ locale, surahs, t }: Props) {

{t(locale, "TheNobleQuran")}

+
+ + +
-
- - -