Skip to content

Commit

Permalink
use centralised assets
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIPv4 committed Dec 1, 2018
1 parent 48a2e60 commit 17bfa60
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
<img src="https://raw.githubusercontent.com/rgshw/exams/master/rgshw.png" alt="RGSHW Icon" align="right" width="150"/>
<img src="https://raw.githubusercontent.com/rgshw/rgshw.github.io/master/rgshw-square.png" alt="RGSHW Icon" align="right" width="150"/>

# exams

Expand Down
4 changes: 3 additions & 1 deletion index.html
Expand Up @@ -20,7 +20,7 @@
<head>
<meta charset="UTF-8">
<title>RGSHW Examination Clock</title>
<link rel="shortcut icon" href="rgshw.png"/>
<link rel="shortcut icon" href="https://rgshw.github.io/rgshw.png"/>

<link rel="stylesheet prefetch" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"/>
<link rel="stylesheet" href="style.min.css"/>
Expand Down Expand Up @@ -55,6 +55,8 @@ <h3>Examination Clock</h3>
<div class="center"></div>
</section>

<script src="https://rgshw.github.io/chromeCheck.min.js"></script>
<script src="https://rgshw.github.io/fullScreen.min.js"></script>
<script src="script.min.js"></script>
</body>
</html>
Binary file removed rgshw.png
Binary file not shown.
16 changes: 5 additions & 11 deletions script.js
Expand Up @@ -17,12 +17,6 @@
**/
/* https://jscompress.com/ */

// Check Chrome
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
if (!isChrome) {
alert('Please be aware this site only officially supports Chrome on Desktop.\nFor best performance and reliability please use this site via Chrome.');
}

// Generate clock face
var clock = document.querySelector(".clock");

Expand All @@ -37,16 +31,16 @@ for (var i = 0; i < 30; i++) {
span.className = "fives";
}

span.style.transform = "translate(-50%,-50%) rotate(" + (i*6).toString() + "deg)";
span.style.transform = "translate(-50%,-50%) rotate(" + (i * 6).toString() + "deg)";
clock.appendChild(span);
}

for (var i = 2; i < 13; i++) {
var li = document.querySelector("section.clock ul li:nth-child("+i.toString()+")");
var lii = document.querySelector("section.clock ul li:nth-child("+i.toString()+") i");
var li = document.querySelector("section.clock ul li:nth-child(" + i.toString() + ")");
var lii = document.querySelector("section.clock ul li:nth-child(" + i.toString() + ") i");

li.style.transform = "rotate("+(30*(i-1)).toString()+"deg)";
lii.style.transform = "translateX(-50%) rotate(-"+(30*(i-1)).toString()+"deg)";
li.style.transform = "rotate(" + (30 * (i - 1)).toString() + "deg)";
lii.style.transform = "translateX(-50%) rotate(-" + (30 * (i - 1)).toString() + "deg)";
}

// Set the clock position
Expand Down
2 changes: 1 addition & 1 deletion script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 17bfa60

Please sign in to comment.