Skip to content

Commit 13d3552

Browse files
committed
mac demo ready
1 parent 22d89e3 commit 13d3552

File tree

4 files changed

+46
-2
lines changed

4 files changed

+46
-2
lines changed

demo/apple.png

18 KB
Loading

demo/bottom.png

34.8 KB
Loading

demo/clock.png

25 KB
Loading

demo/index.html

+46-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
a {
4040
color: black;
4141
}
42-
.taskbar {
42+
.win-taskbar {
4343
position: fixed;
4444
height: 40px;
4545
background: #002d4f;
@@ -48,6 +48,22 @@
4848
width: 100vw;
4949
left: 0;
5050
}
51+
.mac-dock {
52+
position: fixed;
53+
height: 40px;
54+
background: white;
55+
left: calc(50vw - 125px);
56+
bottom: 0;
57+
}
58+
.mac-tray {
59+
position: fixed;
60+
height: 20px;
61+
width: 100vw;
62+
background: #e8eff5;
63+
border-bottom: 1px solid #8898a6;
64+
top: 0;
65+
box-shadow: 0 0 5 rgba(0, 0, 0, 0.3);
66+
}
5167
.fake {
5268
position: absolute;
5369
bottom: 0;
@@ -96,6 +112,11 @@
96112

97113
<body>
98114

115+
<div id="mac2" class="mac-tray">
116+
<img src="apple.png" class="fake" style="left: 0; height: 20px;">
117+
<img src="clock.png" class="fake" style="right: 0">
118+
</div>
119+
99120
<div class="about">
100121
<span classe="heading">Online Demo</span>
101122
<span class="description">Feature-limited online demo of app. Please
@@ -114,11 +135,34 @@
114135

115136
</div>
116137

117-
<div class="taskbar">
138+
<div id="windows" class="win-taskbar">
118139
<img src="left.png" class="fake" style="left: 0">
119140
<img src="right.png" class="fake" style="right: 0">
120141
</div>
121142

143+
<div id="mac" class="mac-dock" style="border-top-left-radius: 5px; border-top-right-radius: 5px; background: #5a6a61">
144+
<img src="bottom.png" class="fake" style="border-top-left-radius: 5px; border-top-right-radius: 5px">
145+
</div>
146+
122147
</body>
123148

149+
<script>
150+
151+
var OSName = "Unknown OS";
152+
if (navigator.appVersion.indexOf("Win") != -1) OSName = "Windows";
153+
if (navigator.appVersion.indexOf("Mac") != -1) OSName = "MacOS";
154+
console.log('Your OS: ' + OSName);
155+
156+
if (OSName === "Windows") {
157+
const el = document.getElementById('mac');
158+
el.style = "display: none";
159+
const el2 = document.getElementById('mac2');
160+
el2.style = "display: none";
161+
} else if (OSName ==="MacOS") {
162+
const el3 = document.getElementById('windows');
163+
el3.style = "display: none";
164+
}
165+
166+
</script>
167+
124168
</html>

0 commit comments

Comments
 (0)