Add semantic-HTML improvements, CSS improvements

This commit is contained in:
0x1eef 2023-10-29 20:02:46 -03:00
parent 4525fbe416
commit 43f7fc85c9
12 changed files with 134 additions and 124 deletions

View file

@ -23,16 +23,13 @@ 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;
@ -46,6 +43,28 @@ body .root .content {
}
}
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"; }
}
}
}
ul.body {
clear: both;
list-style-type: none;
@ -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;
}

View file

@ -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;
}
}
}
}

View file

@ -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;

View file

@ -57,37 +57,33 @@
}
.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 {
footer {
.timer {
align-items: flex-start;
}
}
}
@import "themes/blue";

View file

@ -1,9 +1,10 @@
.root .content.theme.blue {
@import "colors";
header {
h1 , h1 a { color: $blue1; }
.row.dropdown-row .react-select {
div .react-select {
color: $gold1;
}
}
}

View file

@ -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;
}
}
}

View file

@ -26,9 +26,11 @@
.root .content.theme.blue.en {
@import "themes/blue/colors";
.row.details span {
header {
div {
color: $gold1;
}
}
}
.root .content.theme.blue.ar {

View file

@ -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 {
header {
div {
.localized-name {
color: $blue1;
}
}
}
}

View file

@ -1,10 +1,12 @@
.root .content.theme.green {
@import "colors";
header {
h1 , h1 a { color: $green1; }
.row.dropdown-row .react-select {
div .react-select {
background-color: transparent;
color: $green1;
}
}
}

View file

@ -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; }
}
}
footer {
.timer {
color: $green1;
}
.row .shape.refresh {
background: unset;
fill: $green1;
}
.sound-on.icon, .svg.sound-off.icon {

View file

@ -35,11 +35,11 @@ function SurahIndex({ locale, surahs, t }: Props) {
<h1>
<a href={`/${locale}/`}>{t(locale, "TheNobleQuran")}</a>
</h1>
</header>
<div className="row dropdown-row">
<div>
<ThemeSelect theme={theme} setTheme={setTheme} />
<LanguageSelect locale={locale} />
</div>
</header>
<ul className="body index scroll-y">
{surahs.map((surah, key) => (
<li className="surah" key={key}>

View file

@ -59,20 +59,15 @@ function SurahStream({ node, recitations, locale, paused, t }: Props) {
className={classNames("invisible", "content", "theme", theme, locale)}
>
{readyToRender && (
<>
<header>
<h1>
<a href={`/${locale}/`}>{t(locale, "TheNobleQuran")}</a>
</h1>
</header>
<div className="row dropdown-row">
<div>
<ThemeSelect theme={theme} setTheme={setTheme} />
<LanguageSelect locale={locale} path={surah.slug} />
</div>
</>
)}
{readyToRender && (
<div className="row details">
<div>
<span className="localized-name" lang={locale}>
{surah.localizedName}
</span>
@ -80,6 +75,7 @@ function SurahStream({ node, recitations, locale, paused, t }: Props) {
{surah.transliteratedName}
</span>
</div>
</header>
)}
{readyToRender && (
<Stream