Skip to content

Commit e4fbee5

Browse files
authored
Merge pull request #2 from maelgruandWebDev/dev
Creating design mobile first and adding alert(error)
2 parents 974d882 + 43206e7 commit e4fbee5

2 files changed

Lines changed: 64 additions & 8 deletions

File tree

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1 class="title">TaskManager</h1>
1414
<div class="navbar">
1515
<button class="left">Acceuil</button>
1616
<button class="left">Tasks</button>
17-
<a id="profile"><img src="profile.png" alt="Profile"></a>
17+
<a id="profile" onclick="alert('Indisponible pour le moment')"><img src="profile.png" alt="Profile"></a>
1818
</div>
1919
<div id="login">
2020
<input type="text" id="name" placeholder="name">

styles.css

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ body {
5353

5454
/* Formulaire de login */
5555
#login {
56-
width: 300px;
56+
width: 90%;
57+
max-width: 400px;
5758
margin: 20px auto;
5859
padding: 20px;
5960
background-color: #fff;
@@ -100,7 +101,8 @@ body {
100101

101102
/* Section profil utilisateur */
102103
#profile-sect {
103-
width: 300px;
104+
width: 90%;
105+
max-width: 400px;
104106
margin: 20px auto;
105107
padding: 20px;
106108
background-color: #fff;
@@ -112,7 +114,8 @@ body {
112114

113115
/* Affichage des tâches */
114116
#tasks {
115-
width: 60%;
117+
width: 90%;
118+
max-width: 800px;
116119
margin: 20px auto;
117120
padding: 20px;
118121
background-color: #fff;
@@ -136,7 +139,8 @@ body {
136139
padding: 15px;
137140
border-radius: 8px;
138141
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
139-
width: 200px;
142+
width: 100%;
143+
max-width: 250px;
140144
text-align: center;
141145
margin-bottom: 10px;
142146
transition: transform 0.3s;
@@ -197,7 +201,8 @@ body {
197201

198202
/* Vue options */
199203
#vue {
200-
width: 60%;
204+
width: 90%;
205+
max-width: 800px;
201206
margin: 20px auto;
202207
padding: 20px;
203208
background-color: #fff;
@@ -249,6 +254,57 @@ body {
249254
background-color: #45a049;
250255
}
251256

252-
#add-task {
253-
width: 100%;
257+
/* Responsive Design - Mobile First */
258+
@media (max-width: 768px) {
259+
.navbar {
260+
flex-direction: column;
261+
text-align: center;
262+
}
263+
264+
.navbar button {
265+
width: 100%;
266+
margin: 5px 0;
267+
}
268+
269+
#profile-sect input[type="text"],
270+
#profile-sect button {
271+
width: 100%;
272+
}
273+
274+
#tasks {
275+
width: 100%;
276+
}
277+
278+
.task-card {
279+
width: 100%;
280+
max-width: 100%;
281+
}
282+
283+
#vue {
284+
width: 100%;
285+
}
286+
}
287+
288+
/* Responsive Design - Tablettes et au-delà */
289+
@media (min-width: 769px) {
290+
.navbar {
291+
flex-direction: row;
292+
}
293+
294+
.task-card {
295+
width: 45%;
296+
max-width: 250px;
297+
}
298+
299+
#tasks {
300+
width: 60%;
301+
}
302+
303+
#profile-sect {
304+
width: 50%;
305+
}
306+
307+
#vue {
308+
width: 60%;
309+
}
254310
}

0 commit comments

Comments
 (0)