initial commit
This commit is contained in:
commit
ebd56ccd79
|
@ -0,0 +1,2 @@
|
||||||
|
.DS_Store
|
||||||
|
.sass-cache/
|
|
@ -0,0 +1,11 @@
|
||||||
|
GEM
|
||||||
|
specs:
|
||||||
|
coffee-script-source (1.1.1)
|
||||||
|
erubis (2.7.0)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
coffee-script-source
|
||||||
|
erubis
|
|
@ -0,0 +1,12 @@
|
||||||
|
guard 'compass' do
|
||||||
|
watch(%r{^sass/.*})
|
||||||
|
end
|
||||||
|
|
||||||
|
guard 'shell' do
|
||||||
|
watch(%r{^src/.*}) do
|
||||||
|
puts "Building..."
|
||||||
|
system %{rake build}
|
||||||
|
system %{open CoffeeScript.wdgt}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
require 'rubygems'
|
||||||
|
require 'coffee_script/source'
|
||||||
|
require 'erubis'
|
||||||
|
|
||||||
|
desc 'build the widget'
|
||||||
|
task :build do
|
||||||
|
mkdir_p 'CoffeeScript.wdgt'
|
||||||
|
Dir['src/**/*'].each do |file|
|
||||||
|
cp file, 'CoffeeScript.wdgt'
|
||||||
|
end
|
||||||
|
cp CoffeeScript::Source.bundled_path, 'CoffeeScript.wdgt'
|
||||||
|
end
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Require any additional compass plugins here.
|
||||||
|
|
||||||
|
# Set this to the root of your project when deployed:
|
||||||
|
http_path = "/"
|
||||||
|
css_dir = "src"
|
||||||
|
sass_dir = "sass"
|
||||||
|
images_dir = "src"
|
||||||
|
javascripts_dir = "javascripts"
|
||||||
|
|
||||||
|
# You can select your preferred output style here (can be overridden via the command line):
|
||||||
|
# output_style = :expanded or :nested or :compact or :compressed
|
||||||
|
|
||||||
|
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||||
|
relative_assets = true
|
||||||
|
|
||||||
|
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
||||||
|
line_comments = false
|
||||||
|
|
||||||
|
|
||||||
|
# If you prefer the indented syntax, you might want to regenerate this
|
||||||
|
# project again passing --syntax sass, or you can uncomment this:
|
||||||
|
# preferred_syntax = :sass
|
||||||
|
# and then run:
|
||||||
|
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
|
|
@ -0,0 +1,91 @@
|
||||||
|
@import 'compass/css3';
|
||||||
|
@import 'compass/utilities';
|
||||||
|
|
||||||
|
$padding: 10px;
|
||||||
|
$width: 640px - ($padding * 2);
|
||||||
|
$height: 360px - ($padding * 2);
|
||||||
|
|
||||||
|
$textarea-width: ($width - $padding) / 2;
|
||||||
|
$textarea-height: $height - image_height('logo.png') - $padding;
|
||||||
|
|
||||||
|
body {
|
||||||
|
form {
|
||||||
|
background-color: #181A3A;
|
||||||
|
@include border-radius($padding);
|
||||||
|
padding: $padding;
|
||||||
|
|
||||||
|
width: $width;
|
||||||
|
height: $height;
|
||||||
|
@include clearfix;
|
||||||
|
|
||||||
|
header {
|
||||||
|
margin-bottom: $padding;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
@include background(
|
||||||
|
linear-gradient(#eee, #f8f8f8)
|
||||||
|
);
|
||||||
|
@include border-radius($padding / 2);
|
||||||
|
height: image_height('logo.png');
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
a {
|
||||||
|
background: url('logo.png') top left no-repeat;
|
||||||
|
width: image_width('logo.png');
|
||||||
|
height: image_height('logo.png');
|
||||||
|
display: block;
|
||||||
|
@include hide-text;
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#error {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
width: $width - image_width('logo.png') - $padding;
|
||||||
|
height: image_height('logo.png') - ($padding * 2);
|
||||||
|
margin-left: $padding;
|
||||||
|
@include border-right-radius($padding / 2);
|
||||||
|
|
||||||
|
padding: $padding 0;
|
||||||
|
|
||||||
|
@include background(
|
||||||
|
linear-gradient(#ffedec, #ff9a95)
|
||||||
|
);
|
||||||
|
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
span {
|
||||||
|
text: {
|
||||||
|
transform: uppercase;
|
||||||
|
}
|
||||||
|
font: {
|
||||||
|
family: "Helvetica Neue", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, sans-serif;
|
||||||
|
size: 13px;
|
||||||
|
weight: bold;
|
||||||
|
}
|
||||||
|
color: #D00;
|
||||||
|
padding-right: $padding;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
@include float-left;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
font: {
|
||||||
|
family: Monaco, Consolas, "Lucida Console", monospace;
|
||||||
|
size: 10px;
|
||||||
|
}
|
||||||
|
color: #DEF;
|
||||||
|
width: $textarea-width;
|
||||||
|
height: $textarea-height;
|
||||||
|
|
||||||
|
&#javascript {
|
||||||
|
margin-left: $padding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 221 B |
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>AllowNetworkAccess</key>
|
||||||
|
<false/>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>CoffeeScript</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.coswellproductions.coffeescript</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>CoffeeScript</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>0.1</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>2</string>
|
||||||
|
<key>CloseBoxInsetX</key>
|
||||||
|
<integer>10</integer>
|
||||||
|
<key>CloseBoxInsetY</key>
|
||||||
|
<integer>10</integer>
|
||||||
|
<key>Width</key>
|
||||||
|
<integer>660</integer>
|
||||||
|
<key>Height</key>
|
||||||
|
<integer>380</integer>
|
||||||
|
<key>MainHTML</key>
|
||||||
|
<string>index.html</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -0,0 +1,38 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>CoffeeScript</title>
|
||||||
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="coffee-script.js"></script>
|
||||||
|
<script type="text/coffeescript">
|
||||||
|
jQuery(->
|
||||||
|
recompile = ->
|
||||||
|
try
|
||||||
|
compiledJS = CoffeeScript.compile($('#coffee-script').val(), bare: true)
|
||||||
|
$('#javascript').val(compiledJS)
|
||||||
|
|
||||||
|
$('#error').hide()
|
||||||
|
catch error
|
||||||
|
$('#error').show().html("<span>#{error.message}</span>")
|
||||||
|
|
||||||
|
$('#coffee-script').bind('change keyup', recompile)
|
||||||
|
recompile()
|
||||||
|
|
||||||
|
$('a').click(-> widget.openURL($(this).attr('href')))
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form>
|
||||||
|
<header>
|
||||||
|
<a href="http://jashkenas.github.com/coffee-script/" target="_new" id="logo">CoffeeScript</a>
|
||||||
|
<div id="error"></div>
|
||||||
|
</header>
|
||||||
|
<textarea name="coffee-script" id="coffee-script">class HelloWorld
|
||||||
|
constructor: ->
|
||||||
|
console.log("Hello world!")</textarea>
|
||||||
|
<textarea name="javascript" id="javascript"></textarea>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 7.8 KiB |
|
@ -0,0 +1,92 @@
|
||||||
|
body form {
|
||||||
|
background-color: #181A3A;
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
-o-border-radius: 10px;
|
||||||
|
-ms-border-radius: 10px;
|
||||||
|
-khtml-border-radius: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
width: 620px;
|
||||||
|
height: 340px;
|
||||||
|
overflow: hidden;
|
||||||
|
*zoom: 1;
|
||||||
|
}
|
||||||
|
body form header {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
position: relative;
|
||||||
|
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eeeeee), color-stop(100%, #f8f8f8));
|
||||||
|
background: -webkit-linear-gradient(#eeeeee, #f8f8f8);
|
||||||
|
background: -moz-linear-gradient(#eeeeee, #f8f8f8);
|
||||||
|
background: -o-linear-gradient(#eeeeee, #f8f8f8);
|
||||||
|
background: -ms-linear-gradient(#eeeeee, #f8f8f8);
|
||||||
|
background: linear-gradient(#eeeeee, #f8f8f8);
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
-o-border-radius: 5px;
|
||||||
|
-ms-border-radius: 5px;
|
||||||
|
-khtml-border-radius: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
height: 50px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
body form header a {
|
||||||
|
background: url("logo.png") top left no-repeat;
|
||||||
|
width: 225px;
|
||||||
|
height: 50px;
|
||||||
|
display: block;
|
||||||
|
text-indent: -119988px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: left;
|
||||||
|
position: absolute;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
body form header #error {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
width: 385px;
|
||||||
|
height: 30px;
|
||||||
|
margin-left: 10px;
|
||||||
|
-moz-border-radius-topright: 5px;
|
||||||
|
-webkit-border-top-right-radius: 5px;
|
||||||
|
-o-border-top-right-radius: 5px;
|
||||||
|
-ms-border-top-right-radius: 5px;
|
||||||
|
-khtml-border-top-right-radius: 5px;
|
||||||
|
border-top-right-radius: 5px;
|
||||||
|
-moz-border-radius-bottomright: 5px;
|
||||||
|
-webkit-border-bottom-right-radius: 5px;
|
||||||
|
-o-border-bottom-right-radius: 5px;
|
||||||
|
-ms-border-bottom-right-radius: 5px;
|
||||||
|
-khtml-border-bottom-right-radius: 5px;
|
||||||
|
border-bottom-right-radius: 5px;
|
||||||
|
padding: 10px 0;
|
||||||
|
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffedec), color-stop(100%, #ff9a95));
|
||||||
|
background: -webkit-linear-gradient(#ffedec, #ff9a95);
|
||||||
|
background: -moz-linear-gradient(#ffedec, #ff9a95);
|
||||||
|
background: -o-linear-gradient(#ffedec, #ff9a95);
|
||||||
|
background: -ms-linear-gradient(#ffedec, #ff9a95);
|
||||||
|
background: linear-gradient(#ffedec, #ff9a95);
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
body form header #error span {
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-family: "Helvetica Neue", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #D00;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
body textarea {
|
||||||
|
display: inline;
|
||||||
|
float: left;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
font-family: Monaco, Consolas, "Lucida Console", monospace;
|
||||||
|
font-size: 10px;
|
||||||
|
color: #DEF;
|
||||||
|
width: 305px;
|
||||||
|
height: 280px;
|
||||||
|
}
|
||||||
|
body textarea#javascript {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
Loading…
Reference in New Issue