blob: 0f9bf0f48192ac3a031bb280cb59c5105a00e2ca [file] [log] [blame]
pineafana5ce9102021-09-02 17:21:31 +01001import { Component } from "react";
2import Styles from '../styles/header.module.css';
pineafan876af7d2021-10-14 20:31:21 +01003import Head from 'next/head';
pineafana5ce9102021-09-02 17:21:31 +01004
5class Header extends Component {
6 constructor(props) {
7 super(props);
Samuel Shuert604e31d2021-09-02 16:06:20 -05008 this.keys = []
pineafana5ce9102021-09-02 17:21:31 +01009 }
10
pineafana5ce9102021-09-02 17:21:31 +010011 render() {
12 return (
13 <div className={Styles.header} style={{
14 backgroundImage:`linear-gradient(69.44deg, #${this.props.gradient[0]} 0%, #${this.props.gradient[1]} 100%)`,
15 margin: "0"
16 }} id={this.props.id ? this.props.id : null}>
pineafan876af7d2021-10-14 20:31:21 +010017 <Head>
18 <title>{this.props.name} - Clicks Minute Per</title>
19 <meta name="description" content={this.props.subtext} />
20 <meta name="og:description" content={this.props.subtext} />
21 <meta name="theme-color" content={this.props.gradient[0]} />
22 <meta name="og:theme-color" content={this.props.gradient[0]} />
23 </Head>
pineafanaed30242021-09-04 09:33:40 +010024 <img alt="" className={Styles.backgroundImage} src={`/Headers/${this.props.wave}.svg`} />
pineafana5ce9102021-09-02 17:21:31 +010025 <div className={Styles.panel}>
26 <div className={Styles.titleContainer}>
27 <h1 className={Styles.title}>{this.props.name}</h1>
28 </div>
29 <p className={Styles.subtext + " " + (this.props.buttons.length ? Styles.subtextExtra : null)}>{this.props.subtext}</p>
30 <div className={Styles.buttonLayout}>
31 {
Samuel Shuert604e31d2021-09-02 16:06:20 -050032 this.props.buttons ? this.props.buttons.map((button, index) => {
pineafana5ce9102021-09-02 17:21:31 +010033 return <a
Samuel Shuert604e31d2021-09-02 16:06:20 -050034 key={index}
pineafana5ce9102021-09-02 17:21:31 +010035 className={Styles.button}
36 style={{backgroundColor:`#${button.color}`, color:`#${button.buttonText}`}}
Samuel Shuert835c71f2021-09-03 15:49:26 -050037 href={button.link}
pineafanaed30242021-09-04 09:33:40 +010038 target={button.target ? "_blank" : null}
39 rel="noreferror">
Samuel Shuert835c71f2021-09-03 15:49:26 -050040 {button.text}
pineafana5ce9102021-09-02 17:21:31 +010041 </a>
42 }) : null
43 }
44 </div>
45 </div>
46 <span className={Styles.arrowSpan + " " + (this.props.hideArrow ? Styles.arrowHidden : null)}>
pineafanaed30242021-09-04 09:33:40 +010047 <a href="#start"><img alt="Down arrow" src="/Arrow.svg" className={Styles.arrow} /></a>
pineafana5ce9102021-09-02 17:21:31 +010048 </span>
49 </div>
50 )
51 }
52}
53
54export default Header;