Skip to content

Commit

Permalink
added tp6
Browse files Browse the repository at this point in the history
  • Loading branch information
mwylde committed Aug 31, 2011
1 parent 77b038c commit 4fc99cf
Show file tree
Hide file tree
Showing 65 changed files with 15,723 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tasks/deploy.rake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'highline'
require 'json'
require 'slinky'

PUBLIC_KEY = true #Are we using public key authentication on all the servers?

Expand Down Expand Up @@ -29,6 +30,30 @@ task :deploy do
deploy SERVERS
end

desc "build touchscreen interface"
task :build_tp do
Slinky::Builder.build(WORKING + "/tp6/src", WORKING + "/tp6/pub")
end

desc "deploy touchscreen interface", :needs => [:build_tp]
task :deploy_tp, :require do
cmd = "rsync -arvz -e ssh #{WORKING}/tp6/pub #{roomtrol}@#{c}:/var/www/tp6 --exclude '.git'"
CONTROLLERS.each{|c|
puts c
PTY.spawn(cmd){|read,write,pid|
write.sync = true
$expect_verbose = false

read.expect(/password:/) do
write.puts OPTS[:password] + "\n"
end

read.expect(/total size/) do
end
}
}
end

desc "deploy server code to tests"
task :deploy_test do
deploy TEST
Expand Down
1 change: 1 addition & 0 deletions tp6/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.sass-cache/
25 changes: 25 additions & 0 deletions tp6/Cakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
fs = require 'fs'
{exec} = require 'child_process'

appFiles = [
'models/device_model',
'main'
]

task 'build', 'Build application', ->
appContents = new Array remaining = appFiles.length
for file, index in appFiles
fs.readFile "script/#{file}.coffee", 'utf8', (err, fileContents) ->
throw err if err
appContents[index] = fileContents
process() if --remaining is 0
process = ->
fs.writeFile 'app.coffee', appContents.join("\n\n"), 'utf8', (err) ->
throw err if err
exec 'coffee --compile app.coffee', (err, stdout, stderr) ->
throw err if err
print stdout + stderr
fs.unlink 'app.coffee', (err) ->
throw err if err
puts "Done"

17 changes: 17 additions & 0 deletions tp6/app.js

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

19 changes: 19 additions & 0 deletions tp6/compile.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
fork {
`sass --watch sass/:static/css/`
}

# compile all of the coffee files
text = ""
File.open "#{File.dirname(__FILE__)}/static/index.html", "r" do |f|
replace = Dir.glob("#{File.dirname(__FILE__)}/script/**/*.coffee").collect{|name|
"<script src='dev/#{name.gsub(".coffee", ".js").gsub("./script/", "")}'></script>"
}.join("\n")
text = f.read
text.gsub!(/(?<=APPLICATION\_SCRIPTS\_BEGIN --\>\n).*(?=\<!-- APPLICATION\_SCRIPTS\_END)/, replace)
end

File.open "#{File.dirname(__FILE__)}/static/index.html", "w+" do |f|
f.write(text)
end

`coffee --lint --watch --output static/dev script/`
4,802 changes: 4,802 additions & 0 deletions tp6/image_sources/dvd_controls.ai

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions tp6/src/css/_actions_list.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@import mixins
#action-pane
.action-module
position: absolute
left: 150px
top: 0
bottom: 0
width: 290px
background: #CECECE
+box-shadow(0 0 10px 10px #B5B5B5 inset)

ul.action-list
list-style: none
li.action-list-item
border-bottom: 2px solid #B5B5B6
+text-inset
height: 100%
color: #565656
font-size: 36px
line-height: 48px
font-family: "Myriad Pro"
position: relative
height: 65px

&:active
background: #999

&.selected
text-shadow: 0px -1px 0px #000
+box-shadow(#330 0 0 4px inset)
background: #666
color: #D9D9D9

img
position: absolute
max-width: 70px
max-height: 55px
left: 20px
top: 50%
margin-top: -22.5px

.action-label
position: absolute
width: 180px
height: 40px
top: 50%
margin-top: -20px
left: 105px
19 changes: 19 additions & 0 deletions tp6/src/css/_context_area.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@import mixins.sass
.context-area
padding-top: 20px
left: 440px
right: 0
position: absolute
top: 0
bottom: 0
border-left: #888 solid 1px
z-index: 1000
+gradient(#d1d3d4, #9d9fa2, 0, 1)

.title
+text-inset
color: black
font-family: 'Myriad Pro'
font-size: 48px
text-align: center
line-height: 48px
76 changes: 76 additions & 0 deletions tp6/src/css/_main.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
@import mixins.sass
@-webkit-keyframes 'pulse'
from
opacity: 0
40%
opacity: 0.6
60%
opacity: 0.6
to
opacity: 0

@-moz-keyframes 'pulse'
from
opacity: 0
40%
opacity: 0.6
60%
opacity: 0.6
to
opacity: 0

.overflow
overflow: visible

div, img, p
+user-select(none)
cursor: pointer

#top-bar
background-color: black
overflow: visible
+fill-width(30px)

.label
color: #E6E7E8
font-family: "Myriad Pro"
-webkit-user-select: none
font-size: 19px
top: 5px
position: absolute

&#room-label
left: 20px
width: 200px

&#time-label
line-height: 22px
text-align: center
right: 20px
width: 100px

#main-view
+fill-parent
top: 30px

#lost-connection
+fill-parent
background-color: rgba(0,0,0,0.9)
z-index: 100000
color: white
text-align: center
font-family: "Myriad Pro"
.title
margin-top: 40px
font-size: 60px
.text
margin-top: 60px
line-height: 40px
font-size: 28px
width: 85%
margin-left: auto
margin-right: auto
.reconnection-attempt, .reconnecting
font-size: 22px
margin-top: 50px

75 changes: 75 additions & 0 deletions tp6/src/css/_mixins.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
=user-select($val)
user-select: $val
-moz-user-select: $val
-webkit-user-select: $val

=border-radius($radius)
-webkit-border-radius: $radius
-moz-border-radius: $radius
border-radius: $radius

=box-shadow($values)
-moz-box-shadow: $values
-webkit-box-shadow: $values
box-shadow: $values

=gradient($color1, $color2, $start:0, $end:1)
background: -webkit-gradient(linear, left top, left bottom, color-stop($start, $color1), color-stop($end, $color2))
background: -moz-linear-gradient(center top, $color1 $start*100%, $color2 $end*100%)

=text-inset($color: rgba(255, 255, 255, 0.5))
text-shadow: 0px 1px 0px $color

=fill-parent
top: 0
bottom: 0
left: 0
right: 0
position: absolute

=fill-width($height, $top:0)
top: $top
left: 0
right: 0
height: $height
position: absolute

=fill-height($width, $left:0)
left: $left
top: 0
bottom: 0
width: $width
position: absolute

=center-y($width, $height)
width: $width
height: $height
top: 50%
margin-top: -$height/2
position: absolute

=center-x($width, $height)
width: $width
height: $height
left: 50%
margin-left: -$width/2
position: absolute

=centered($width, $height)
+center-y($width, $height)
+center-x($width, $height)

=button($topcolor: #F6F6F6)
+border-radius(5px)
border: 1px solid #FFF
+box-shadow(0 0 3px #000)
+gradient($topcolor, $topcolor*0.8, 0.25, 1)

&:active
+gradient($topcolor*0.8, $topcolor*0.7, 0.25, 1)
+box-shadow(0 0 3px #000 inset)
&.disabled
opacity: 0.6
+box-shadow(0 0 3px #000)
+box-shadow(0 0 3px #000)
+gradient($topcolor, $topcolor*0.8, 0.25, 1)
Loading

0 comments on commit 4fc99cf

Please sign in to comment.