mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
plugins/ (not working yet)
This commit is contained in:
8
Rakefile
8
Rakefile
@@ -8,7 +8,7 @@ task :build do
|
||||
|
||||
dest = File.join(built_dir, contents_dir, "Resources")
|
||||
|
||||
%w( src docs static vendor ).each do |dir|
|
||||
%w( src docs static plugins vendor ).each do |dir|
|
||||
rm_rf File.join(dest, dir)
|
||||
cp_r dir, File.join(dest, dir)
|
||||
end
|
||||
@@ -19,8 +19,10 @@ task :build do
|
||||
"http://coffeescript.org/ - (try `npm i -g coffee-script`)"
|
||||
end
|
||||
|
||||
Dir['src/**/*.coffee'].each do |file|
|
||||
sh "coffee -c #{dest}/src"
|
||||
%w( src plugins ).each do |dir|
|
||||
Dir["#{dir}/**/*.coffee"].each do |file|
|
||||
sh "coffee -c #{dest}/#{dir}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
12
plugins/project/project.css
Normal file
12
plugins/project/project.css
Normal file
@@ -0,0 +1,12 @@
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
li:hover {
|
||||
background-color: grey;
|
||||
}
|
||||
2
plugins/project/project.html
Normal file
2
plugins/project/project.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<div id='cwd'></div>
|
||||
<ul id='files'></ul>
|
||||
1
plugins/tabs/index.coffee
Normal file
1
plugins/tabs/index.coffee
Normal file
@@ -0,0 +1 @@
|
||||
require('./tabs').show()
|
||||
@@ -3,11 +3,12 @@ $ = require 'jquery'
|
||||
{Chrome, File, Dir, Process} = require 'osx'
|
||||
|
||||
exports.show = ->
|
||||
root = OSX.NSBundle.mainBundle.resourcePath + '/HTML/'
|
||||
root = OSX.NSBundle.mainBundle.resourcePath + '/plugins/tabs'
|
||||
tabs = OSX.NSString.stringWithContentsOfFile "#{root}/tabs.html"
|
||||
edit = OSX.NSString.stringWithContentsOfFile "#{root}/editor.html"
|
||||
console.log tabs
|
||||
# edit = OSX.NSString.stringWithContentsOfFile "#{root}/editor.html"
|
||||
|
||||
Chrome.addPane 'main', tabs.replace '<%= editor %>', edit
|
||||
Chrome.addPane 'main', 'derp'
|
||||
|
||||
# events
|
||||
$('#tabs ul li:not(.add) a').live 'click', ->
|
||||
86
plugins/tabs/tabs.css
Normal file
86
plugins/tabs/tabs.css
Normal file
@@ -0,0 +1,86 @@
|
||||
* { margin: 0; padding: 0; }
|
||||
body {
|
||||
font: 12px "Lucida Grande", Helvetica, Arial, serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
iframe { border: 0; }
|
||||
|
||||
.clearfix:after {
|
||||
visibility: hidden;
|
||||
display: block;
|
||||
font-size: 0;
|
||||
content: " ";
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#EEEEEE), to(#D8D7D8));
|
||||
padding: 3px 0 0 0;
|
||||
}
|
||||
|
||||
#tabs .add a {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
|
||||
margin-top: 2px;
|
||||
margin-left: 10px;
|
||||
padding: 2px;
|
||||
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-shadow: #000 1px 1px 0;
|
||||
background: #d8d7d8;
|
||||
border: 1px solid #a0a0a0;
|
||||
border-bottom: none;
|
||||
|
||||
-webkit-border-top-right-radius: 10px 5px;
|
||||
-webkit-border-top-left-radius: 10px 5px;
|
||||
-webkit-box-shadow: inset 0 1px 0 white;
|
||||
}
|
||||
#tabs .add span {
|
||||
display: block;
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
#tabs ul {
|
||||
list-style: none;
|
||||
border-bottom: 1px solid #a0a0a0;
|
||||
}
|
||||
#tabs ul li { display: inline; }
|
||||
|
||||
#tabs ul li.active a {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
height: 8px;
|
||||
|
||||
background: #eee;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
#tabs ul li a {
|
||||
display: block;
|
||||
float: left;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
height: 8px;
|
||||
|
||||
padding: 3px 50px 7px;
|
||||
margin: 0 -5px 0 0;
|
||||
color: #222;
|
||||
background: #d8d7d8;
|
||||
|
||||
-webkit-border-top-right-radius: 10px 20px;
|
||||
-webkit-border-top-left-radius: 10px 20px;
|
||||
-webkit-box-shadow: inset 1px 1px 0 white;
|
||||
|
||||
border: 1px solid #a0a0a0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
-webkit-box-shadow: inset 0 1px 0 white;
|
||||
-moz-box-shadow: inset 0 1px 0 white;
|
||||
height: 97%;
|
||||
}
|
||||
9
plugins/tabs/tabs.html
Normal file
9
plugins/tabs/tabs.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<div id="tabs">
|
||||
<ul class="clearfix">
|
||||
<li class="active"><a href="#">untitled</a></li>
|
||||
<li class="add"><a href="#"><span>+</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
</div>
|
||||
@@ -149,4 +149,9 @@ bindKey 'consolelog', 'Ctrl-L', (env) ->
|
||||
env.editor.navigateLeft()
|
||||
|
||||
bindKey 'toggleProjectDrawer', 'Command-Ctrl-N', (env) ->
|
||||
Project.toggle()
|
||||
Project.toggle()
|
||||
|
||||
|
||||
## load plugins
|
||||
plugins = _.map Dir.list("./plugins"), (plugin) ->
|
||||
require plugin
|
||||
@@ -1,22 +0,0 @@
|
||||
<style>
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
li:hover {
|
||||
background-color: grey;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id='cwd'></div>
|
||||
<ul id='files'></ul>
|
||||
|
||||
<script>
|
||||
require('project');
|
||||
</script>
|
||||
@@ -1,99 +0,0 @@
|
||||
<style>
|
||||
* { margin: 0; padding: 0; }
|
||||
body {
|
||||
font: 12px "Lucida Grande", Helvetica, Arial, serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
iframe { border: 0; }
|
||||
|
||||
.clearfix:after {
|
||||
visibility: hidden;
|
||||
display: block;
|
||||
font-size: 0;
|
||||
content: " ";
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#EEEEEE), to(#D8D7D8));
|
||||
padding: 3px 0 0 0;
|
||||
}
|
||||
|
||||
#tabs .add a {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
|
||||
margin-top: 2px;
|
||||
margin-left: 10px;
|
||||
padding: 2px;
|
||||
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-shadow: #000 1px 1px 0;
|
||||
background: #d8d7d8;
|
||||
border: 1px solid #a0a0a0;
|
||||
border-bottom: none;
|
||||
|
||||
-webkit-border-top-right-radius: 10px 5px;
|
||||
-webkit-border-top-left-radius: 10px 5px;
|
||||
-webkit-box-shadow: inset 0 1px 0 white;
|
||||
}
|
||||
#tabs .add span {
|
||||
display: block;
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
#tabs ul {
|
||||
list-style: none;
|
||||
border-bottom: 1px solid #a0a0a0;
|
||||
}
|
||||
#tabs ul li { display: inline; }
|
||||
|
||||
#tabs ul li.active a {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
height: 8px;
|
||||
|
||||
background: #eee;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
#tabs ul li a {
|
||||
display: block;
|
||||
float: left;
|
||||
text-decoration: none;
|
||||
position: relative;
|
||||
height: 8px;
|
||||
|
||||
padding: 3px 50px 7px;
|
||||
margin: 0 -5px 0 0;
|
||||
color: #222;
|
||||
background: #d8d7d8;
|
||||
|
||||
-webkit-border-top-right-radius: 10px 20px;
|
||||
-webkit-border-top-left-radius: 10px 20px;
|
||||
-webkit-box-shadow: inset 1px 1px 0 white;
|
||||
|
||||
border: 1px solid #a0a0a0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
-webkit-box-shadow: inset 0 1px 0 white;
|
||||
-moz-box-shadow: inset 0 1px 0 white;
|
||||
height: 97%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="tabs">
|
||||
<ul class="clearfix">
|
||||
<li class="active"><a href="#">untitled</a></li>
|
||||
<li class="add"><a href="#"><span>+</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<%= editor %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user