|
39 | 39 | a {
|
40 | 40 | color: black;
|
41 | 41 | }
|
42 |
| - .taskbar { |
| 42 | + .win-taskbar { |
43 | 43 | position: fixed;
|
44 | 44 | height: 40px;
|
45 | 45 | background: #002d4f;
|
|
48 | 48 | width: 100vw;
|
49 | 49 | left: 0;
|
50 | 50 | }
|
| 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 | + } |
51 | 67 | .fake {
|
52 | 68 | position: absolute;
|
53 | 69 | bottom: 0;
|
|
96 | 112 |
|
97 | 113 | <body>
|
98 | 114 |
|
| 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 | + |
99 | 120 | <div class="about">
|
100 | 121 | <span classe="heading">Online Demo</span>
|
101 | 122 | <span class="description">Feature-limited online demo of app. Please
|
|
114 | 135 |
|
115 | 136 | </div>
|
116 | 137 |
|
117 |
| - <div class="taskbar"> |
| 138 | + <div id="windows" class="win-taskbar"> |
118 | 139 | <img src="left.png" class="fake" style="left: 0">
|
119 | 140 | <img src="right.png" class="fake" style="right: 0">
|
120 | 141 | </div>
|
121 | 142 |
|
| 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 | + |
122 | 147 | </body>
|
123 | 148 |
|
| 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 | + |
124 | 168 | </html>
|
0 commit comments