Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added alterbox #385

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions periodo/components/alertbox/alertbox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React, { Component } from 'react';
import styles from './alertbox.module.css';

class AlertBox extends Component {
constructor(props) {
super(props);

this.state = {
hidden: false,
};
}
render() {
return (
<div>
{this.state.hidden ? (
' '
) : (
<div
className={styles.myalert}
>
<p>
<strong>Great Landing !</strong> Login to have a better experience.
</p>
{
(this.timer = setInterval(() => {
this.setState({ hidden: true });
}, 10000))
}
</div>
)}
</div>
);
}
}

export default AlertBox;
76 changes: 76 additions & 0 deletions periodo/components/alertbox/alertbox.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
.myalert {
color: #1f1e1e;
background-color: #e2929e;
border-color: #ffd7d6;
background-image: -webkit-linear-gradient(
135deg,
transparent,
transparent 25%,
hsla(0, 0%, 0%, 0.05) 25%,
hsla(0, 0%, 0%, 0.05) 50%,
transparent 50%,
transparent 75%,
hsla(0, 0%, 0%, 0.05) 75%,
hsla(0, 0%, 0%, 0.05)
);
background-image: -moz-linear-gradient(
135deg,
transparent,
transparent 25%,
hsla(0, 0%, 0%, 0.1) 25%,
hsla(0, 0%, 0%, 0.1) 50%,
transparent 50%,
transparent 75%,
hsla(0, 0%, 0%, 0.1) 75%,
hsla(0, 0%, 0%, 0.1)
);
background-image: -ms-linear-gradient(
135deg,
transparent,
transparent 25%,
hsla(0, 0%, 0%, 0.1) 25%,
hsla(0, 0%, 0%, 0.1) 50%,
transparent 50%,
transparent 75%,
hsla(0, 0%, 0%, 0.1) 75%,
hsla(0, 0%, 0%, 0.1)
);
background-image: -o-linear-gradient(
135deg,
transparent,
transparent 25%,
hsla(0, 0%, 0%, 0.1) 25%,
hsla(0, 0%, 0%, 0.1) 50%,
transparent 50%,
transparent 75%,
hsla(0, 0%, 0%, 0.1) 75%,
hsla(0, 0%, 0%, 0.1)
);
background-image: linear-gradient(
135deg,
transparent,
transparent 25%,
hsla(0, 0%, 0%, 0.1) 25%,
hsla(0, 0%, 0%, 0.1) 50%,
transparent 50%,
transparent 75%,
hsla(0, 0%, 0%, 0.1) 75%,
hsla(0, 0%, 0%, 0.1)
);
background-size: 20px 20px;
box-shadow: 0 5px 0 hsla(0, 0%, 0%, 0.1);
display: block;
font: bold 16px/40px sans-serif;
height: 70px;
position: absolute;
text-align: center;
text-decoration: none;
top: 63px;
width: 100%;
animation-delay: 100s;
-webkit-animation: alert 1s ease forwards;
-moz-animation: alert 1s ease forwards;
-ms-animation: alert 1s ease forwards;
-o-animation: alert 1s ease forwards;
animation: alert 1s ease forwards;
}
2 changes: 1 addition & 1 deletion periodo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"sharp": "^0.27.2",
"style-loader": "^2.0.0",
"styled-components": "^5.2.1",
"victory": "^35.8.2",
"victory": "35.8.2",
"webpack": "^5.27.2"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions periodo/pages/homepage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import Navbar from "../components/navbar.js";
import AlertBox from "../components/alertbox/alertbox";
import Start from "../components/started.js";
import Layout from "../components/Layout";
import Footer from "../components/Footer/Footer.js";
Expand All @@ -17,6 +18,7 @@ const Homepage = () => {
return (
<>
<Navbar />
<AlertBox />
<div className={styles.socialIcons}>
<a data-testid="github" href="https://github.com/Feminine-Divine/periodo"><GitHubIcon className={styles.icons} /></a>
<a data-testid="mail" href="mailto:[email protected]"><MailIcon className={styles.icons} /></a>
Expand Down
Loading