|
1 |
| -<!doctype html><html><head> |
| 1 | +<!doctype html> |
| 2 | +<html> |
| 3 | + <head> |
2 | 4 | <meta charset="utf-8"/>
|
3 |
| - <link rel="stylesheet" href="/common/css/bootstrap.min.css"> |
4 | 5 | <link rel="stylesheet" href="/common/css/solid.css">
|
5 |
| - <script> |
6 |
| - var keyname = 'SolidServerRootRedirectLink'; |
7 |
| - function register(){ alert(2); window.location.href="/register"; } |
8 |
| - document.addEventListener('DOMContentLoaded', async function() { |
9 |
| - if (!UI.authn.currentUser()) await UI.authn.checkUser(); |
10 |
| - let user = UI.authn.currentUser(); |
11 |
| - |
12 |
| -// IF LOGGED IN: SET COOKIE. LOGOUT |
13 |
| -// |
14 |
| - if( user ) { |
15 |
| - window.localStorage.setItem(keyname,user.uri); |
16 |
| - await UI.authn.authSession.logout(); |
17 |
| - } |
18 |
| - else { |
19 |
| - let webId = window.localStorage.getItem(keyname); |
20 |
| - |
21 |
| -// IF NOT LOGGED IN AND COOKIE EXISTS: REMOVE COOKIE, HIDE WELCOME, SHOW LINK TO PROFILE |
22 |
| -// |
23 |
| - if( webId ) { |
24 |
| - window.localStorage.removeItem(keyname); |
25 |
| - document.getElementById('prototype').style.display = "none"; |
26 |
| - document.getElementById('loggedIn').style.display = "block"; |
27 |
| - document.getElementById('loggedIn').innerHTML = `<p>Your WebID and profile address are</p> <p> <${webId}>.</p><a href="${webId}">Visit your profile to log in.</a></div>`; |
28 |
| - } |
29 |
| - |
30 |
| -// IF NOT LOGGED IN AND COOKIE DOES NOT EXIST |
31 |
| -// SHOW WELCOME, SHOW LOGIN BUTTON |
32 |
| -// HIDE LOGIN BUTTON, ADD REGISTER BUTTON |
33 |
| -// |
34 |
| - else { |
35 |
| - let loginArea = document.getElementById('loginStatusArea'); |
36 |
| - document.getElementById('prototype').style.display = "block"; |
37 |
| - let html = `<input type="button" onclick="window.location.href='/register'" value="register" style="padding: 1em; border-radius:0.5em; font-size: 100%;background-color: #efe;">` |
38 |
| - let span = document.createElement("SPAN") |
39 |
| - span.innerHTML=html |
40 |
| - loginArea.appendChild(span); |
41 |
| - loginArea.appendChild(UI.authn.loginStatusBox(document, null, {})) |
42 |
| - const signUpButton = loginArea.querySelectorAll('input')[2]; |
43 |
| - signUpButton.style.display="none"; |
44 |
| - } |
45 |
| - } |
46 |
| - }) |
47 |
| - </script> |
48 |
| - <link href="/mash.css" rel="stylesheet"> |
49 |
| -</head><body class="db-layout"> |
50 |
| - |
51 |
| -<h3 style="padding:2em; border:8px solid #7C4DFF; display:none" id="loggedIn" class="container"></h3> |
52 |
| - |
53 |
| -<div id="prototype" class="container"> |
54 |
| - |
55 |
| - <div class="page-header" style="display: inline-flex;"> |
56 |
| - <h1>Welcome to the Solid Prototype</h1> |
57 |
| - <div id="loginStatusArea" class="pull-right" style="display: inline-flex;float: right;margin: 10px;"></div> |
58 |
| - |
59 |
| - </div> |
60 |
| - |
61 |
| - <p class="lead"> |
62 |
| - This is a prototype implementation of a Solid server. |
63 |
| - |
64 |
| - It is a fully functional server, but there are no security or stability guarantees. |
65 |
| - |
66 |
| - If you have not already done so, please create an account. |
67 |
| - </p> |
68 |
| - |
69 |
| - <section> |
70 |
| - {{#if serverLogo}} |
71 |
| - <img src="{{serverLogo}}" /> |
72 |
| - {{/if}} |
73 |
| - <h2>Server info</h2> |
74 |
| - <dl> |
75 |
| - <dt>Name</dt> |
76 |
| - <dd>{{serverName}}</dd> |
77 |
| - {{#if serverDescription}} |
78 |
| - <dt>Description</dt> |
79 |
| - <dd>{{serverDescription}}</dd> |
| 6 | + </head> |
| 7 | +<body class="index-page"> |
| 8 | + <div class="header"> |
| 9 | + <div class="header-left"> |
| 10 | + {{#if serverLogo}} |
| 11 | + <img class="logo-img" src="{{serverLogo}}" /> |
80 | 12 | {{/if}}
|
81 |
| - <dt>Details</dt> |
82 |
| - <dd>Running on <a href="https://github.com/solid/node-solid-server/releases/tag/v{{serverVersion}}">Solid {{serverVersion}}</a></dd> |
83 |
| - </dl> |
84 |
| - </section> |
85 |
| -</div> |
86 |
| - <header class="db-layout__header header" id="PageHeader"></header> |
87 |
| - <div class="TabulatorOutline db-layout__content" id="DummyUUID" role="main"> |
88 |
| - <table id="outline"></table> |
89 |
| - <div id="GlobalDashboard"></div> |
90 |
| - </div><footer class="db-layout__footer" id="PageFooter"></footer> |
91 |
| - <style> |
92 |
| - #prototype { |
93 |
| - margin : 2em; |
94 |
| - padding : 1em; |
95 |
| - } |
96 |
| - #prototype input { |
97 |
| - margin : 1em; |
98 |
| - padding : 0.5em !important; |
99 |
| - } |
100 |
| - #loginStatusArea { |
101 |
| - float:right; |
102 |
| - clear:right; |
103 |
| - margin-top:-5em; |
104 |
| - } |
105 |
| - </style> |
| 13 | + </div> |
| 14 | + <div class="header-center"> |
| 15 | + <h1 class="title">Welcome to Solid prototype</h1> |
| 16 | + </div> |
| 17 | + <div class="header-right" id="loginStatusArea"></div> |
| 18 | + </div> |
| 19 | + |
| 20 | + <div class="container" id="prototype"> |
| 21 | + |
| 22 | + <h3 style="display:none" id="loggedIn" class="webId"></h3> |
| 23 | + |
| 24 | + <div class="content"> |
| 25 | + |
| 26 | + <p class="lead"> |
| 27 | + This is a prototype implementation of a Solid server. |
| 28 | + It is a fully functional server, but there are no security or stability guarantees. |
| 29 | + If you have not already done so, please register. |
| 30 | + </p> |
| 31 | + |
| 32 | + <section> |
| 33 | + <h2>Server info</h2> |
| 34 | + <dl> |
| 35 | + <dt>Name</dt> |
| 36 | + <dd>{{serverName}}</dd> |
| 37 | + {{#if serverDescription}} |
| 38 | + <dt>Description</dt> |
| 39 | + <dd>{{serverDescription}}</dd> |
| 40 | + {{/if}} |
| 41 | + <dt>Details</dt> |
| 42 | + <dd>Running on <a href="https://github.com/solid/node-solid-server/releases/tag/v{{serverVersion}}">Node Solid Server {{serverVersion}}</a></dd> |
| 43 | + </dl> |
| 44 | + </section> |
| 45 | + |
| 46 | + </div> <!-- end content--> |
| 47 | + |
| 48 | + </div> <!-- end container--> |
106 | 49 |
|
107 | 50 | <script src="/mashlib.js"></script>
|
108 |
| -</body></html> |
| 51 | + <script src="/common/js/index-buttons.js"></script> |
| 52 | + |
| 53 | +</body> |
| 54 | +</html> |
0 commit comments