Style the Ace Bookmarklet Build page
This commit is contained in:
parent
14faa36a51
commit
e0cec5a073
3 changed files with 270 additions and 27 deletions
|
|
@ -21,6 +21,7 @@
|
||||||
*
|
*
|
||||||
* Contributor(s):
|
* Contributor(s):
|
||||||
* Fabian Jakobs <fabian AT ajax DOT org>
|
* Fabian Jakobs <fabian AT ajax DOT org>
|
||||||
|
* Julian Viereck <julian.viereck@gmail.com>
|
||||||
*
|
*
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
* Alternatively, the contents of this file may be used under the terms of
|
||||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||||
|
|
@ -94,6 +95,10 @@ if (target == "normal") {
|
||||||
source: "build_support/editor_textarea.html",
|
source: "build_support/editor_textarea.html",
|
||||||
dest: targetDir + '/editor.html'
|
dest: targetDir + '/editor.html'
|
||||||
});
|
});
|
||||||
|
copy({
|
||||||
|
source: "build_support/style.css",
|
||||||
|
dest: targetDir + '/style.css'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var project = copy.createCommonJsProject(aceProject);
|
var project = copy.createCommonJsProject(aceProject);
|
||||||
|
|
|
||||||
|
|
@ -3,37 +3,45 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<title>Editor</title>
|
<link href="style.css" rel="stylesheet" type="text/css">
|
||||||
|
<title>Ace Bookmarklet Builder</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h1>Ace Bookmarklet Builder</h1>
|
<div id="wrapper">
|
||||||
|
<div class="content" style="width: 950px">
|
||||||
|
<div class="column1" style="margin-top: 47px">
|
||||||
|
<textarea id="textarea" style="width:300px; height:300px">
|
||||||
|
/**
|
||||||
|
* This is Ace injected using a bookmarklet.
|
||||||
|
*/
|
||||||
|
function foo() {
|
||||||
|
var bar = true;
|
||||||
|
}</textarea><br>
|
||||||
|
SourceUrl: <br>
|
||||||
|
<input id="srcURL" style="width:300px" value="http://ajaxorg.github.com/ace/build/textarea/src/"></input><br>
|
||||||
|
<button id="buBuild">Build Link</button> <br> <a href="#"></a>
|
||||||
|
</div>
|
||||||
|
<div class="column2">
|
||||||
|
<h1>Ace Bookmarklet Builder</h1>
|
||||||
|
|
||||||
<p>
|
<p id="first">
|
||||||
WARNING: Currently, this is only fully supported in non IE browsers.
|
<strong>WARNING:</strong> Currently, this is only supported in non IE browsers.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<h2>How to use it:</h2>
|
||||||
How to use it:
|
<ul>
|
||||||
<ul>
|
<li>Select the options as you want them to be by default.</li>
|
||||||
<li>Select the options below as you want them to be by default.</li>
|
<li>Enter the "SourceUrl". This has to be the URL pointing to build/textarea/src/ (you can leave the default to server the scripts from GitHub).</li>
|
||||||
<li>Enter the "SourceUrl" where you placed the source data which you find under build/textarea/src (you can also leave the default to server the scripts from GitHub).</li>
|
<li>Click the "Build Link" button to generate your custom Ace Bookmarklet.</li>
|
||||||
<li>Click the "Build Link" button to generate your custom Ace Bookmarklet.</li>
|
<li>Drag the generated link to your toolbar or store it somewhere else.</li>
|
||||||
<li>Drag the generated link to your toolbar or store it somewhere else.</li>
|
<li>Go to a page with a textarea element and click the bookmarklet - wait a little bit till the files are loaded.</li>
|
||||||
<li>Go to a page with an textarea element and click the bookmarklet - wait a little bit till the files are loaded.</li>
|
<li>Click three times on the textarea you want to replace - Ace will replace it.</li>
|
||||||
<li>Click 3 times on the textarea you want to replace - Ace will replace it.</li>
|
<li>To change settings, just click the red icon in the bottom right corner.</li>
|
||||||
<li>To change settings, just click the red icon in the bottom right corner.</li>
|
</ul>
|
||||||
</ul>
|
</div>
|
||||||
</p>
|
</div>
|
||||||
|
</div>
|
||||||
<textarea id="textarea" style="width:300px; height:300px">
|
|
||||||
function foo() {
|
|
||||||
var bar = true;
|
|
||||||
}
|
|
||||||
</textarea><br>
|
|
||||||
SourceUrl: <input id="srcURL" value="http://ajaxorg.github.com/ace/build/textarea/src/"></input>
|
|
||||||
|
|
||||||
<button id="buBuild">Build Link</button> <br> <a href="#"></a>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function inject() {
|
function inject() {
|
||||||
|
|
@ -73,7 +81,7 @@ function inject() {
|
||||||
load.scripts = {};
|
load.scripts = {};
|
||||||
window.__ace_shadowed_load__ = load;
|
window.__ace_shadowed_load__ = load;
|
||||||
|
|
||||||
load('ace.js', 'text!ace/css/editor.css', function() {
|
load('ace-uncompressed.js', 'text!ace/css/editor.css', function() {
|
||||||
var ace = window.__ace_shadowed__;
|
var ace = window.__ace_shadowed__;
|
||||||
ace.options.mode = "javascript";
|
ace.options.mode = "javascript";
|
||||||
var Event = ace.require('pilot/event');
|
var Event = ace.require('pilot/event');
|
||||||
|
|
|
||||||
230
build_support/style.css
Normal file
230
build_support/style.css
Normal file
|
|
@ -0,0 +1,230 @@
|
||||||
|
body {
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
background-color:#e6f5fc;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
H2, H3, H4 {
|
||||||
|
font-family:Trebuchet MS;
|
||||||
|
font-weight:bold;
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
H2 {
|
||||||
|
font-size:28px;
|
||||||
|
color:#263842;
|
||||||
|
padding-bottom:6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
H3 {
|
||||||
|
font-family:Trebuchet MS;
|
||||||
|
font-weight:bold;
|
||||||
|
font-size:22px;
|
||||||
|
color:#253741;
|
||||||
|
margin-top:43px;
|
||||||
|
margin-bottom:8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
H4 {
|
||||||
|
font-family:Trebuchet MS;
|
||||||
|
font-weight:bold;
|
||||||
|
font-size:21px;
|
||||||
|
color:#222222;
|
||||||
|
margin-bottom:4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
P {
|
||||||
|
padding:13px 0;
|
||||||
|
margin:0;
|
||||||
|
line-height:22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
UL{
|
||||||
|
line-height : 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
PRE{
|
||||||
|
background : #333;
|
||||||
|
color : white;
|
||||||
|
padding : 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
height : 227px;
|
||||||
|
position:relative;
|
||||||
|
overflow:hidden;
|
||||||
|
background: url(images/background.png) repeat-x 0 0;
|
||||||
|
border-bottom:1px solid #c9e8fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header .content .signature {
|
||||||
|
font-family:Trebuchet MS;
|
||||||
|
font-size:11px;
|
||||||
|
color:#ebe4d6;
|
||||||
|
position:absolute;
|
||||||
|
bottom:5px;
|
||||||
|
right:42px;
|
||||||
|
letter-spacing : 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
width:970px;
|
||||||
|
position:relative;
|
||||||
|
overflow:hidden;
|
||||||
|
margin:0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header .content {
|
||||||
|
height:184px;
|
||||||
|
margin-top:22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header .content .logo {
|
||||||
|
width : 282px;
|
||||||
|
height : 184px;
|
||||||
|
background:url(images/logo.png) no-repeat 0 0;
|
||||||
|
position:absolute;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header .content .title {
|
||||||
|
width : 605px;
|
||||||
|
height : 58px;
|
||||||
|
background:url(images/ace.png) no-repeat 0 0;
|
||||||
|
position:absolute;
|
||||||
|
top:98px;
|
||||||
|
left:329px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper {
|
||||||
|
background:url(images/body_background.png) repeat-x 0 0;
|
||||||
|
min-height:250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper .content {
|
||||||
|
font-family:Arial;
|
||||||
|
font-size:14px;
|
||||||
|
color:#222222;
|
||||||
|
width:1000px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper .content .column1 {
|
||||||
|
position:relative;
|
||||||
|
overflow:hidden;
|
||||||
|
float:left;
|
||||||
|
width:315px;
|
||||||
|
margin-right:31px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wrapper .content .column2 {
|
||||||
|
position:relative;
|
||||||
|
overflow:hidden;
|
||||||
|
float:left;
|
||||||
|
width:600px;
|
||||||
|
padding-top:47px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fork_on_github {
|
||||||
|
width:310px;
|
||||||
|
height:80px;
|
||||||
|
background:url(images/fork_on_github.png) no-repeat 0 0;
|
||||||
|
position:relative;
|
||||||
|
overflow:hidden;
|
||||||
|
margin-top:49px;
|
||||||
|
cursor:pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fork_on_github:hover {
|
||||||
|
background-position:0 -80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider {
|
||||||
|
height:3px;
|
||||||
|
background-color:#bedaea;
|
||||||
|
margin-bottom:3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu {
|
||||||
|
padding:23px 0 0 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
UL.content-list {
|
||||||
|
padding:15px;
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
UL.menu-list {
|
||||||
|
padding:0;
|
||||||
|
margin:0 0 20px 0;
|
||||||
|
list-style-type:none;
|
||||||
|
line-height : 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
UL.menu-list LI {
|
||||||
|
color:#2557b4;
|
||||||
|
font-family:Trebuchet MS;
|
||||||
|
font-size:14px;
|
||||||
|
padding:7px 0;
|
||||||
|
border-bottom:1px dotted #d6e2e7;
|
||||||
|
}
|
||||||
|
|
||||||
|
UL.menu-list LI:last-child {
|
||||||
|
border-bottom:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
A {
|
||||||
|
color:#2557b4;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
A:hover {
|
||||||
|
text-decoration:underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
P#first{
|
||||||
|
background : rgba(255,255,255,0.5);
|
||||||
|
padding : 20px;
|
||||||
|
font-size : 16px;
|
||||||
|
line-height : 24px;
|
||||||
|
margin : 0 0 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
height:40px;
|
||||||
|
position:relative;
|
||||||
|
overflow:hidden;
|
||||||
|
background:url(images/bottombar.png) repeat-x 0 0;
|
||||||
|
position:relative;
|
||||||
|
margin-top:40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
UL.menu-footer {
|
||||||
|
padding:0;
|
||||||
|
margin:8px 11px 0 0;
|
||||||
|
list-style-type:none;
|
||||||
|
float:right;
|
||||||
|
}
|
||||||
|
|
||||||
|
UL.menu-footer LI {
|
||||||
|
color:white;
|
||||||
|
font-family:Arial;
|
||||||
|
font-size:12px;
|
||||||
|
display:inline-block;
|
||||||
|
margin:0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
UL.menu-footer LI A {
|
||||||
|
color:#8dd0ff;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
UL.menu-footer LI A:hover {
|
||||||
|
text-decoration:underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue