frontend: Structure fichier + Header et navigation

This commit is contained in:
Divlo 2020-03-17 15:34:26 +01:00
parent 1b4a7a1c09
commit f631873893
12 changed files with 878 additions and 2 deletions

View File

@ -5912,6 +5912,11 @@
"resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz",
"integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE="
}, },
"gud": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz",
"integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw=="
},
"gzip-size": { "gzip-size": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz",
@ -6042,6 +6047,19 @@
"resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz",
"integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==" "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ=="
}, },
"history": {
"version": "4.10.1",
"resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz",
"integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==",
"requires": {
"@babel/runtime": "^7.1.2",
"loose-envify": "^1.2.0",
"resolve-pathname": "^3.0.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0",
"value-equal": "^1.0.1"
}
},
"hmac-drbg": { "hmac-drbg": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
@ -6052,6 +6070,14 @@
"minimalistic-crypto-utils": "^1.0.1" "minimalistic-crypto-utils": "^1.0.1"
} }
}, },
"hoist-non-react-statics": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
"integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
"requires": {
"react-is": "^16.7.0"
}
},
"hosted-git-info": { "hosted-git-info": {
"version": "2.8.8", "version": "2.8.8",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
@ -8422,6 +8448,16 @@
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.0.tgz", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.0.tgz",
"integrity": "sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY=" "integrity": "sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY="
}, },
"mini-create-react-context": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.3.2.tgz",
"integrity": "sha512-2v+OeetEyliMt5VHMXsBhABoJ0/M4RCe7fatd/fBy6SMiKazUSEt3gxxypfnk2SHMkdBYvorHRoQxuGoiwbzAw==",
"requires": {
"@babel/runtime": "^7.4.0",
"gud": "^1.0.0",
"tiny-warning": "^1.0.2"
}
},
"mini-css-extract-plugin": { "mini-css-extract-plugin": {
"version": "0.9.0", "version": "0.9.0",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz",
@ -8829,6 +8865,11 @@
"sort-keys": "^1.0.0" "sort-keys": "^1.0.0"
} }
}, },
"normalize.css": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz",
"integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg=="
},
"npm-run-path": { "npm-run-path": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
@ -10815,6 +10856,52 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.0.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.0.tgz",
"integrity": "sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA==" "integrity": "sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA=="
}, },
"react-router": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-5.1.2.tgz",
"integrity": "sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A==",
"requires": {
"@babel/runtime": "^7.1.2",
"history": "^4.9.0",
"hoist-non-react-statics": "^3.1.0",
"loose-envify": "^1.3.1",
"mini-create-react-context": "^0.3.0",
"path-to-regexp": "^1.7.0",
"prop-types": "^15.6.2",
"react-is": "^16.6.0",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"path-to-regexp": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
"integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
"requires": {
"isarray": "0.0.1"
}
}
}
},
"react-router-dom": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.1.2.tgz",
"integrity": "sha512-7BPHAaIwWpZS074UKaw1FjVdZBSVWEk8IuDXdB+OkLb8vd/WRQIpA4ag9WQk61aEfQs47wHyjWUoUGGZxpQXew==",
"requires": {
"@babel/runtime": "^7.1.2",
"history": "^4.9.0",
"loose-envify": "^1.3.1",
"prop-types": "^15.6.2",
"react-router": "5.1.2",
"tiny-invariant": "^1.0.2",
"tiny-warning": "^1.0.0"
}
},
"react-scripts": { "react-scripts": {
"version": "3.4.0", "version": "3.4.0",
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.4.0.tgz", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.4.0.tgz",
@ -11178,6 +11265,11 @@
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
"integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g="
}, },
"resolve-pathname": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz",
"integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng=="
},
"resolve-url": { "resolve-url": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
@ -12592,6 +12684,16 @@
"resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz",
"integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=" "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q="
}, },
"tiny-invariant": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.1.0.tgz",
"integrity": "sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw=="
},
"tiny-warning": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
},
"tmp": { "tmp": {
"version": "0.0.33", "version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@ -12733,6 +12835,11 @@
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
}, },
"typeface-montserrat": {
"version": "0.0.75",
"resolved": "https://registry.npmjs.org/typeface-montserrat/-/typeface-montserrat-0.0.75.tgz",
"integrity": "sha512-8ski20t3hdwu2T85pVfjK4jsDbwW8yWzd+LAKxYEmu+JVLVlB7G2yfmdKZz06pUwYCLVFvHvup+NYYulHDpE+w=="
},
"unicode-canonical-property-names-ecmascript": { "unicode-canonical-property-names-ecmascript": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
@ -12963,6 +13070,11 @@
"spdx-expression-parse": "^3.0.0" "spdx-expression-parse": "^3.0.0"
} }
}, },
"value-equal": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz",
"integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw=="
},
"vary": { "vary": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",

View File

@ -6,9 +6,12 @@
"@testing-library/jest-dom": "^4.2.4", "@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0", "@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1", "@testing-library/user-event": "^7.2.1",
"normalize.css": "^8.0.1",
"react": "^16.13.0", "react": "^16.13.0",
"react-dom": "^16.13.0", "react-dom": "^16.13.0",
"react-scripts": "3.4.0" "react-router-dom": "^5.1.2",
"react-scripts": "3.4.0",
"typeface-montserrat": "0.0.75"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",

View File

@ -0,0 +1,53 @@
/* GENERAL */
:root {
--border-header-footer: 3px rgba(255, 255, 255, .7) solid;
--background-color: #181818;
--text-color: rgb(222, 222, 222);
--important: #ffd800;
}
html {
line-height: initial;
}
#root {
min-height: 100vh;
display: flex;
flex-flow: column wrap;
background-color: var(--background-color);
color: var(--text-color);
font-family: 'Montserrat', sans-serif;
font-weight: 400;
font-size: 18px;
padding-top: 99px;
}
p {
font-size: 18px;
line-height: 1.9;
}
h2 {
font-size: 1.8em;
}
a:hover {
text-decoration: underline;
}
/* CONTENT */
.content {
flex-grow: 1;
display: flex;
}
.centeredContainer {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
/* UTILITIES */
.text-center {
text-align: center;
word-break: break-word;
}
a, .important {
color: var(--important);
text-decoration: none;
}

View File

@ -0,0 +1,442 @@
/*!
* Bootstrap Grid v4.4.1 (https://getbootstrap.com/)
* Edited by Divlo (col, col-sm, col-md, col-lg)
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
.container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
.container-fluid {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 576px) {
.container {
max-width: 540px;
}
}
@media (max-width: 576px) {
.container {
width: 90%;
}
}
@media (min-width: 768px) {
.container {
max-width: 720px;
}
}
@media (min-width: 992px) {
.container {
max-width: 960px;
}
}
@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}
.row {
display: flex;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
position: relative;
width: 100%;
padding-right: 15px;
padding-left: 15px;
}
/* col- */
.col-1 {
flex: 0 0 8.33333%;
max-width: 8.33333%;
}
.col-2 {
flex: 0 0 16.66667%;
max-width: 16.66667%;
}
.col-3 {
flex: 0 0 25%;
max-width: 25%;
}
.col-4 {
flex: 0 0 33.33333%;
max-width: 33.33333%;
}
.col-5 {
flex: 0 0 41.66667%;
max-width: 41.66667%;
}
.col-6 {
flex: 0 0 50%;
max-width: 50%;
}
.col-7 {
flex: 0 0 58.33333%;
max-width: 58.33333%;
}
.col-8 {
flex: 0 0 66.66667%;
max-width: 66.66667%;
}
.col-9 {
flex: 0 0 75%;
max-width: 75%;
}
.col-10 {
flex: 0 0 83.33333%;
max-width: 83.33333%;
}
.col-11 {
flex: 0 0 91.66667%;
max-width: 91.66667%;
}
.col-12 {
flex: 0 0 100%;
max-width: 100%;
}
.offset-1 {
margin-left: 8.33333%;
}
.offset-2 {
margin-left: 16.66667%;
}
.offset-3 {
margin-left: 25%;
}
.offset-4 {
margin-left: 33.33333%;
}
.offset-5 {
margin-left: 41.66667%;
}
.offset-6 {
margin-left: 50%;
}
.offset-7 {
margin-left: 58.33333%;
}
.offset-8 {
margin-left: 66.66667%;
}
.offset-9 {
margin-left: 75%;
}
.offset-10 {
margin-left: 83.33333%;
}
.offset-11 {
margin-left: 91.66667%;
}
/* col-sm */
@media (min-width: 576px) {
.col-sm-1 {
flex: 0 0 8.33333%;
max-width: 8.33333%;
}
.col-sm-2 {
flex: 0 0 16.66667%;
max-width: 16.66667%;
}
.col-sm-3 {
flex: 0 0 25%;
max-width: 25%;
}
.col-sm-4 {
flex: 0 0 33.33333%;
max-width: 33.33333%;
}
.col-sm-5 {
flex: 0 0 41.66667%;
max-width: 41.66667%;
}
.col-sm-6 {
flex: 0 0 50%;
max-width: 50%;
}
.col-sm-7 {
flex: 0 0 58.33333%;
max-width: 58.33333%;
}
.col-sm-8 {
flex: 0 0 66.66667%;
max-width: 66.66667%;
}
.col-sm-9 {
flex: 0 0 75%;
max-width: 75%;
}
.col-sm-10 {
flex: 0 0 83.33333%;
max-width: 83.33333%;
}
.col-sm-11 {
flex: 0 0 91.66667%;
max-width: 91.66667%;
}
.col-sm-12 {
flex: 0 0 100%;
max-width: 100%;
}
.offset-sm-0 {
margin-left: 0;
}
.offset-sm-1 {
margin-left: 8.33333%;
}
.offset-sm-2 {
margin-left: 16.66667%;
}
.offset-sm-3 {
margin-left: 25%;
}
.offset-sm-4 {
margin-left: 33.33333%;
}
.offset-sm-5 {
margin-left: 41.66667%;
}
.offset-sm-6 {
margin-left: 50%;
}
.offset-sm-7 {
margin-left: 58.33333%;
}
.offset-sm-8 {
margin-left: 66.66667%;
}
.offset-sm-9 {
margin-left: 75%;
}
.offset-sm-10 {
margin-left: 83.33333%;
}
.offset-sm-11 {
margin-left: 91.66667%;
}
}
/* col-md */
@media (min-width: 768px) {
.col-md-1 {
flex: 0 0 8.33333%;
max-width: 8.33333%;
}
.col-md-2 {
flex: 0 0 16.66667%;
max-width: 16.66667%;
}
.col-md-3 {
flex: 0 0 25%;
max-width: 25%;
}
.col-md-4 {
flex: 0 0 33.33333%;
max-width: 33.33333%;
}
.col-md-5 {
flex: 0 0 41.66667%;
max-width: 41.66667%;
}
.col-md-6 {
flex: 0 0 50%;
max-width: 50%;
}
.col-md-7 {
flex: 0 0 58.33333%;
max-width: 58.33333%;
}
.col-md-8 {
flex: 0 0 66.66667%;
max-width: 66.66667%;
}
.col-md-9 {
flex: 0 0 75%;
max-width: 75%;
}
.col-md-10 {
flex: 0 0 83.33333%;
max-width: 83.33333%;
}
.col-md-11 {
flex: 0 0 91.66667%;
max-width: 91.66667%;
}
.col-md-12 {
flex: 0 0 100%;
max-width: 100%;
}
.offset-md-0 {
margin-left: 0;
}
.offset-md-1 {
margin-left: 8.33333%;
}
.offset-md-2 {
margin-left: 16.66667%;
}
.offset-md-3 {
margin-left: 25%;
}
.offset-md-4 {
margin-left: 33.33333%;
}
.offset-md-5 {
margin-left: 41.66667%;
}
.offset-md-6 {
margin-left: 50%;
}
.offset-md-7 {
margin-left: 58.33333%;
}
.offset-md-8 {
margin-left: 66.66667%;
}
.offset-md-9 {
margin-left: 75%;
}
.offset-md-10 {
margin-left: 83.33333%;
}
.offset-md-11 {
margin-left: 91.66667%;
}
}
/* col-lg */
@media (min-width: 992px) {
.col-lg-1 {
flex: 0 0 8.33333%;
max-width: 8.33333%;
}
.col-lg-2 {
flex: 0 0 16.66667%;
max-width: 16.66667%;
}
.col-lg-3 {
flex: 0 0 25%;
max-width: 25%;
}
.col-lg-4 {
flex: 0 0 33.33333%;
max-width: 33.33333%;
}
.col-lg-5 {
flex: 0 0 41.66667%;
max-width: 41.66667%;
}
.col-lg-6 {
flex: 0 0 50%;
max-width: 50%;
}
.col-lg-7 {
flex: 0 0 58.33333%;
max-width: 58.33333%;
}
.col-lg-8 {
flex: 0 0 66.66667%;
max-width: 66.66667%;
}
.col-lg-9 {
flex: 0 0 75%;
max-width: 75%;
}
.col-lg-10 {
flex: 0 0 83.33333%;
max-width: 83.33333%;
}
.col-lg-11 {
flex: 0 0 91.66667%;
max-width: 91.66667%;
}
.col-lg-12 {
flex: 0 0 100%;
max-width: 100%;
}
.offset-lg-0 {
margin-left: 0;
}
.offset-lg-1 {
margin-left: 8.33333%;
}
.offset-lg-2 {
margin-left: 16.66667%;
}
.offset-lg-3 {
margin-left: 25%;
}
.offset-lg-4 {
margin-left: 33.33333%;
}
.offset-lg-5 {
margin-left: 41.66667%;
}
.offset-lg-6 {
margin-left: 50%;
}
.offset-lg-7 {
margin-left: 58.33333%;
}
.offset-lg-8 {
margin-left: 66.66667%;
}
.offset-lg-9 {
margin-left: 75%;
}
.offset-lg-10 {
margin-left: 83.33333%;
}
.offset-lg-11 {
margin-left: 91.66667%;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -0,0 +1,9 @@
import React from 'react';
export default function Footer() {
return (
<footer>
Footer
</footer>
);
}

View File

@ -0,0 +1,162 @@
/* HEADER */
.Header {
position: fixed;
width: 100%;
top: 0;
left: 0;
right: 0;
z-index: 100;
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: space-between;
padding: .5rem 1rem;
border-bottom: var(--border-header-footer);
background-color: var(--background-color);
}
@media (min-width: 992px) {
.Header {
flex-flow: row nowrap;
justify-content: flex-start;
}
}
.Header > .container {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
@media (min-width: 992px) {
.Header > .container {
flex-wrap: nowrap;
}
}
/* Brand */
.Header__brand-link {
display: inline-block;
padding-top: .3125rem;
padding-bottom: .3125rem;
margin-right: 1rem;
font-size: 1.25rem;
line-height: inherit;
white-space: nowrap;
}
#brand-link__logo-small-screen {
display: none;
}
@media (max-width: 480px) {
#brand-link__logo {
display: none;
}
.Header__brand-link {
width: 30%;
}
#brand-link__logo-small-screen {
display: inline-block;
width: 80%;
}
}
@media (min-width: 992px) {
.Header .Header__navbar {
display: flex;
flex-basis: auto;
}
}
.Header__navbar {
flex-basis: 100%;
flex-grow: 1;
align-items: center;
}
.navbar__list {
display: flex;
flex-direction: row;
margin-left: auto;
}
.navbar__list.navbar__list-active {
margin: 0 !important;
display: flex;
}
@media (max-width: 992px) {
.navbar__list {
display: none;
flex-direction: column;
align-items: center;
padding-left: 0;
list-style: none;
}
}
.navbar-link {
display: block;
padding: .5rem 1rem;
}
/* Details Styling */
.navbar-link:hover {
text-decoration: none;
color: rgba(255, 255, 255, .75);
}
.navbar-link, .navbar-link-active {
color: rgba(255, 255, 255, .5);
}
.navbar-link-active, .navbar-link-active:hover, .Header__brand-link {
color: var(--text-color);
}
.navbar-item {
list-style: none;
}
.navbar-link {
font-size: 16px;
padding: .5rem;
}
/* Hamburger Icon */
.Header__hamburger {
display: none;
width: 56px;
height: 40px;
cursor: pointer;
background-color: transparent;
border: 1px solid rgba(255, 255, 255, .1);
border-radius: .25rem;
position: relative;
}
.Header__hamburger > span, .Header__hamburger > span::before, .Header__hamburger > span::after {
position: absolute;
width: 22px;
height: 1.3px;
background-color: rgba(255, 255, 255);
}
.Header__hamburger > span {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transition: background-color .3s ease-in-out;
}
.Header__hamburger > span::before, .Header__hamburger > span::after {
content: '';
transition: transform .3s ease-in-out;
}
.Header__hamburger > span::before {
transform: translateY(-8px);
}
.Header__hamburger > span::after {
transform: translateY(8px);
}
.Header__hamburger-active span {
background-color: transparent;
}
.Header__hamburger-active > span::before {
transform: translateY(0px) rotateZ(45deg);
}
.Header__hamburger-active > span::after {
transform: translateY(0px) rotateZ(-45deg);
}
/* Apparition du hamburger */
@media (max-width: 992px) {
.Header__hamburger {
display: flex;
}
}

View File

@ -0,0 +1,48 @@
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import NavigationLink from './NavigationLink';
import BrandLogo from '../../assets/images/FunctionProject_brand-logo.png';
import BrandIcon from '../../assets/images/FunctionProject_icon.png';
import './Header.css';
export default function Header() {
const [hamburgerIcon, setHamburgerIcon] = useState("");
const [navbarList, setNavbarList] = useState("");
const toggleNavbar = () => {
if (hamburgerIcon) {
setHamburgerIcon("");
setNavbarList("");
} else {
setHamburgerIcon("Header__hamburger-active");
setNavbarList("navbar__list-active");
}
}
return (
<header className="Header">
<div className="container">
{/* Brand */}
<Link className="Header__brand-link" to={{ pathname: "/" }}>
<img id="brand-link__logo" src={BrandLogo} alt="FunctionProject" />
<img id="brand-link__logo-small-screen" src={BrandIcon} alt="FunctionProject" />
</Link>
{/* Hamburger icon on Mobile */}
<div onClick={toggleNavbar} className={"Header__hamburger " + hamburgerIcon}>
<span></span>
</div>
{/* Navigation */}
<nav className="Header__navbar">
<ul className={"navbar__list " + navbarList}>
<NavigationLink name="Accueil" path="/" />
</ul>
</nav>
</div>
</header>
);
}

View File

@ -0,0 +1,22 @@
import React from 'react';
import { Link, useLocation } from 'react-router-dom';
import './Header.css';
export default function NavigationLink(props) {
const location = useLocation();
return (
<li className="navbar-item">
<Link
className=
{
`navbar-link ${location.pathname === props.path ? "navbar-link-active" : null}`
}
to={props.path}
>
{props.name}
</Link>
</li>
);
}

View File

@ -1,18 +1,34 @@
/* Libraries Imports */ /* Libraries Imports */
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
/* Components Imports */ /* Components Imports */
import Header from './components/Header/Header';
import Footer from './components/Footer/Footer';
/* Pages Imports */ /* Pages Imports */
import Home from './pages/Home/Home';
/* Contexts Imports */ /* Contexts Imports */
/* CSS Imports */ /* CSS Imports */
import 'typeface-montserrat';
import 'normalize.css';
import './assets/css/grid.css';
import './assets/css/general.css';
function App() { function App() {
return ( return (
<p>Hello world!</p> <BrowserRouter>
<Header />
<div className="content container-fluid">
<Switch>
<Route exact path="/" component={Home} />
</Switch>
</div>
<Footer />
</BrowserRouter>
); );
} }

View File

@ -0,0 +1,9 @@
import React from 'react';
export default function Home() {
return (
<div>
Home
</div>
);
}