Browse Source

header: est maintenant responsive

Lou 3 years ago
parent
commit
9f46b3ac37
2 changed files with 32 additions and 45 deletions
  1. 4
    6
      src/components/header/index.jsx
  2. 28
    39
      src/components/header/index.scss

+ 4
- 6
src/components/header/index.jsx View File

@@ -5,14 +5,12 @@ import "./index.scss";
5 5
 
6 6
 const Header = () => {
7 7
 	return (
8
-		<div className="header">
9
-			<h1 className="header-title">
8
+		<div id="header">
9
+			<h1>
10 10
 				<Link to="/">CLI</Link>
11 11
 			</h1>
12
-			<h2 className="header-subtitle">
13
-				Coopérative strasbourgeoise du numérique
14
-			</h2>
15
-			<div className="container">
12
+			<h2>Coopérative strasbourgeoise du numérique</h2>
13
+			<div className="header-services">
16 14
 				<ul className="menu">
17 15
 					<li>
18 16
 						<Link to="/vos-besoins" className="menu-btn">

+ 28
- 39
src/components/header/index.scss View File

@@ -1,55 +1,44 @@
1 1
 @import "../../scss/main.scss";
2 2
 
3
-.header {
3
+#header {
4 4
 	display: flex;
5 5
 	flex-direction: column;
6
+	align-items: center;
7
+	font-family: "Cutive Mono", "mono";
6 8
 	text-align: center;
7
-	margin-top: 70px;
8
-	margin-bottom: 30px;
9
-	font-family: "Cutive Mono";
10
-
11
-	.header-title {
12
-		margin: 0;
13
-		font-size: 3rem;
14
-		font-weight: normal;
9
+	h1 {
10
+		font-size: 5rem;
11
+		font-weight: 600;
12
+		margin: 3rem auto 1.5rem auto;
15 13
 	}
16 14
 
17
-	.header-subtitle {
18
-		margin-top: 15px;
19
-		margin-bottom: 70px;
15
+	h2 {
20 16
 		font-size: 1.7rem;
21
-		font-weight: normal;
17
+		font-weight: 600;
18
+		margin: 0 auto 1.5rem auto;
19
+	}
20
+
21
+	.header-services {
22
+		ul.menu {
23
+			list-style: none;
24
+
25
+			li {
26
+				margin: 0.5rem 1.2rem;
27
+				height: 2rem;
28
+				line-height: 2rem;
29
+				font-size: 1.5rem;
30
+			}
31
+		}
22 32
 	}
23 33
 }
24
-.container {
25
-	display: flex;
26
-	flex-direction: column;
27
-	align-items: center;
28 34
 
29
-	.menu {
30
-		margin: 0;
31
-		padding: 0;
32
-		list-style: none;
35
+@media (min-width: 890px) {
36
+	ul.menu {
33 37
 		display: flex;
34
-		justify-content: space-between;
35
-		align-items: center;
36
-		min-width: 600px;
37
-		height: 2.5rem;
38
-
39
-		.menu-btn {
40
-			height: 2.5em;
41
-			padding: 0.5rem;
42
-			text-decoration: none;
43
-			position: relative;
44
-			background: white;
45
-			border: none;
46
-			z-index: auto;
47
-			font-family: "Cutive Mono", "sans-serif";
48
-			font-size: 1.2rem;
38
+		flex-direction: row;
49 39
 
50
-			&:hover {
51
-				cursor: pointer;
52
-			}
40
+		li {
41
+			margin: 0.5rem auto;
53 42
 		}
54 43
 	}
55 44
 }

Loading…
Cancel
Save