Biggest UI change in a while

This commit is contained in:
0x1eef 2024-09-19 10:37:48 -03:00
parent 38224a7417
commit 22bb9301e2
10 changed files with 55 additions and 34 deletions

View file

@ -18,7 +18,7 @@ html {
direction: ltr; direction: ltr;
} }
.rtl { .rtl {
font-family: 'Arial', 'Tahoma', sans-serif; font-family: "Cairo Regular", "Arial", "Tahoma", sans-serif;
direction: rtl; direction: rtl;
} }
.invisible, .hidden { .invisible, .hidden {
@ -33,6 +33,15 @@ html {
.border-black { .border-black {
border: 1px $black solid; border: 1px $black solid;
} }
.font-cairo {
font-family: "Cairo Regular";
}
.font-cairo-bold {
font-family: "Cairo Bold";
}
.font-amiri {
font-family: "Amiri Quran Regular";
}
} }
} }
@ -46,4 +55,13 @@ body .root .content.theme {
* RTL languages * RTL languages
*/ */
body .root .content.theme.rtl { body .root .content.theme.rtl {
header a[data-testid="h1"] {
font-family: "Cairo Bold";
}
}
html[dir="rtl"] {
.font-extrabold {
font-family: "Cairo Bold" !important;
}
} }

View file

@ -4,16 +4,6 @@
body .root .content.theme { body .root .content.theme {
@import "base/colors"; @import "base/colors";
ul.body.index[lang="ar"] {
li a {
span:last-child {
font-family: "Amiri Quran Regular";
color: $black;
}
}
}
ul.body.index { ul.body.index {
@media (max-width: $breakpoint-sm) { @media (max-width: $breakpoint-sm) {
li, li a { li, li a {

View file

@ -4,10 +4,7 @@
ul.body.index { ul.body.index {
li.surah a { li.surah a {
&:active, &:link, &:visited { color: $black;
color: $primary-color;
}
span.id { span.id {
color: $secondary-color; color: $secondary-color;
} }
@ -17,7 +14,7 @@
footer { footer {
a { a {
&:active, &:link, &:visited { &:active, &:link, &:visited {
color: $primary-color; color: $black;
text-decoration: none; text-decoration: none;
} }
&:hover { &:hover {
@ -25,6 +22,7 @@
} }
} }
input { input {
color: $black;
border: 1px solid $secondary-color; border: 1px solid $secondary-color;
&:focus { &:focus {
outline-color: $secondary-color; outline-color: $secondary-color;
@ -47,10 +45,8 @@
ul.body.index { ul.body.index {
li.surah a { li.surah a {
span.id { span.id {
color: $secondary-color; background: $secondary-color;
} color: $white;
span.name {
color: $primary-color;
} }
} }
} }

View file

@ -3,21 +3,20 @@
@import "themes/green/base/colors"; @import "themes/green/base/colors";
ul.body.index a { ul.body.index a {
&:active, &:link, &:visited { color: $black;
color: $primary-color;
}
} }
footer { footer {
a { a {
&:active, &:link, &:visited { &:active, &:link, &:visited {
color: $primary-color; color: $black;
} }
&:hover { &:hover {
font-weight: bold; font-weight: bold;
} }
} }
input { input {
color: $black;
border: 1px solid $primary-color; border: 1px solid $primary-color;
&:focus { &:focus {
outline-color: $primary-color; outline-color: $primary-color;

BIN
src/fonts/cairo-bold.ttf Normal file

Binary file not shown.

BIN
src/fonts/cairo-regular.ttf Normal file

Binary file not shown.

View file

@ -16,7 +16,6 @@ export function SurahIndex({ locale, surahs, t }: Props) {
const [theme, setTheme] = useTheme(); const [theme, setTheme] = useTheme();
const [index, setIndex] = useState<Surah[]>(surahs); const [index, setIndex] = useState<Surah[]>(surahs);
const ref = useRef<HTMLDivElement>(null); const ref = useRef<HTMLDivElement>(null);
const isArabic = locale.name === "ar";
useEffect(() => { useEffect(() => {
const div = ref.current; const div = ref.current;
@ -63,9 +62,7 @@ export function SurahIndex({ locale, surahs, t }: Props) {
{formatNumber(locale, surah.id)} {formatNumber(locale, surah.id)}
</span> </span>
)} )}
<span className={classNames({ "text-2xl": isArabic })}> <span>{surah.name}</span>
{surah.name}
</span>
{locale.direction === "ltr" && ( {locale.direction === "ltr" && (
<div className="flex justify-end grow pr-3"> <div className="flex justify-end grow pr-3">
<div className="flex flex-col"> <div className="flex flex-col">

View file

@ -61,8 +61,7 @@ export function Stream({
/> />
<span <span
className={classNames({ className={classNames({
"background-primary color-white pr-3 pl-3 rounded border-black": "background-primary color-white pr-3 pl-3 rounded border-black": isRTL,
isRTL,
})} })}
> >
{t(locale, "surah")} {formatNumber(locale, surah.id)} {t(locale, "surah")} {formatNumber(locale, surah.id)}

View file

@ -20,8 +20,19 @@ import { formatNumber } from "~/lib/t";
postman( postman(
item.script(`/js/main/vendor.js?v=${rev}`, { id: "0" }), item.script(`/js/main/vendor.js?v=${rev}`, { id: "0" }),
item.script(`/js/main/surah-index.js?v=${rev}`, { id: "1" }), item.script(`/js/main/surah-index.js?v=${rev}`, { id: "1" }),
item.font("Amiri Quran Regular", "url(/fonts/amiri-quran-regular.ttf)"), item.font(
item.font("Kanit Regular", "url(/fonts/kanit-regular.ttf)"), "Cairo Regular",
"url(/fonts/cairo-regular.ttf) format('truetype')",
),
item.font("Cairo Bold", "url(/fonts/cairo-bold.ttf) format('truetype')"),
item.font(
"Amiri Quran Regular",
"url(/fonts/amiri-quran-regular.ttf) format('truetype')",
),
item.font(
"Kanit Regular",
"url(/fonts/kanit-regular.ttf) format('truetype')",
),
item.progress((percent: number) => { item.progress((percent: number) => {
progressBar.value = percent; progressBar.value = percent;
progressNumber.innerText = formatNumber( progressNumber.innerText = formatNumber(

View file

@ -21,8 +21,19 @@ import { formatNumber } from "~/lib/t";
postman( postman(
item.script(`/js/main/vendor.js?v=${rev}`, { id: "0" }), item.script(`/js/main/vendor.js?v=${rev}`, { id: "0" }),
item.script(`/js/main/surah-stream.js?v=${rev}`, { id: "1" }), item.script(`/js/main/surah-stream.js?v=${rev}`, { id: "1" }),
item.font("Kanit Regular", "url(/fonts/kanit-regular.ttf)"), item.font(
item.font("Amiri Quran Regular", "url(/fonts/amiri-quran-regular.ttf)"), "Cairo Regular",
"url(/fonts/cairo-regular.ttf) format('truetype')",
),
item.font("Cairo Bold", "url(/fonts/cairo-bold.ttf) format('truetype')"),
item.font(
"Amiri Quran Regular",
"url(/fonts/amiri-quran-regular.ttf) format('truetype')",
),
item.font(
"Kanit Regular",
"url(/fonts/kanit-regular.ttf) format('truetype')",
),
/* eslint-disable */ /* eslint-disable */
item.json(`/json/${doc.lang}/${surahId}/info.json?v=${rev}`, { className: "json surahinfo" }), item.json(`/json/${doc.lang}/${surahId}/info.json?v=${rev}`, { className: "json surahinfo" }),
item.json(`/json/${doc.lang}/${surahId}/surah.json?v=${rev}`, { className: "json surah" }), item.json(`/json/${doc.lang}/${surahId}/surah.json?v=${rev}`, { className: "json surah" }),