| import { Component } from "react"; |
| import Styles from '../styles/header.module.css'; |
| import Head from 'next/head'; |
| |
| class Header extends Component { |
| constructor(props) { |
| super(props); |
| this.keys = [] |
| } |
| |
| render() { |
| return ( |
| <div className={Styles.header} style={{ |
| margin: "0" |
| }} id={this.props.id ? this.props.id : null}> |
| <div className={Styles.backgroundGradient} style={{ |
| backgroundImage: `linear-gradient(69.44deg, #${this.props.gradient[0]} 0%, #${this.props.gradient[1]} 100%)`, |
| }} /> |
| <Head> |
| <title>{this.props.nameOverwrite ? this.props.nameOverwrite : this.props.name} - Clicks Minute Per</title> |
| <meta name="title" content={this.props.name} /> |
| <meta name="og:title" content={this.props.name} /> |
| <meta name="description" content={this.props.subtext} /> |
| <meta name="og:description" content={this.props.subtext} /> |
| <meta name="theme-color" content={"#" + this.props.gradient[1]} /> |
| <meta name="og:theme-color" content={"#" + this.props.gradient[1]} /> |
| <meta name="author" content="Clicks Minute Per" /> |
| <meta name="og:author" content="Clicks Minute Per" /> |
| </Head> |
| <img draggable={false} alt="" className={Styles.backgroundImage} src={`https://assets.clicksminuteper.net/${this.props.wave}.svg`} /> |
| <div className={Styles.panel}> |
| <div className={Styles.titleContainer}> |
| <h1 className={Styles.title}>{this.props.name}</h1> |
| </div> |
| <p className={Styles.subtext + " " + (this.props.buttons.length ? Styles.subtextExtra : null)}>{this.props.subtext}</p> |
| <div className={Styles.buttonLayout}> |
| { |
| this.props.buttons ? this.props.buttons.map((button, index) => { |
| return <a |
| key={index} |
| className={Styles.button} |
| style={{ backgroundColor: `#${button.color}`, color: `#${button.buttonText}` }} |
| href={button.link} |
| target={button.target ? "_blank" : null} |
| rel="noreferrer"> |
| {button.text} |
| </a> |
| }) : null |
| } |
| </div> |
| </div> |
| <span className={Styles.arrowSpan + " " + (this.props.hideArrow ? Styles.arrowHidden : null)} draggable={false}> |
| <a href="#start" draggable={false}><img alt="Down arrow" src="https://assets.clicksminuteper.net/web/icons/arrow.svg" className={Styles.arrow} draggable={false} style={{ |
| height: "49px", width: "87px" |
| }}/></a> |
| </span> |
| </div> |
| ) |
| } |
| } |
| |
| export default Header; |