fix cammie controls and integrity of html
This commit is contained in:
parent
911978d4ba
commit
53ae62440f
4 changed files with 69 additions and 16 deletions
|
@ -14,9 +14,10 @@ install:
|
||||||
script:
|
script:
|
||||||
- bundle exec nanoc
|
- bundle exec nanoc
|
||||||
- bundle exec nanoc check elinks
|
- bundle exec nanoc check elinks
|
||||||
|
- bundle exec nanoc check html
|
||||||
- bundle exec nanoc check ilinks
|
- bundle exec nanoc check ilinks
|
||||||
- bundle exec nanoc check stale
|
|
||||||
- bundle exec nanoc check mixed_content
|
- bundle exec nanoc check mixed_content
|
||||||
|
- bundle exec nanoc check stale
|
||||||
after_success:
|
after_success:
|
||||||
- mv deploy_key ~/.ssh/id_rsa
|
- mv deploy_key ~/.ssh/id_rsa
|
||||||
- chmod 600 ~/.ssh/id_rsa
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
|
@ -1,15 +1,68 @@
|
||||||
$('.ctrl').click ->
|
# All the cammie controls
|
||||||
$.ajax "//kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi",
|
commands =
|
||||||
data:
|
up:
|
||||||
command: $(this).attr("command")
|
command: 'set_relative_pos'
|
||||||
posX: $(this).attr("posX")
|
posX: 0
|
||||||
posY: $(this).attr("posY")
|
posY: 10
|
||||||
|
down:
|
||||||
|
command: 'set_relative_pos'
|
||||||
|
posX: 0
|
||||||
|
posY: -10
|
||||||
|
left:
|
||||||
|
command: 'set_relative_pos'
|
||||||
|
posX: -10
|
||||||
|
posY: 0
|
||||||
|
right:
|
||||||
|
command: 'set_relative_pos'
|
||||||
|
posX: 10
|
||||||
|
posY: 0
|
||||||
|
|
||||||
|
# Initially hide all the controls
|
||||||
$('.ctrl').hide()
|
$('.ctrl').hide()
|
||||||
|
|
||||||
timeout = null
|
$('.ctrl').click ->
|
||||||
|
$.ajax "//kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi",
|
||||||
|
data: commands[$(this).attr('id')]
|
||||||
|
|
||||||
$('.fullpage').mousemove (event) ->
|
timer = undefined
|
||||||
clearTimeout(timeout) if timeout
|
fade_buffer = false
|
||||||
|
blocking = false
|
||||||
|
|
||||||
|
clear_timer = () ->
|
||||||
|
clearTimeout timer
|
||||||
|
timer = 0
|
||||||
|
|
||||||
|
set_timer = () ->
|
||||||
|
timer = setTimeout((->
|
||||||
|
ctrl_hide()
|
||||||
|
fade_buffer = true
|
||||||
|
), 3000)
|
||||||
|
|
||||||
|
ctrl_show = () ->
|
||||||
$('.ctrl').fadeIn()
|
$('.ctrl').fadeIn()
|
||||||
timeout = setTimeout (-> $('.ctrl').fadeOut()), 3000
|
|
||||||
|
ctrl_hide = () ->
|
||||||
|
$('.ctrl').fadeOut()
|
||||||
|
|
||||||
|
block_hide = () ->
|
||||||
|
clear_timer()
|
||||||
|
blocking = true
|
||||||
|
|
||||||
|
unblock_hide = () ->
|
||||||
|
set_timer()
|
||||||
|
blocking = false
|
||||||
|
|
||||||
|
$(document).mousemove ->
|
||||||
|
if !blocking
|
||||||
|
if !fade_buffer
|
||||||
|
clear_timer() if timer
|
||||||
|
else
|
||||||
|
fade_buffer = false
|
||||||
|
|
||||||
|
ctrl_show()
|
||||||
|
set_timer()
|
||||||
|
|
||||||
|
$('.ctrl').mouseover(block_hide)
|
||||||
|
|
||||||
|
# Timeout when we leave the window
|
||||||
|
$(document).mouseleave(unblock_hide)
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
src="https://kelder.zeus.ugent.be/webcam/video/mjpg.cgi?profileid=2"
|
src="https://kelder.zeus.ugent.be/webcam/video/mjpg.cgi?profileid=2"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
<div id="left" class="ctrl" command="set_relative_pos" posX="-10" posY="0">
|
<div id="left" class="ctrl">
|
||||||
<i class="fa fa-chevron-left fa-2x"></i>
|
<i class="fa fa-chevron-left fa-2x"></i>
|
||||||
</div>
|
</div>
|
||||||
<div id="right" class="ctrl" command="set_relative_pos" posX="10" posY="0">
|
<div id="right" class="ctrl">
|
||||||
<i class="fa fa-chevron-right fa-2x"></i>
|
<i class="fa fa-chevron-right fa-2x"></i>
|
||||||
</div>
|
</div>
|
||||||
<div id="up" class="ctrl" command="set_relative_pos" posX="0" posY="10">
|
<div id="up" class="ctrl">
|
||||||
<i class="fa fa-chevron-up fa-2x"></i>
|
<i class="fa fa-chevron-up fa-2x"></i>
|
||||||
</div>
|
</div>
|
||||||
<div id="down" class="ctrl" command="set_relative_pos" posX="0" posY="-10">
|
<div id="down" class="ctrl">
|
||||||
<i class="fa fa-chevron-down fa-2x"></i>
|
<i class="fa fa-chevron-down fa-2x"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue