blob: adbbbe7b374d4cf51d7b9d3b9d0eb4b81c41f283 [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() {
pineafanaa9c4fd2022-06-10 19:58:10 +010017 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 }
pineafan46270162022-02-13 12:06:17 +000024
25 render() {
26 if ( this.props.clickable === false) {
pineafanaa9c4fd2022-06-10 19:58:10 +010027 return <div style={{
pineafan46270162022-02-13 12:06:17 +000028 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>
pineafanaa9c4fd2022-06-10 19:58:10 +010033 } else {
34 return <Popover
pineafan46270162022-02-13 12:06:17 +000035 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>
pineafanaa9c4fd2022-06-10 19:58:10 +010046 }
pineafan46270162022-02-13 12:06:17 +000047 }
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={[]}
91 />
pineafan46270162022-02-13 12:06:17 +000092 <AutoLayout>
93 <Panel halfSize={false}>
94 <Title>Supporters</Title>
95 <Text>People and packages who have helped and are helping Clicks</Text>
96 {
97 groups.map((group, index) => {
98 return (
99 <div key={index} style={{width: "100%"}}>
100 <Marquee
101 gradient={false}
102 style={{width: "100%", height: "30px"}}
103 speed={Math.floor(Math.random() * (40) + 20)}
104 direction={"right"}
105 >
106 {
107 Object.keys(groups[index]).map((supporter, index2) => {
108 return (
109 <Supporter key={index} sub={groups[index][supporter]}>{supporter}</Supporter>
110 )
111 })
112 }
113 </Marquee>
114 </div>
115 )
116 })
117 }
pineafan1de98762022-02-13 13:35:30 +0000118 <Image src="/heart.svg" width={100} height={100} alt="<3"/>
pineafan46270162022-02-13 12:06:17 +0000119 </Panel>
120 </AutoLayout>
pineafan15b813d2022-02-13 10:06:09 +0000121 </>
122 )
123}