blob: 1220e60f2d2483ede2a4aebb09c46019d61be2a1 [file] [log] [blame]
pineafan15b813d2022-02-13 10:06:09 +00001import Header from '../Components/Header'
pineafan46270162022-02-13 12:06:17 +00002import Marquee from 'react-fast-marquee'
3import { AutoLayout, Panel, Title, Subtitle, Text, Divider } from '../Components/Panels';
4import { Component } from 'react';
5import Image from 'next/image';
6import { Popover } from 'react-tiny-popover';
7
8class Supporter extends Component {
9 constructor(props) {
10 super(props);
11 this.state = {
12 isPopoverOpen: false,
13 };
14 }
15
16 clicked() {
17 let content = this.props.children
18 navigator.clipboard.writeText(content)
19 this.setState({isPopoverOpen: true})
20 setTimeout(() => {
21 this.setState({isPopoverOpen: false})
22 }, 2500)
23 }
24
25 render() {
26 if ( this.props.clickable === false) {
27 return <div style={{
28 display: 'flex', flexDirection: 'column', alignItems: 'center',
29 justifyContent: 'center', backgroundColor: '#6576CC', color: '#FFFFFF',
30 paddingInline: '20px', paddingBlock: '0.25rem',
31 borderRadius: '10px', boxShadow: '0px -3px 10px 2px #424242'
32 }}>{this.props.children}</div>
33 } else {
34 return <Popover
35 isOpen={this.state.isPopoverOpen}
36 positions={['top', 'bottom', 'left', 'right']} // preferred positions by priority
37 content={<Supporter colour={this.props.colour} clickable={false}>{this.props.sub}</Supporter>}
38 >
39 <div onClick={() => this.clicked()} style={{
40 display: 'flex', flexDirection: 'column', alignItems: 'center',
41 justifyContent: 'center', backgroundColor: '#6576CC', color: '#FFFFFF',
42 paddingInline: '20px', paddingBlock: '0.25rem', marginInline: '5px',
43 borderRadius: '10px'
44 }}>{this.props.children}</div>
45 </Popover>
46 }
47 }
48}
49
50
pineafan15b813d2022-02-13 10:06:09 +000051
52export default function Home() {
pineafan46270162022-02-13 12:06:17 +000053 const groups = [
54 { // Devs and testers
55 "TheCodedProf": "Programmer",
56 "Minion3665": "Programmer",
57 "PineappleFan": "Programmer",
58 "Eek": "Programmer",
59 "Dilythion": "Programmer",
60 "Tani": "Programmer",
61 "CocoboloDesk": "Legal",
62 "GenElectrovise": "Plugins"
63 },
64 { // Packages
65 "react-tiny-popover": "React popovers",
66 "react-in-viewport": "Scroll in effects",
67 "hcaptcha": "RSM Verify captchas",
68 "react-fast-marquee": "These scrolling sections",
69 "theme-ui": "Checked out the opposite theme?",
70 "Nextjs": "It's all built in Next"
71 },
72 { // Programs
73 "Figma": "Designing - Thanks for staying free <3",
74 "Discord": "Chatting",
75 "Flaticon": "Icons"
76 },
77 { // Special thanks
78 "InternetMetro": "Minecraft server building",
79 "RetroEvelyne": "Minecraft server command blocks",
80 "Eddy": "Minecraft server building",
81 }
82 ]
pineafan15b813d2022-02-13 10:06:09 +000083 return (
84 <>
85 <Header
86 name="Supporters"
87 subtext="The people who help Clicks function"
88 gradient={["71AFE5", "6576CC"]}
89 wave="web/waves/header/clicksforms"
90 buttons={[]}
pineafan46270162022-02-13 12:06:17 +000091 hideArrow={true}
pineafan15b813d2022-02-13 10:06:09 +000092 />
pineafan46270162022-02-13 12:06:17 +000093 <AutoLayout>
94 <Panel halfSize={false}>
95 <Title>Supporters</Title>
96 <Text>People and packages who have helped and are helping Clicks</Text>
97 {
98 groups.map((group, index) => {
99 return (
100 <div key={index} style={{width: "100%"}}>
101 <Marquee
102 gradient={false}
103 style={{width: "100%", height: "30px"}}
104 speed={Math.floor(Math.random() * (40) + 20)}
105 direction={"right"}
106 >
107 {
108 Object.keys(groups[index]).map((supporter, index2) => {
109 return (
110 <Supporter key={index} sub={groups[index][supporter]}>{supporter}</Supporter>
111 )
112 })
113 }
114 </Marquee>
115 </div>
116 )
117 })
118 }
119 <Image src="/heart.svg" width={100} height={100} />
120 </Panel>
121 </AutoLayout>
pineafan15b813d2022-02-13 10:06:09 +0000122 </>
123 )
124}