Bladeren bron

navbar & header: refonte graphique majeure - en cours

Lou 3 jaren geleden
bovenliggende
commit
a5145bb90b

+ 17
- 25
src/components/header/index.jsx Bestand weergeven

@@ -1,35 +1,27 @@
1 1
 import React from "react";
2
-import { Link } from "gatsby";
3 2
 
4 3
 import "./index.scss";
4
+import BtnContact from "../btnContact";
5 5
 
6 6
 const Header = () => {
7 7
 	return (
8
-		<div id="header">
9
-			<h1>
10
-				<Link to="/">CLI</Link>
11
-			</h1>
12
-			<h2>Coopérative strasbourgeoise du numérique</h2>
13
-			<div className="header-services">
14
-				<ul className="menu">
15
-					<li>
16
-						<Link to="/services" className="menu-btn">
17
-							<span>Vos besoins</span>
18
-						</Link>
19
-					</li>
20
-					<li>
21
-						<Link to="/nous-contacter" className="menu-btn">
22
-							<span>Nous contacter</span>
23
-						</Link>
24
-					</li>
25
-					<li>
26
-						<Link to="/a-propos" className="menu-btn">
27
-							<span>La Coopérative</span>
28
-						</Link>
29
-					</li>
30
-				</ul>
8
+		<header>
9
+			<div className="hero">
10
+				<h1>Du numérique, en Alsace, au plus proche de vos besoins.</h1>
11
+				<div className="hero-box">
12
+					<div className="hero-text">
13
+						<p className="hero-paragraph">
14
+							Nous proposons un accompagnement local et sur-mesure pour tous vos
15
+							projets numériques.{" "}
16
+						</p>
17
+						<p className="hero-highlight">
18
+							Demandez nous un devis, nous vous en moins de 24 heures.
19
+						</p>
20
+					</div>
21
+					<BtnContact>Écrivez-nous !</BtnContact>
22
+				</div>
31 23
 			</div>
32
-		</div>
24
+		</header>
33 25
 	);
34 26
 };
35 27
 

+ 40
- 33
src/components/header/index.scss Bestand weergeven

@@ -1,43 +1,50 @@
1
-@import "../../scss/main.scss";
1
+@use "../../scss/abstracts/colors" as *;
2
+@use "../../scss/abstracts/fonts" as *;
2 3
 
3
-#header {
4
+header {
5
+	width: 100vw;
6
+	height: 100vh;
4 7
 	display: flex;
5
-	flex-direction: column;
6
-	align-items: center;
7
-	font-family: "Cutive Mono", "mono";
8
-	text-align: center;
8
+	background-image: url("../../images/pen-blue.jpg");
9
+	background-position: center;
10
+	padding-top: 5rem;
11
+	color: $light;
9 12
 
10
-	h1 {
11
-		font-size: 5rem;
12
-		font-weight: 600;
13
-		margin: 3rem auto 1.5rem auto;
14
-	}
13
+	.hero {
14
+		display: flex;
15
+		flex-direction: column;
16
+		align-items: center;
17
+		justify-content: center;
18
+		padding-bottom: 10rem;
19
+		width: 100%;
20
+		position: relative;
21
+		text-align: center;
15 22
 
16
-	h2 {
17
-		font-size: 1.7rem;
18
-		font-weight: 600;
19
-		margin: 0 auto 1.5rem auto;
20
-		padding: 0 15px;
21
-	}
23
+		h1 {
24
+			margin: 0.3rem 1rem;
25
+			font-size: 2.3rem;
26
+			font-weight: 900;
27
+			color: $dark;
28
+		}
29
+
30
+		.hero-box {
31
+			display: flex;
32
+			flex-direction: column;
33
+			color: $dark;
22 34
 
23
-	.header-services {
24
-		ul.menu {
25
-			list-style: none;
26
-			margin: 0;
27
-			padding: 0;
35
+			.hero-text {
36
+				font-size: 1.3rem;
28 37
 
29
-			li {
30
-				margin: 0.5rem 1.2rem;
31
-				line-height: 2rem;
32
-				font-size: 1.5rem;
38
+				.hero-paragraph {
39
+					line-height: 1.7rem;
40
+					text-align: center;
41
+					width: 75vw;
42
+				}
43
+				.hero-highlight {
44
+					color: $primary-darker;
45
+					font-weight: bold;
46
+				}
33 47
 			}
34 48
 		}
35 49
 	}
36 50
 }
37
-
38
-@media (min-width: 890px) {
39
-	ul.menu {
40
-		display: flex;
41
-		flex-direction: row;
42
-	}
43
-}

+ 2
- 2
src/components/layout/index.jsx Bestand weergeven

@@ -2,7 +2,7 @@ import React from "react";
2 2
 import PropTypes from "prop-types";
3 3
 import { ToastContainer, toast } from "react-toastify";
4 4
 
5
-import Header from "../header";
5
+import Navbar from "../navbar";
6 6
 import Footer from "../footer";
7 7
 
8 8
 toast.configure();
@@ -10,7 +10,7 @@ toast.configure();
10 10
 const Layout = ({ children }) => {
11 11
 	return (
12 12
 		<>
13
-			<Header />
13
+			<Navbar />
14 14
 			<main>{children}</main>
15 15
 			<ToastContainer
16 16
 				position="bottom-center"

+ 29
- 0
src/components/navbar/index.jsx Bestand weergeven

@@ -0,0 +1,29 @@
1
+import React from "react";
2
+import { Link } from "gatsby";
3
+
4
+import "./index.scss";
5
+
6
+const Navbar = () => {
7
+	return (
8
+		<div id="navbar-container">
9
+			<nav>
10
+				<div className="details">
11
+					<Link to="/services" className="menu-btn">
12
+						<span>Services</span>
13
+					</Link>
14
+					<Link to="/a-propos" className="menu-btn">
15
+						<span>La Coopérative</span>
16
+					</Link>
17
+				</div>
18
+				<Link id="navbar-title" to="/">
19
+					<span>CLI</span>
20
+				</Link>
21
+				<Link to="/nous-contacter" id="contact-btn" className="menu-btn">
22
+					<button className="btn">Nous contacter</button>
23
+				</Link>
24
+			</nav>
25
+		</div>
26
+	);
27
+};
28
+
29
+export default Navbar;

+ 70
- 0
src/components/navbar/index.scss Bestand weergeven

@@ -0,0 +1,70 @@
1
+@use "../../scss/abstracts/colors" as *;
2
+@use "../../scss/abstracts/fonts" as *;
3
+
4
+#navbar-container {
5
+	clear: both;
6
+	display: block;
7
+}
8
+
9
+nav {
10
+	padding: 0.5rem 2rem;
11
+	position: fixed;
12
+	overflow-y: scroll;
13
+	z-index: 1;
14
+	width: 100vw;
15
+	height: 3.5rem;
16
+	padding: 0;
17
+	background: transparent;
18
+	display: flex;
19
+	align-items: center;
20
+	justify-content: space-between;
21
+
22
+	.details {
23
+		margin-right: auto;
24
+		margin-left: 1.5rem;
25
+		color: $dark;
26
+
27
+		& > a:first-of-type {
28
+			margin: 0;
29
+			font-size: 1.2rem;
30
+		}
31
+
32
+		& > a:last-of-type {
33
+			margin: 0 1.5rem;
34
+			font-size: 1.2rem;
35
+		}
36
+	}
37
+
38
+	#navbar-title {
39
+		margin: 0 auto;
40
+		font-family: "Cutive Mono";
41
+		font-size: 2.5rem;
42
+		font-weight: bold;
43
+		color: $dark;
44
+
45
+		span {
46
+			margin: 0;
47
+			padding: 0;
48
+		}
49
+	}
50
+
51
+	#contact-btn {
52
+		margin-left: auto;
53
+		margin-right: 1.5rem;
54
+
55
+		button {
56
+			background: $primary;
57
+			color: white;
58
+			border: none;
59
+			transition: all 300ms ease-in-out;
60
+		}
61
+
62
+		&:hover,
63
+		&:focus {
64
+			button {
65
+				border: none;
66
+				box-shadow: 0 0 2px 1px $primary;
67
+			}
68
+		}
69
+	}
70
+}

BIN
src/images/pen-blue.jpg Bestand weergeven


+ 10
- 0
src/pages/a-propos.jsx Bestand weergeven

@@ -10,6 +10,16 @@ const Apropos = () => {
10 10
 			<Seo title="À notre propos"></Seo>
11 11
 			<div>
12 12
 				<h2>À notre propos</h2>
13
+				<section className="pages-sections">
14
+					<p className="section-paragraph">
15
+						La CLI est une association de travailleuses et travailleurs du
16
+						numériques basée à Strasbourg. Notre catalogue de prestations se
17
+						compose d'un large éventail de services comme le développement de
18
+						sites web, leur mise en production et leur maintenance. Nous
19
+						effectuons aussi la conception de solutions logiciels, l'assistance
20
+						informatique, et la formation à divers outils informatiques.
21
+					</p>
22
+				</section>
13 23
 			</div>
14 24
 		</Layout>
15 25
 	);

+ 2
- 19
src/pages/index.jsx Bestand weergeven

@@ -4,33 +4,16 @@ import { Link } from "gatsby";
4 4
 import Layout from "../components/layout/index";
5 5
 import Seo from "../components/seo";
6 6
 import RealisationCard from "../components/realisationCard";
7
-import BtnContact from "../components/btnContact";
8 7
 import "../scss/index.scss";
9 8
 import Art from "../images/undraw_Art.svg";
9
+import Header from "../components/header";
10 10
 
11 11
 const IndexPage = () => {
12 12
 	return (
13 13
 		<Layout>
14 14
 			<Seo title="Association de travailleuses et travailleurs du numérique" />
15 15
 			<div className="page-content">
16
-				<section className="pages-sections">
17
-					<p className="section-paragraph">
18
-						La CLI est une association de travailleuses et travailleurs du
19
-						numériques basée à Strasbourg. Notre catalogue de prestations se
20
-						compose d'un large éventail de services comme le développement de
21
-						sites web, leur mise en production et leur maintenance. Nous
22
-						effectuons aussi la conception de solutions logiciels, l'assistance
23
-						informatique, et la formation à divers outils informatiques.
24
-					</p>
25
-					<p className="section-paragraph">
26
-						Nous proposons un accompagnement local et sur-mesure pour tous vos
27
-						projets numériques.{" "}
28
-						<span className="paragraph-highlight">
29
-							Demandez nous un devis, nous vous répondrons au plus vite.
30
-						</span>
31
-					</p>
32
-					<BtnContact>Écrivez-nous !</BtnContact>
33
-				</section>
16
+				<Header />
34 17
 				<section className="services-list">
35 18
 					<div className="service-type">
36 19
 						<div className="service-type-header">

+ 3
- 1
src/scss/abstracts/_colors.scss Bestand weergeven

@@ -1,2 +1,4 @@
1 1
 $primary: #ad73d2;
2
-$light: hsl(205, 46%, 96%);
2
+$primary-darker: #9a52c7;
3
+$light: #f0f6f9;
4
+$dark: #2f2e41;

+ 1
- 6
src/scss/main.scss Bestand weergeven

@@ -3,7 +3,7 @@
3 3
 
4 4
 :root {
5 5
 	background: white;
6
-	color: black;
6
+	color: $dark;
7 7
 	font-size: 16px;
8 8
 	font-family: "Raleway", "sans-serif";
9 9
 }
@@ -79,10 +79,5 @@ main {
79 79
 		line-height: 1.7rem;
80 80
 		text-align: center;
81 81
 		width: 75vw;
82
-
83
-		.paragraph-highlight {
84
-			color: $primary;
85
-			font-weight: bold;
86
-		}
87 82
 	}
88 83
 }

Loading…
Annuleren
Opslaan