diff --git a/content/assets/scripts/cammie.coffee b/content/assets/scripts/cammie.coffee index ef916bc..e69de29 100644 --- a/content/assets/scripts/cammie.coffee +++ b/content/assets/scripts/cammie.coffee @@ -1,69 +0,0 @@ -# All the cammie controls -commands = - up: - command: 'set_relative_pos' - posX: 0 - 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').click -> - $.ajax "//kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi", - data: commands[$(this).attr('id')] - -timer = undefined -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_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) -$('.ctrl').mouseout(unblock_hide) - -# Timeout when we leave the window -$(document).mouseleave(unblock_hide) diff --git a/content/assets/stylesheets/includes/cammie.scss b/content/assets/stylesheets/includes/cammie.scss index 174c95b..50a2685 100644 --- a/content/assets/stylesheets/includes/cammie.scss +++ b/content/assets/stylesheets/includes/cammie.scss @@ -16,46 +16,53 @@ background-color: black; } -.ctrl { - background-color: $cammie-controls-color; - color: white; - position: absolute; - z-index: 100; +#cammie-section { + position: relative; + height: 100%; + #cammie-body { + position: relative; + height: 100%; + } - // Chevron centering - display: flex; - justify-content: center; - align-items: center; + .ctrl { + background-color: $cammie-controls-color; + color: white; + z-index: 100; + position: absolute; - &:hover { - background-color: $zeus_orange; - z-index: 200; - cursor: pointer; + // Chevron centering + display: flex; + justify-content: center; + align-items: center; + + &:hover { + background-color: $zeus_orange; + z-index: 200; + cursor: pointer; + } + } + + .left { + height: 100%; + width: 50px; + left: 0; + } + + .right { + height: 100%; + width: 100px; + right: 0; + } + + .up { + height: 100px; + width: 100%; + top: 0; + } + + .down { + height: 100px; + width: 100%; + bottom: 0; } } - -#left { - height: 100%; - width: 100px; - top: 0; - left: 0; -} - -#right { - height: 100%; - width: 100px; - top: 0; - right: 0; -} - -#up { - height: 100px; - width: 100%; - top: 0; -} - -#down { - height: 100px; - width: 100%; - bottom: 0; -} diff --git a/content/assets/stylesheets/includes/events.scss b/content/assets/stylesheets/includes/events.scss new file mode 100644 index 0000000..f49e964 --- /dev/null +++ b/content/assets/stylesheets/includes/events.scss @@ -0,0 +1,3 @@ +.subevent { + margin-left: 20px; +} diff --git a/content/assets/stylesheets/main.scss b/content/assets/stylesheets/main.scss index 03a8ab5..1913dbb 100644 --- a/content/assets/stylesheets/main.scss +++ b/content/assets/stylesheets/main.scss @@ -16,4 +16,5 @@ $family-sans-serif: 'Open Sans', sans-serif; @import "includes/variables"; @import "includes/cammie"; +@import "includes/events"; @import "includes/general"; diff --git a/content/cammie.erb b/content/cammie.erb index f6166c4..0495361 100644 --- a/content/cammie.erb +++ b/content/cammie.erb @@ -3,36 +3,14 @@ navigable: true title: Cammie --- -
+
<%= render '/partials/_navbar.*' %>
- -
- - -
-
top
-
top
-
top
-
-
-
mid
-
mid
-
mid
-
-
-
bot
-
bot
-
bot
-
- + +
+
+
+
+ diag up left +
+
+
+
+ up +
+
+
+
+ diag up right +
+
+
+
+
left
+
home?
+
right
+
+
+
diag down left
+
down
+
diag down right
+
+
<% end %> diff --git a/layouts/partials/_tile.erb b/layouts/partials/_tile.erb index 94c7675..0451e9f 100644 --- a/layouts/partials/_tile.erb +++ b/layouts/partials/_tile.erb @@ -1,5 +1,5 @@ -
+