Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
titaniumnetwork-dev
GitHub Repository: titaniumnetwork-dev/Ludicrous
Path: blob/main/pages/changelog/1.0.tsx
1223 views
1
import type { NextPage } from 'next'
2
import Head from 'next/head'
3
import { IoHomeOutline, IoSettingsOutline, IoChevronDown } from "react-icons/io5";
4
import styles from '../../styles/Log.module.css';
5
import Particles from "react-tsparticles";
6
import { loadFull } from "tsparticles";
7
import { useRouter } from 'next/router';
8
9
const Close: Function = () => {
10
if (global.window) {
11
if (global.window.opener) global.window.close();
12
global.window.history.go(-(global.window.history.length-1));
13
global.window.location.replace('https://www.google.com/webhp')
14
}
15
}
16
17
const upChevron: any = function() {
18
var el: any = document.getElementsByClassName(styles['down-chevron']);
19
20
if (el[0] && !el[0].style.transform) el[0].style.transform = 'rotate(180deg)'; else el[0].style.transform = '';
21
22
var e = document.getElementById(styles['main-page-content']);
23
24
if (el[0] && el[0].style.transform) {
25
if (e) e.scroll(0,1);
26
} else {
27
if (e) e.scroll(0, 0);
28
}
29
}
30
31
const scrollListener: any = (event: any) => {
32
var el: any = document.getElementsByClassName(styles['down-chevron']);
33
34
if (event.target.scrollTop) {event.target.style.height = '75%'} else event.target.style.height = '';
35
36
if (el[0] && event.target.scrollTop) el[0].style.transform = 'rotate(180deg)'; else el[0].style.transform = '';
37
38
if (event.target.style.height) {
39
var d = document.getElementById('apps-header');
40
if (d) d.classList.remove(styles['apps-hidden']);
41
} else {
42
var d = document.getElementById('apps-header');
43
if (d) d.classList.add(styles['apps-hidden']);
44
}
45
}
46
47
const aboutBlank: Function = (event: any) => {
48
if (global.window) {
49
var openWin: any = global.window.open('about:blank');
50
51
openWin.document.write('<head><title>Classes</title><link rel="icon" type="image/png" href="https://ssl.gstatic.com/classroom/favicon.png"><style>body {margin:0;overflow:hidden}</style></head><body><iframe width="100%" height="100%" src="' + global.window.location.href + '" frameborder="0"></iframe></body>');
52
openWin.document.close();
53
54
Close();
55
}
56
}
57
58
const Changelog: NextPage = () => {
59
const Router = useRouter();
60
61
const Home: any = () => {
62
if (global.window) {
63
Router.replace('/');
64
}
65
}
66
67
const Settings: any = () => {
68
if (global.window) {
69
Router.replace('/options')
70
}
71
}
72
73
const particlesInit: any = async (main: any) => {await loadFull(main)};
74
75
const particlesLoaded: any = (e: any) => {};
76
77
return (
78
<div className={styles.main}>
79
<Head>
80
<title>Ludicrous</title>
81
<meta name="description" content="Ludicrous | A School Site" />
82
<meta name="theme-color" content="#2467a5" />
83
<link rel="icon" href="/favicon.ico" />
84
</Head>
85
86
<main className={styles.main}>
87
<Particles
88
id="tsparticles"
89
init={particlesInit}
90
loaded={particlesLoaded}
91
options={{
92
fpsLimit: 120,
93
interactivity: {
94
events: {
95
resize: true,
96
},
97
},
98
particles: {
99
color: {
100
value: "#ffffff",
101
},
102
move: {
103
direction: "right",
104
enable: true,
105
outModes: {
106
default: "out",
107
},
108
random: false,
109
speed: 1,
110
straight: false,
111
},
112
number: {
113
density: {
114
enable: true,
115
area: 800,
116
},
117
value: 48,
118
},
119
opacity: {
120
value: 0.6814501258678471,
121
random: true,
122
anim: {
123
enable: true,
124
speed: 0.24362316369040352,
125
opacity_min: 0.03248308849205381,
126
sync: false
127
}
128
},
129
shape: {
130
type: "circle",
131
},
132
size: {
133
anim: {
134
enable: true,
135
speed: 2.872463273808071,
136
size_min: 2.436231636904035,
137
sync: false
138
},
139
value: { min: 2, max: 3 },
140
},
141
},
142
detectRetina: true,
143
}}
144
/>
145
<div id={styles['main-page-content']} onScroll={scrollListener}>
146
<div onClick={Home} className={styles["main-page-apps-init"]} id="apps-init"><IoHomeOutline /></div>
147
<div className={styles["main-page-about-init"]} id={"ab-cloak"} onClick={Settings}><IoSettingsOutline /></div>
148
<div id={styles['inside-content-scroller']}>
149
<h1 id={"apps-header"} className={styles['apps-hidden']} style={{transition: "0.25s ease"}}><span>v1.0</span> <IoChevronDown className={styles['down-chevron']} onClick={upChevron} /></h1>
150
151
<hr className={styles['type-sep']} />
152
153
<h2>Notes</h2>
154
155
<p>
156
157
</p>
158
</div>
159
</div>
160
</main>
161
</div>
162
);
163
};
164
165
export default Changelog
166
167