1
0
mirror of https://github.com/danbee/cv synced 2025-03-04 08:59:12 +00:00
cv/source/js/script.js.coffee
Dan Barber 861d947fe3 Move the site over to Middleman.
This includes converting the haml templates to erb.
2015-02-14 14:48:04 +00:00

18 lines
671 B
CoffeeScript

if navigator.userAgent.match(/iPhone/i) or navigator.userAgent.match(/iPad/i)
viewportmeta = document.querySelectorAll("meta[name=\"viewport\"]")[0]
if viewportmeta
viewportmeta.content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"
document.body.addEventListener "gesturestart", (->
viewportmeta.content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6"
), false
$ ->
canvas = document.getElementById("colours")
context = canvas.getContext("2d")
colours = ['#FF6205', '#8ED600', '#00BAEB']
offset = 0
for colour in colours
context.fillStyle = colour
context.fillRect(offset, 0, 72, 12)
offset += 72