-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (67 loc) · 2.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
<!DOCTYPE html>
<html lang="sv">
<head>
<meta charset="UTF-8">
<title>Link to Portal Credentials</title>
<style>
body {
background-color: #A18771;
display: flex;
justify-content: center;
align-items: center;
height: 50vh; /* Adjusted the height to 50vh */
flex-direction: column;
position: relative;
}
button {
margin-top: 1em;
background-color: blue;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
font-size: 1em;
cursor: pointer;
}
h1 {
color: blue;
}
#version {
position: absolute;
top: 10px;
left: 10px;
}
</style>
</head>
<body>
<div id="version">Version 1.1</div>
<h1>Alecta Anbudsportal</h1>
<input type="password" id="passwordInput" placeholder="Enter password" onkeydown="checkEnter(event)">
<button id="loginBtn" onclick="checkPassword()">Log in</button>
<button id="linkBtn" style="display:none;" onclick="openLink()">Hämta inloggningsuppgifter</button>
<script>
function checkPassword() {
var password = document.getElementById('passwordInput').value;
var loginBtn = document.getElementById('loginBtn');
var passwordInput = document.getElementById('passwordInput');
var linkBtn = document.getElementById('linkBtn');
if (password === 'Anbud') {
loginBtn.style.display = 'none';
passwordInput.style.display = 'none';
linkBtn.style.display = 'block'; // Show the link button
} else {
alert('Incorrect password. Please try again.');
passwordInput.value = '';
}
}
function checkEnter(event) {
if (event.key === 'Enter') {
checkPassword();
}
}
function openLink() {
window.open('https://share.1password.com/s#C4DvAthJXVPokAkgoz1NslVougpcH-S8oifwfXSxWr4', '_blank');
}
</script>
</body>
</html>