-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
53 lines (49 loc) · 2.72 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Decentralized Identity Platform</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Navbar -->
<div id="navbar"></div>
<script> //seperate navbar
fetch("/navbar.html")
.then(response => response.text())
.then(data => document.getElementById("navbar").innerHTML = data);
</script>
<div class="container">
<h1>Welcome to the Decentralized Identity Platform</h1>
<p>Decentralized identity platform (DIP) for secure storage and easy access to personal documents using IPFS,Filecoin & Web3Storage.js . </p>
<p>Our platform provides a secure and decentralized way to manage and store your personal documents and information. You can easily add, view and manage your documents using our user-friendly interface.</p>
<div id="statusDiv"></div>
</div>
</body>
<script>//auth check
if(localStorage.Username == undefined) {
console.log("not logged in")
let statusDiv=document.getElementById("statusDiv")
statusDiv.className="null";//no class
const instructions = '<h1 style="font-size: 2em; margin-bottom: 20px;">Getting Started</h1><ol>'+
'<li><h3>Create an account on <a href="https://web3.storage/login/" style="color: #4CAF50; text-decoration: none;">Web3.storage</a></h3></li>'+
'<li><h3>Create an API key using <a href="https://web3.storage/tokens/?create=true" style="color: #4CAF50; text-decoration: none;">this link</a></h3></li>'+
'<li><h3>Log in to the application by clicking the button below:</h3></li>'+
'<a href="./auth/auth.html" class="btn btn-primary" style="background-color: #19f4d0; font-family:monospace; color: white; padding: 10px 20px; font-weight:bold;text-decoration: none; font-size: 1.5em; border-radius: 5px;">Log In</a><br></ol>';
statusDiv.innerHTML = instructions;
}
else {
const loggedInMsg = '<h1>Thank you for logging in</h1>' +
'<h3>👉 Go to <a href="./add/Add.html">Add➕</a> tab to add a file to IPFS.</h3>' +
'<h3>👉 Go to <a href="./view/View.html">View👀</a> tab to get back file from IPFS.</h3>' +
'<h3>👉 Go to <a href="./info/info.html">Info🤔</a> tab to Get info.</h3>' +
'<h3>👉 Go to <a href="./logs/logs.html">Logs📃</a> tab to Get all logs.</h3>' +
'<h3>👉 Go to <a href="./auth/auth.html">Auth🔐</a> for Authorization</h3>';
statusDiv.innerHTML = loggedInMsg;
}
function login(){
window.location.replace("../auth/auth.html");
}
</script>
</html>