blob: 4a20a4b5ac1394f1bc93ac1ebecd00f2cf39cd0b [file] [log] [blame]
pineafana5ce9102021-09-02 17:21:31 +01001import { Component } from "react";
2import Styles from '../styles/header.module.css';
3
4class Header extends Component {
5 constructor(props) {
6 super(props);
Samuel Shuert604e31d2021-09-02 16:06:20 -05007 this.keys = []
pineafana5ce9102021-09-02 17:21:31 +01008 }
9
pineafana5ce9102021-09-02 17:21:31 +010010 render() {
11 return (
12 <div className={Styles.header} style={{
13 backgroundImage:`linear-gradient(69.44deg, #${this.props.gradient[0]} 0%, #${this.props.gradient[1]} 100%)`,
14 margin: "0"
15 }} id={this.props.id ? this.props.id : null}>
16 <img className={Styles.backgroundImage} src={`/Headers/${this.props.wave}.svg`} />
17 <div className={Styles.panel}>
18 <div className={Styles.titleContainer}>
19 <h1 className={Styles.title}>{this.props.name}</h1>
20 </div>
21 <p className={Styles.subtext + " " + (this.props.buttons.length ? Styles.subtextExtra : null)}>{this.props.subtext}</p>
22 <div className={Styles.buttonLayout}>
23 {
Samuel Shuert604e31d2021-09-02 16:06:20 -050024 this.props.buttons ? this.props.buttons.map((button, index) => {
pineafana5ce9102021-09-02 17:21:31 +010025 return <a
Samuel Shuert604e31d2021-09-02 16:06:20 -050026 key={index}
pineafana5ce9102021-09-02 17:21:31 +010027 className={Styles.button}
28 style={{backgroundColor:`#${button.color}`, color:`#${button.buttonText}`}}
Samuel Shuert835c71f2021-09-03 15:49:26 -050029 href={button.link}
30 target={button.target ? "_blank" : null}>
31 {button.text}
pineafana5ce9102021-09-02 17:21:31 +010032 </a>
33 }) : null
34 }
35 </div>
36 </div>
37 <span className={Styles.arrowSpan + " " + (this.props.hideArrow ? Styles.arrowHidden : null)}>
Samuel Shuert604e31d2021-09-02 16:06:20 -050038 <a href="#start"><img src="/Arrow.svg" className={Styles.arrow} /></a>
pineafana5ce9102021-09-02 17:21:31 +010039 </span>
40 </div>
41 )
42 }
43}
44
45export default Header;