-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
93 lines (80 loc) · 3.19 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1d" />
<title>NEKO Code Editor</title>
<meta name="description" content="Online JavaScript Compiler" />
<!-- <link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min."
/> -->
<link rel="stylesheet" href="./src/styles/style.css" />
<link rel="icon" type="image/x-icon" href="./img/favicon.png" />
<link rel="manifest" href="./manifest.json" />
</head>
<body>
<!-- <div class="editor-menu">
<img id="logo" src="./img/favicon.png" />
<button class="btn btn-ls">Login/Signup</button>
<button style="display: none" class="btn btn-db">Dashboard</button> -->
<!-- <button class="btn btn-soo">Offline</button> -->
<!-- </div>
<div class="container">
<h1 id="slogan">The free code editor for you.</h1>
</div> -->
<p>loading editor...</p>
<script>
// if (window.localStorage.getItem('offline') === 'true') {
// document.querySelector('.btn-soo').innerHTML = 'Online';
// }
// document.querySelector('.btn-soo').onclick = function () {
// if (window.localStorage.getItem('offline') !== 'true') {
// window.localStorage.setItem('offline', 'true');
// setCookie('li', '');
// document.querySelector('.btn-soo').innerHTML = 'Online';
// window.location.reload();
// } else {
// window.localStorage.setItem('offline', 'false');
// document.querySelector('.btn-soo').innerHTML = 'Offline';
// window.location.reload();
// }
// };
window.localStorage.setItem('offline', 'true');
window.location.replace("./src/views/dashboard.html");
// document.querySelector('.btn-ls').onclick = function () {
// window.location.href = './src/views/login.html';
// };
// document.querySelector('.btn-db').onclick = function () {
// window.location.href = './src/views/dashboard.html';
// };
// if (
// getCookie('li') !== '' ||
// (window.localStorage.getItem('li') !== null &&
// window.localStorage.getItem('li') !== '')
// ) {
// document.querySelector('.btn-ls').style.display = 'none';
// document.querySelector('.btn-db').style.display = 'block';
// }
// function getCookie(cname) {
// let name = cname + '=';
// let decodedCookie = decodeURIComponent(document.cookie);
// let ca = decodedCookie.split(';');
// for (let i = 0; i < ca.length; i++) {
// let c = ca[i];
// while (c.charAt(0) == ' ') {
// c = c.substring(1);
// }
// if (c.indexOf(name) == 0) {
// return c.substring(name.length, c.length);
// }
// }
// return '';
// }
// function setCookie(cname, cvalue, exdays) {
// const d = new Date();
// d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
// let expires = 'expires=' + d.toUTCString();
// document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/';
// }
</script>
</body>
</html>