Skip to content

Commit 12c4c95

Browse files
improve mobile-first concept
1 parent 18195fa commit 12c4c95

2 files changed

Lines changed: 43 additions & 67 deletions

File tree

src/css/style.css

Lines changed: 37 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,23 @@ a {
6161
align-items: center;
6262
}
6363

64-
/* Language Selector */
64+
/* Language Selector - Mobile First */
6565
.language-selector-wrapper {
6666
position: absolute;
67-
top: 20px;
68-
right: 20px;
67+
top: 10px;
68+
right: 10px;
6969
z-index: 1000;
7070
}
7171

72-
/* Custom Select Styles */
72+
/* Custom Select Styles - Mobile First */
7373
.custom-select {
7474
position: relative;
75-
width: 150px;
75+
width: 110px;
7676
}
7777

7878
.custom-select-trigger {
79-
padding: 10px 40px 10px 16px;
80-
font-size: 15px;
79+
padding: 8px 32px 8px 12px;
80+
font-size: 13px;
8181
font-weight: 600;
8282
color: white;
8383
background-color: rgba(255, 255, 255, 0.15);
@@ -88,8 +88,8 @@ a {
8888
transition: all 0.3s ease;
8989
background-image: url("../assets/images/arrow-down.svg");
9090
background-repeat: no-repeat;
91-
background-position: right 12px center;
92-
background-size: 12px;
91+
background-position: right 10px center;
92+
background-size: 10px;
9393
user-select: none;
9494
}
9595

@@ -128,8 +128,8 @@ a {
128128
}
129129

130130
.custom-option {
131-
padding: 10px 16px;
132-
font-size: 15px;
131+
padding: 8px 12px;
132+
font-size: 13px;
133133
font-weight: 600;
134134
color: white;
135135
cursor: pointer;
@@ -151,19 +151,18 @@ a {
151151

152152
/* Button icons */
153153
.btn-icon {
154-
width: 20px;
155-
height: 20px;
156-
margin-right: 8px;
154+
width: 18px;
155+
height: 18px;
156+
margin-right: 6px;
157157
filter: brightness(0) invert(1);
158158
}
159159

160-
/* LinkedIn button */
160+
/* LinkedIn button - Mobile First */
161161
.btn-linkedin {
162162
display: flex;
163163
align-items: center;
164164
justify-content: center;
165-
min-width: 130px;
166-
width: 130px;
165+
width: 100%;
167166
background-color: var(--clr-linkedin);
168167
color: var(--clr-white);
169168
border: 2px solid var(--clr-linkedin);
@@ -186,13 +185,12 @@ a {
186185
filter: brightness(0) invert(0);
187186
}
188187

189-
/* GitHub button */
188+
/* GitHub button - Mobile First */
190189
.btn-github-outline {
191190
display: flex;
192191
align-items: center;
193192
justify-content: center;
194-
min-width: 130px;
195-
width: 130px;
193+
width: 100%;
196194
background-color: transparent;
197195
color: var(--clr-white);
198196
border: 2px solid var(--clr-white);
@@ -224,59 +222,37 @@ a {
224222
4. MEDIA QUERIES (RESPONSIVE)
225223
=================================== */
226224

227-
/* Tablet and mobile (below 992px) */
228-
@media (max-width: 991.98px) {
229-
.col-10.col-sm-8.col-lg-6 {
230-
display: flex;
231-
justify-content: center;
232-
margin: 0 auto;
225+
/* Desktop and up (992px and above) */
226+
@media (min-width: 992px) {
227+
.btn-linkedin,
228+
.btn-github-outline {
229+
width: auto;
230+
min-width: 140px;
233231
}
234232

235-
.col-10.col-sm-8.col-lg-6 img {
236-
margin: 0 auto;
237-
display: block;
233+
.btn-icon {
234+
width: 20px;
235+
height: 20px;
236+
margin-right: 8px;
238237
}
239-
240-
.col-lg-6 {
241-
text-align: center;
242-
}
243-
244-
.d-grid.gap-2.d-md-flex {
245-
justify-content: center !important;
246-
}
247-
}
248-
249-
/* Small mobile (below 576px) */
250-
@media (max-width: 575.98px) {
251-
.container {
252-
text-align: center;
253-
}
254-
255-
.btn {
256-
margin: 0.25rem !important;
257-
}
258-
259238
.language-selector-wrapper {
260-
top: 10px;
261-
right: 10px;
262-
}
263-
264-
.language-selector {
265-
padding: 8px 35px 8px 12px;
266-
font-size: 13px;
239+
top: 20px;
240+
right: 20px;
267241
}
268242

269243
.custom-select {
270-
width: 120px;
244+
width: 150px;
271245
}
272246

273247
.custom-select-trigger {
274-
padding: 8px 35px 8px 12px;
275-
font-size: 13px;
248+
padding: 10px 40px 10px 16px;
249+
font-size: 15px;
250+
background-position: right 12px center;
251+
background-size: 12px;
276252
}
277253

278254
.custom-option {
279-
padding: 8px 12px;
280-
font-size: 13px;
255+
padding: 10px 16px;
256+
font-size: 15px;
281257
}
282258
}

src/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@
5555
</div>
5656

5757
<div class="row flex-lg-row-reverse align-items-center g-5 py-5">
58-
<div class="col-10 col-sm-8 col-lg-6">
58+
<div class="col-12 col-sm-10 col-md-8 col-lg-6 text-center">
5959
<img
6060
src="./assets/images/fernando-tona-dev-pic.jpg"
6161
class="d-block mx-auto img-fluid"
6262
alt="Fernando Tona picture"
6363
data-translate-alt="imageAlt"
64-
style="max-height: 450px; border-radius: 2%"
64+
style="max-width: 350px; border-radius: 2%"
6565
loading="lazy"
6666
/>
6767
</div>
68-
<div class="col-lg-6">
68+
<div class="col-lg-6 text-center text-lg-start">
6969
<h1 class="display-5 fw-bold lh-1 mb-3" style="color: #070f2b">
7070
Fernando Tona
7171
</h1>
@@ -75,13 +75,13 @@ <h1 class="display-5 fw-bold lh-1 mb-3" style="color: #070f2b">
7575
<p class="lead" style="color: white" data-translate="tagline">
7676
Problem-Solver with a Musician's Discipline
7777
</p>
78-
<div class="d-grid gap-2 d-md-flex justify-content-md-start">
78+
<div class="d-grid gap-2 d-lg-flex justify-content-lg-start">
7979
<a
8080
href="https://linkedin.com/in/fernandotona"
8181
target="_blank"
8282
rel="noopener noreferrer"
8383
>
84-
<button type="button" class="btn btn-linkedin btn-lg px-4 me-md-2">
84+
<button type="button" class="btn btn-linkedin btn-lg px-4">
8585
<img
8686
src="./assets/images/linkedin.svg"
8787
alt="LinkedIn logo"
@@ -97,7 +97,7 @@ <h1 class="display-5 fw-bold lh-1 mb-3" style="color: #070f2b">
9797
>
9898
<button
9999
type="button"
100-
class="btn btn-github-outline btn-lg px-4 me-md-2"
100+
class="btn btn-github-outline btn-lg px-4"
101101
>
102102
<img
103103
src="./assets/images/github.svg"

0 commit comments

Comments
 (0)