-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpacman.html
More file actions
91 lines (82 loc) · 2.21 KB
/
pacman.html
File metadata and controls
91 lines (82 loc) · 2.21 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>pack man</title>
<link rel="stylesheet" href="https://unpkg.com/xp.css">
<style>
body {
background-image: url('./img/bliss-winxp.jpg');
background-size: cover;
background-position: center;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
font-family: "Tahoma", sans-serif;
}
.window {
display: flex;
flex-direction: column;
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
max-width: 90vw;
max-height: 90vh;
}
.window-body {
flex: 1;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#pacman-frame {
width: 80vw;
height: 60vh;
border: 2px solid black;
background: #000;
}
.xp-button {
background: #e0e0e0;
border: 1px solid #808080;
padding: 3px 10px;
cursor: pointer;
font-weight: bold;
margin: 10px 0;
}
.xp-button:active {
background: #c0c0c0;
border-top: 1px solid #404040;
border-left: 1px solid #404040;
}
</style>
</head>
<body>
<div class="window">
<div class="title-bar">
<div class="title-bar-text">pacman.exe</div>
<div class="title-bar-controls">
<button aria-label="Minimize"></button>
<button aria-label="Maximize"></button>
<button aria-label="Close" onclick="window.location.href='index.html'"></button>
</div>
</div>
<div class="window-body">
<iframe id="pacman-frame" src="" frameborder="0"></iframe>
<button class="xp-button" onclick="startPacman()">start (https://freepacman.org is NOT made by me)</button>
</div>
</div>
<script>
function startPacman() {
const frame = document.getElementById('pacman-frame')
frame.src = "https://freepacman.org/"
}
window.addEventListener('resize', () => {
const frame = document.getElementById('pacman-frame')
frame.style.width = Math.min(window.innerWidth * 0.8, 900) + 'px'
frame.style.height = Math.min(window.innerHeight * 0.6, 700) + 'px'
})
</script>
</body>
</html>