Skip to content

Commit 624d20e

Browse files
committed
improve styling on phones and laptop
1 parent 3f36132 commit 624d20e

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

src/pages/index.astro

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@ import SearchBar from "../components/SearchBar.astro";
1010
---
1111

1212
<!doctype html>
13-
<html lang="en">
13+
<html lang="en" class="lg:w-300">
1414
<head>
1515
<meta charset="utf-8" />
1616
<title>Mohamed Tarek's Personal Website</title>
17-
<meta
18-
name="viewport"
19-
content="width=device-width, initial-scale=1, maximum-scale=1"
20-
/>
17+
<meta name="viewport" content="width=device-width, initial-scale=1" />
2118
<link rel="icon" href="https://fav.farm/👨🏻‍💻" />
2219
</head>
2320

24-
<body class="m-0 bg-[var(--primary_bg_color)] w-300">
21+
<body class="m-0 p-0 bg-[var(--primary_bg_color)] lg:w-full">
2522
<header class="site-header">
2623
<h1 class="mb-5 text-4xl mt-5 font-bold text-white">
2724
Mohamed Tarek, PhD
@@ -32,14 +29,16 @@ import SearchBar from "../components/SearchBar.astro";
3229
Research Affiliate @ University of Sydney
3330
</p>
3431
</header>
35-
<main class="flex my-5 ml-10 pr-0">
36-
<aside>
32+
<main class="flex my-5 ml-10 pr-0 mr-0 pr-0">
33+
<aside class="h-screen sticky ml-4 p-0 w-50 lg:w-60 pt-15 lg:pt-0">
3734
<LeftSide text_color_1="text-blue-500" text_color_2="text-black" />
3835
</aside>
39-
<div class="w-200 ml-110 absolute z-50">
36+
<div class="w-55 m-0 p-0 lg:w-200 lg:ml-90 absolute z-50">
4037
<SearchBar />
4138
</div>
42-
<div class="grid grid-cols-3 gap-x-50 gap-y-8 ml-40 mb-10 mt-20">
39+
<div
40+
class="lg:h-120 grid lg:grid-cols-3 gap-x-40 gap-y-10 lg:gap-y-8 ml-20 mb-10 mt-20 mr-0 pr-0"
41+
>
4342
<!-- About -->
4443
<a href="/about" class="card">
4544
<img src={userIcon.src} alt="user icon" class="card-img" />
@@ -104,11 +103,11 @@ import SearchBar from "../components/SearchBar.astro";
104103
}
105104

106105
aside {
107-
@apply pr-5 pl-5 mt-3 sticky top-0 bg-[var(--primary_bg_color)] px-4;
106+
@apply pr-5 lg:pl-5 mt-3 sticky top-0 bg-[var(--primary_bg_color)] lg:pr-4;
108107
}
109108

110109
.card {
111-
@apply p-2 pt-5 w-65 border-1 border-slate-300 bg-blue-200 rounded-3xl container hover:scale-105 transition-shadow duration-300 hover:shadow-lg;
110+
@apply p-2 pt-5 m-0 w-65 h-50 border-1 border-slate-300 bg-blue-200 rounded-3xl container hover:scale-105 transition-shadow duration-300 hover:shadow-lg;
112111
}
113112

114113
@utility card-img {
@@ -128,6 +127,6 @@ import SearchBar from "../components/SearchBar.astro";
128127
} */
129128

130129
.site-header {
131-
@apply bg-black bg-[url("../assets/home-page-background.png")] bg-size-[auto_350px] lg:bg-size-[auto_350px] bg-position-[right_bottom_-6rem] bg-no-repeat pt-5 pb-15 pl-90 text-slate-200 h-30 w-full lg:w-full;
130+
@apply bg-black lg:bg-[url("../assets/home-page-background.png")] lg:bg-size-[auto_350px] bg-position-[right_15rem_bottom_-6rem] bg-no-repeat pt-5 pb-15 pl-55 lg:pl-90 text-slate-200 h-30 w-full;
132131
}
133132
</style>

0 commit comments

Comments
 (0)