Skip to content

Commit e7be8a9

Browse files
authored
Merge pull request #285 from ahmed0saber/improve-website-style-on-arabic
Improve website style on Arabic
2 parents 787c71a + 836c4c2 commit e7be8a9

File tree

15 files changed

+80
-29
lines changed

15 files changed

+80
-29
lines changed

components/algorithmsList/algorithmCard/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function AlgorithmCard({ algorithm }: { algorithm: Algorithm }) {
2222
return (
2323
<Card className={`elevateOnHover ${classes.stretchedCard}`}>
2424
<CardContent>
25-
<Breadcrumbs>
25+
<Breadcrumbs className={classes.breadcrumbs}>
2626
{algorithm.categories.map((category) => (
2727
<Typography
2828
variant="h6"

components/algorithmsList/algorithmCard/style.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,8 @@
4242
flex-direction: column;
4343
justify-content: space-between;
4444
}
45+
46+
:global(html[lang=ar]) .breadcrumbs,
47+
:global(html[lang=ar]) .title {
48+
direction: ltr;
49+
}

components/categoriesList/style.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
}
1313

1414
.text {
15-
margin-left: 10px !important;
15+
margin-inline-start: 10px !important;
1616
}

components/footer/style.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
.logo {
1010
grid-area: logo;
11-
margin-right: 40px;
11+
margin-inline-end: 40px;
1212
width: 80px;
1313
height: 80px;
1414
}
1515

1616
.list {
1717
display: flex;
1818
flex-direction: column;
19-
margin-right: 30px;
19+
margin-inline-end: 30px;
2020
}
2121

2222
.list a {

components/jumbo/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ export default function Jumbo() {
5959
</div>
6060
<Typography className={classes.h2}>{t("welcomeTitle")}</Typography>
6161
<div className={classes.input}>
62-
<SearchBar query={query} setQuery={setQuery} />
62+
<SearchBar
63+
query={query}
64+
setQuery={setQuery}
65+
className={classes.Jumbo_SearchBar}
66+
/>
6367
</div>
6468
</div>
6569
</div>

components/jumbo/style.module.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,14 @@
7878
width: 400px;
7979
max-width: 100%;
8080
}
81+
82+
:global(html[lang=ar]) .Jumbo_SearchBar label[data-shrink]{
83+
left: unset;
84+
right: 0;
85+
transform: translate(-12px, 20px) scale(1);
86+
transform-origin: right;
87+
}
88+
89+
:global(html[lang=ar]) .Jumbo_SearchBar label[data-shrink=true]{
90+
transform: translate(-12px, 10px) scale(0.75);
91+
}

components/langSelect/style.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
z-index: 99999 !important;
33
}
44

5+
.menu [role=menu] {
6+
padding-inline-end: 17px;
7+
padding-right: 0px !important;
8+
}
9+
510
.icon {
611
width: 35px;
712
height: 25px;

components/languagesList/style.module.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
flex-direction: column;
44
margin-top: 20px !important;
55
margin-bottom: 10px !important;
6+
/* direction should stay ltr whatever the user-selected language is */
7+
direction: ltr;
68
}
79

810
.sort,

components/navbar/style.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
.title img {
4444
height: 1.2em;
45-
margin-right: 10px;
45+
margin-inline-end: 10px;
4646
}
4747

4848
.smallTitle {
@@ -56,7 +56,7 @@
5656
}
5757

5858
.translateIcon {
59-
margin-right: 8px;
59+
margin-inline-end: 8px;
6060
}
6161

6262
.toolbar svg {

components/searchBar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function SearchBar({
5353
// When input value is not null, reset error & empty state to `false`.
5454
// And also debounce the router push.
5555
setIsError(false);
56-
setIsEmpty(false);
56+
setIsEmpty(false);
5757
}
5858

5959
function handleSubmit(event?: FormEvent) {

0 commit comments

Comments
 (0)