Skip to content

Commit

Permalink
Start transition to semantic HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1eef committed Oct 25, 2023
1 parent b8af887 commit a3d9dd1
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 29 deletions.
18 changes: 9 additions & 9 deletions src/css/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ body .root .content {
width: 350px;
}

a.title {
h1 {
display: flex;
place-content: center;
text-decoration: none;
width: 100%;
font-size: large;
line-height: 38px;
align-items: center;
flex-direction: column;
font-size: xx-large;

a {
line-height: 38px;
text-decoration: none;
}
}

ul.body {
Expand Down Expand Up @@ -66,9 +69,6 @@ body .root .content {
}

.row.dropdown-row {
align-items: flex-end;
line-height: 30px;

.react-select.theme {
width: 35px;
}
Expand Down
22 changes: 17 additions & 5 deletions src/css/components/Select.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.root .content.theme {
.react-select {
display: flex;
flex-direction: column;

height: 20px;
z-index: 1;

Expand All @@ -23,6 +26,11 @@
}

.react-select.language {
display: flex;
align-items: flex-end;
flex-direction: column-reverse;
justify-content: flex-start;

.selected-option.ar {
font-size: large;
}
Expand All @@ -34,6 +42,7 @@
justify-content: flex-end;
font-size: medium;
min-height: 35px;
min-width: 125px;
}

li.en {
Expand All @@ -55,20 +64,23 @@

.content.theme.en {
.react-select.language {
ul li.en { display: none; }
ul {
top: 62px;
li.en { display: none; }
}
}
}

.content.theme.ar {
.react-select.language {
ul li.ar { display: none; }
ul {
top: 75px;
li.ar { display: none; }
}
}
}

.react-select.theme {
display: flex;
flex-direction: column;

.selected-option {
.circle {
display: block;
Expand Down
4 changes: 1 addition & 3 deletions src/css/themes/blue/_layout.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.root .content.theme.blue {
@import "colors";

.row.title {
color: $blue1;
}
h1 , h1 a { color: $blue1; }

.row.dropdown-row .react-select {
color: $gold1;
Expand Down
3 changes: 0 additions & 3 deletions src/css/themes/blue/pages/_SurahIndex.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
.root .content.theme.blue {
@import "themes/blue/colors";
.row.title {
justify-content: center;
}

ul.body.index li.surah a {
&:active, &:link, &:visited {
Expand Down
4 changes: 1 addition & 3 deletions src/css/themes/green/_layout.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.root .content.theme.green {
@import "colors";

.row.title {
color: $green1;
}
h1 , h1 a { color: $green1; }

.row.dropdown-row .react-select {
background-color: transparent;
Expand Down
8 changes: 5 additions & 3 deletions src/js/pages/SurahIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ function SurahIndex({ locale, surahs, t }: Props) {

return (
<div ref={ref} className={classNames("invisible", "content", "theme", theme, locale)}>
<a href={`/${locale}/`} className="row title">
{t(locale, "TheNobleQuran")}
</a>
<h1>
<a href={`/${locale}/`}>
{t(locale, "TheNobleQuran")}
</a>
</h1>
<div className="row dropdown-row">
<ThemeSelect theme={theme} setTheme={setTheme} />
<LanguageSelect locale={locale} />
Expand Down
8 changes: 5 additions & 3 deletions src/js/pages/SurahStream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ function SurahStream({ node, recitations, locale, paused, t }: Props) {
<div ref={ref} className={classNames("invisible", "content", "theme", theme, locale)}>
{readyToRender && (
<>
<a href={`/${locale}/`} className="row title">
{t(locale, "TheNobleQuran")}
</a>
<h1>
<a href={`/${locale}/`}>
{t(locale, "TheNobleQuran")}
</a>
</h1>
<div className="row dropdown-row">
<ThemeSelect theme={theme} setTheme={setTheme} />
<LanguageSelect locale={locale} path={surah.slug} />
Expand Down

0 comments on commit a3d9dd1

Please sign in to comment.