Skip to content

Commit 6dfae73

Browse files
author
bilal
committed
[add] Banner component improved [Fixes #51]
1 parent de8d9d4 commit 6dfae73

5 files changed

Lines changed: 31 additions & 29 deletions

File tree

components/Banner.jsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import React from "react";
2-
import styles from "../styles/Banner.module.css";
32

43
const Banner = () => {
54
return (
65
<div>
7-
<div className={styles.module}>
8-
<h2 className={styles.stripe}></h2>
9-
<h1 className={styles.text}>UNDER CONSTRUCTION</h1>
6+
<div className="banner">
7+
<div className="stripe"></div>
8+
<div className="text">UNDER CONSTRUCTION</div>
109
</div>
1110
</div>
1211
);
1312
};
14-
1513
export default Banner;

pages/_app.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import Navbar from "../components/Navbar.jsx";
22
import "../styles/globals.css";
3+
import Banner from "../components/Banner.jsx";
34

45
function MyApp({ Component, pageProps }) {
56
return (
67
<>
8+
<Banner />
79
<Navbar />
810
<Component {...pageProps} />
911
</>

pages/index.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import Head from "next/head";
22
import Banner from "../components/Banner";
33
import Image from "next/image";
4-
// import styles from '../styles/Home.module.css'
54
import logo from "../public/reactdevske.svg";
65

76
export default function Home() {
87
return (
98
<div className="">
10-
119
<Head>
12-
<Banner />
1310
<title>React Devs Kenya</title>
1411
<meta
1512
name="description"

styles/Banner.module.css

Lines changed: 0 additions & 20 deletions
This file was deleted.

styles/globals.css

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body {
99
margin: 0;
1010
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
1111
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
12-
background-color: #333333;
12+
background-color: #333333;
1313
}
1414

1515
a {
@@ -20,3 +20,28 @@ a {
2020
* {
2121
box-sizing: border-box;
2222
}
23+
24+
/* styles for top under construction banner start here*/
25+
26+
.banner {
27+
background: white;
28+
}
29+
30+
.banner>div {
31+
padding: 1rem;
32+
}
33+
34+
.stripe {
35+
background: repeating-linear-gradient(-55deg, #222, rgb(34, 34, 34) 10px, rgb(229, 194, 0) 10px, rgb(229, 194, 0) 20px);
36+
}
37+
38+
.text {
39+
font-family: Verdana, Geneva, Tahoma, sans-serif;
40+
text-align: center;
41+
font-weight: bolder;
42+
color: #222;
43+
font-size: clamp(1rem, 1vw, 2rem);
44+
background-color: rgb(229, 194, 0);
45+
}
46+
47+
/* styles for top under construction banner end here*/

0 commit comments

Comments
 (0)