Explorar el Código

footer: ajout de style responsive

Lou hace 3 años
padre
commit
9a81a82a09
Se han modificado 3 ficheros con 133 adiciones y 19 borrados
  1. 13
    9
      src/components/footer/index.jsx
  2. 116
    10
      src/components/footer/index.scss
  3. 4
    0
      src/scss/main.scss

+ 13
- 9
src/components/footer/index.jsx Ver fichero

@@ -2,26 +2,30 @@ import React from "react";
2 2
 import { Link } from "gatsby";
3 3
 
4 4
 import "./index.scss";
5
+import Logo from "../../images/favicon.svg";
5 6
 
6 7
 const Footer = () => {
7 8
 	return (
8 9
 		<footer className="footer">
9 10
 			<ul className="footer-list">
10
-				<li>
11
-					<div className="footer-contact">
12
-						<Link to="/contact">Nous écrire</Link>
13
-						<p>notre@email.com</p>
14
-					</div>
15
-				</li>
16 11
 				<li>
17 12
 					<div className="footer-about">
13
+						<div className="footer-about-title">
14
+							<img src={Logo} alt="Logo de la CLI" height="40px" width="40px" />
15
+							<h4>CLI</h4>
16
+						</div>
18 17
 						<p>
19
-							CLI est une association à but non lucratif spécialisée dans le
20
-							numérique. <br /> Nous fournissons une large variété de
21
-							prestations numériques.
18
+							La CLI est une association à but non lucratif spécialisée dans le
19
+							numérique fournissant une large variété de prestations numériques.
22 20
 						</p>
23 21
 					</div>
24 22
 				</li>
23
+				<li>
24
+					<div className="footer-contact">
25
+						<Link to="/contact">Nous écrire</Link>
26
+						<p>notre@email.com</p>
27
+					</div>
28
+				</li>
25 29
 				<li>Mentions légales</li>
26 30
 			</ul>
27 31
 		</footer>

+ 116
- 10
src/components/footer/index.scss Ver fichero

@@ -1,23 +1,30 @@
1 1
 @import "../../scss/main.scss";
2 2
 
3 3
 .footer {
4
-	margin-top: 50px;
4
+	margin-top: 30px;
5 5
 	margin-left: auto;
6 6
 	margin-right: auto;
7
-	height: 70px;
8
-	max-width: 1200px;
7
+	padding: 40px 0;
8
+	height: 100%;
9
+	width: 100%;
9 10
 	color: grey;
11
+	background: hsl(206, 47%, 95%);
10 12
 
11 13
 	a {
12 14
 		color: grey;
13 15
 	}
16
+}
14 17
 
18
+@media screen and (min-width: 992px) {
15 19
 	.footer-list {
20
+		margin: 0;
21
+		width: 100%;
16 22
 		list-style: none;
17 23
 		text-align: center;
18 24
 		display: flex;
19 25
 		flex-direction: row;
20 26
 		justify-content: space-evenly;
27
+		align-items: center;
21 28
 
22 29
 		li {
23 30
 			padding-left: 15px;
@@ -30,22 +37,121 @@
30 37
 			align-items: center;
31 38
 		}
32 39
 
40
+		.footer-contact::before {
41
+			content: "";
42
+			position: absolute;
43
+			background: black;
44
+			height: 2px;
45
+			width: 100%;
46
+			left: 0;
47
+			top: 0;
48
+		}
49
+
50
+		.footer-contact:after {
51
+			content: "";
52
+			position: absolute;
53
+			background: black;
54
+			height: 2px;
55
+			width: 100%;
56
+			left: 0;
57
+			bottom: 0;
58
+		}
59
+
33 60
 		.footer-about {
34
-			width: 40vw;
61
+			width: 500px;
62
+
63
+			> p {
64
+				line-height: 1.5rem;
65
+			}
66
+
67
+			.footer-about-title {
68
+				display: flex;
69
+				flex-direction: row;
70
+				width: 120px;
71
+				margin-left: auto;
72
+				margin-right: auto;
73
+				align-items: center;
74
+				height: 60px;
75
+
76
+				h4 {
77
+					font-size: 2rem;
78
+					font-family: "Cutive Mono";
79
+					padding: 0 15px;
80
+				}
81
+			}
35 82
 		}
36 83
 	}
37 84
 }
38 85
 
39 86
 @media screen and (max-width: 992px) {
40 87
 	.footer-list {
88
+		margin: 0;
89
+		padding: 30px 0;
90
+		list-style: none;
91
+		text-align: center;
41 92
 		display: flex;
42 93
 		flex-direction: column;
43
-	}
44
-}
94
+		justify-content: center;
95
+		width: 80vw;
96
+		margin-left: auto;
97
+		margin-right: auto;
45 98
 
46
-@media screen and (max-width: 600px) {
47
-	.footer-list {
48
-		display: flex;
49
-		flex-direction: column;
99
+		li {
100
+			padding-top: 50px;
101
+
102
+			&:first-of-type {
103
+				padding-top: 0;
104
+			}
105
+		}
106
+
107
+		hr {
108
+			width: 100%;
109
+			height: 1px;
110
+			border: 1px solid lightblue;
111
+			color: lightblue;
112
+		}
113
+
114
+		.footer-contact > * {
115
+			display: flex;
116
+			flex-direction: column;
117
+			align-items: center;
118
+		}
119
+
120
+		.footer-contact::before {
121
+			content: "";
122
+			display: block;
123
+			position: absolute;
124
+			background: black;
125
+			height: 2px;
126
+			width: 100%;
127
+			left: 0;
128
+			top: 0;
129
+		}
130
+
131
+		.footer-about {
132
+			width: 40vw;
133
+			margin-left: auto;
134
+			margin-right: auto;
135
+
136
+			p {
137
+				line-height: 1.5rem;
138
+			}
139
+
140
+			.footer-about-title {
141
+				display: flex;
142
+				flex-direction: row;
143
+				width: 120px;
144
+				margin-left: auto;
145
+				margin-right: auto;
146
+				align-items: center;
147
+				height: 60px;
148
+
149
+				h4 {
150
+					font-size: 2rem;
151
+					font-family: "Cutive Mono";
152
+					padding: 0 15px;
153
+				}
154
+			}
155
+		}
50 156
 	}
51 157
 }

+ 4
- 0
src/scss/main.scss Ver fichero

@@ -19,6 +19,10 @@ a {
19 19
 	box-sizing: border-box;
20 20
 }
21 21
 
22
+body {
23
+	margin: 0;
24
+}
25
+
22 26
 input:focus,
23 27
 textarea:focus,
24 28
 button:focus {

Loading…
Cancelar
Guardar