-
Notifications
You must be signed in to change notification settings - Fork 0
/
welcome.html
121 lines (118 loc) · 3.65 KB
/
welcome.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PathLay - Welcome Page</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style>
body, html {
width:100%;
height: 100%;
margin: 0;
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.header {
width: 100%;
background-color: #006699;
color: white;
text-align: center;
padding: 20px 0;
top: 0;
z-index: 1000;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
width: 100%;
position: relative;
margin-top:10%;
}
.icons {
display: flex;
justify-content: space-around;
width: 60%;
}
.icon {
width: 20vw;
height: 20vh;
margin: 20px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
text-decoration: none;
color: #006699;
transition: color 0.3s, background-color 0.3s;
}
.icon i.material-icons {
font-size: 60px;
transition: color 0.3s;
}
.icon span {
margin-top: 10px;
font-size: 16px;
transition: color 0.3s;
}
.icon:hover {
color: white;
background-color: #006699;
border-radius: 10px;
}
.icon:hover i.material-icons,
.icon:hover span {
color: white;
}
</style>
<script>
function getQueryParam(param) {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get(param);
}
function redirect(dest) {
const baseUrl = `${window.location.protocol}//${window.location.host}${window.location.pathname}`;
let script =
dest === "home" ? 'pathlayHome.pl' :
dest === "access" ? 'pathlayAccess.pl' :
dest === "dbconf" ? 'pathlayDBConf.pl' :
undefined;
if (!script) {
alert("This is accessible only from the host machine, please login from there to configure PathLay's databases");
return;
}
let sid = getQueryParam("sid");
let newUrl = `${baseUrl.replace('welcome.pl', script)}?sid=${sid}`;
newUrl += dest === 'home' || dest === 'access' ? '&mode=list' : '';
window.location.href = newUrl;
}
</script>
</head>
<body>
<div class="header">
<h1>Welcome - _USER</h1>
</div>
<div class="container">
<div class="icons">
<a onClick='redirect("home")' class="icon">
<i class="material-icons">home</i>
<span>Home</span>
</a>
<a onClick='redirect("access")' class="icon">
<i class="material-icons">analytics</i>
<span>Analysis Configurator</span>
</a>
<a onClick='redirect("dbconf")' class="icon">
<i class="material-icons">settings</i>
<span>Settings</span>
</a>
</div>
</div>
</body>
</html>