Update icons
This commit is contained in:
parent
09645f2447
commit
1476883aee
32
css/main.css
32
css/main.css
@ -27,23 +27,18 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wmd-button-row {
|
.wmd-button-row {
|
||||||
margin: 10px 30px;
|
margin: 10px;
|
||||||
top: 10px;
|
|
||||||
left: 30px;
|
|
||||||
padding: 0px;
|
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wmd-spacer {
|
.wmd-spacer {
|
||||||
width: 1px;
|
|
||||||
height: 20px;
|
|
||||||
margin: 0 7px;
|
margin: 0 7px;
|
||||||
background-color: Silver;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
list-style: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
.wmd-button {
|
.wmd-button {
|
||||||
|
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
@ -52,7 +47,7 @@ body {
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
.wmd-button>span {
|
.wmd-button>span {
|
||||||
background-image: url(../img/wmd-buttons.png);
|
background-image: url(../img/wmd-buttons.png);
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
@ -60,7 +55,7 @@ body {
|
|||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: 1px solid #e3e3e3;
|
border: 1px solid #f2f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wmd-prompt-background {
|
.wmd-prompt-background {
|
||||||
@ -88,3 +83,20 @@ body {
|
|||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-code {
|
||||||
|
background-position: -384px -168px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-numbered-list {
|
||||||
|
background-position: -408px -168px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-hr {
|
||||||
|
background-position: -432px -168px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-undo {
|
||||||
|
background-position: -456px -168px;
|
||||||
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 22 KiB |
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 39 KiB |
32
index.html
32
index.html
@ -39,29 +39,33 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="navbar" class="navbar navbar-fixed-top">
|
<div id="navbar" class="navbar navbar-fixed-top">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div id="wmd-button-bar" class="nav"></div>
|
|
||||||
|
<ul class="nav">
|
||||||
|
<li class="divider-vertical"></li>
|
||||||
|
<li><div id="wmd-button-bar"></div></li>
|
||||||
|
</ul>
|
||||||
<ul class="nav pull-right">
|
<ul class="nav pull-right">
|
||||||
<li>
|
<li><a class="brand" id="file-title" href="javascript:void(0);" title="Rename"><span></span></a></li>
|
||||||
<a class="brand pull-right" id="file-title" href="javascript:void(0);"></a>
|
<li class="navbar-form"><input id="file-title-input"
|
||||||
</li>
|
type="text" class="span3" placeholder="File title" /></li>
|
||||||
<li class="navbar-form">
|
|
||||||
<input id="file-title-input" type="text" class="span3" placeholder="File title" />
|
|
||||||
</li>
|
|
||||||
<li class="dropdown"><a class="dropdown-toggle"
|
<li class="dropdown"><a class="dropdown-toggle"
|
||||||
data-toggle="dropdown" href="#"><b class="caret"></b></a>
|
data-toggle="dropdown" href="#" title="Open file"><i
|
||||||
|
class="icon-folder-open"></i></a>
|
||||||
<ul id="file-selector" class="dropdown-menu">
|
<ul id="file-selector" class="dropdown-menu">
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li class="divider-vertical"></li>
|
<li class="divider-vertical"></li>
|
||||||
<li class="dropdown"><a class="dropdown-toggle"
|
<li class="dropdown"><a class="dropdown-toggle"
|
||||||
data-toggle="dropdown" href="#"><img src="img/stackedit-16.png" />
|
data-toggle="dropdown" href="#" title="Menu"><img src="img/stackedit-16.png" />
|
||||||
Menu <b class="caret"></b></a>
|
Menu <b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<li><a id="new-file" href="javascript:void(0);"><i class="icon-file"></i> New file</a></li>
|
<li><a id="new-file" href="javascript:void(0);" title="Create a new local file"><i
|
||||||
<li><a id="remove-file" href="javascript:void(0);"><i class="icon-trash"></i> Remove file</a></li>
|
class="icon-file"></i> New file</a></li>
|
||||||
<li><a id="drive-link" href="javascript:void(0);"><i class="icon-magnet"></i> Link
|
<li><a id="remove-file" href="javascript:void(0);" title="Delete the current file locally"><i
|
||||||
with Google Drive</a></li>
|
class="icon-trash"></i> Remove file</a></li>
|
||||||
|
<li><a id="drive-link" href="javascript:void(0);"><i
|
||||||
|
class="icon-magnet"></i> Link with Google Drive</a></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li class="divider-vertical"></li>
|
<li class="divider-vertical"></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1412,10 +1412,12 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
button.className = button.className.replace(/ disabled/g, "");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
image.style.backgroundPosition = button.XShift + " " + disabledYShift;
|
image.style.backgroundPosition = button.XShift + " " + disabledYShift;
|
||||||
button.onmouseover = button.onmouseout = button.onclick = function () { };
|
button.onmouseover = button.onmouseout = button.onclick = function () { };
|
||||||
|
button.className += " disabled";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
32
js/main.js
32
js/main.js
@ -58,13 +58,13 @@ var fileManager = (function($) {
|
|||||||
// Update the editor and the file title
|
// Update the editor and the file title
|
||||||
var fileIndex = localStorage["file.current"];
|
var fileIndex = localStorage["file.current"];
|
||||||
$("#wmd-input").val(localStorage[fileIndex + ".content"]);
|
$("#wmd-input").val(localStorage[fileIndex + ".content"]);
|
||||||
editor.refreshPreview();
|
createEditor();
|
||||||
this.updateFileTitleUI();
|
this.updateFileTitleUI();
|
||||||
};
|
};
|
||||||
|
|
||||||
fileManager.createFile = function(title) {
|
fileManager.createFile = function(title) {
|
||||||
if(!title) {
|
if(!title) {
|
||||||
title = "New file";
|
title = "Filename";
|
||||||
}
|
}
|
||||||
var fileIndex = "file." + parseInt(localStorage["file.count"]);
|
var fileIndex = "file." + parseInt(localStorage["file.count"]);
|
||||||
localStorage[fileIndex + ".title"] = title;
|
localStorage[fileIndex + ".title"] = title;
|
||||||
@ -90,7 +90,7 @@ var fileManager = (function($) {
|
|||||||
// Update the editor and the file title
|
// Update the editor and the file title
|
||||||
var fileIndex = localStorage["file.current"];
|
var fileIndex = localStorage["file.current"];
|
||||||
var title = localStorage[fileIndex + ".title"];
|
var title = localStorage[fileIndex + ".title"];
|
||||||
$("#file-title").text(title);
|
$("#file-title > span").text(title);
|
||||||
$("#file-title-input").val(title);
|
$("#file-title-input").val(title);
|
||||||
$("#file-selector").empty();
|
$("#file-selector").empty();
|
||||||
for(var i=0; i<this.fileTitleList.length; i++) {
|
for(var i=0; i<this.fileTitleList.length; i++) {
|
||||||
@ -195,15 +195,31 @@ var gdrive = (function($) {
|
|||||||
return gdrive;
|
return gdrive;
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
var converter;
|
function createEditor() {
|
||||||
var editor;
|
$("#wmd-button-bar").empty();
|
||||||
|
var converter = Markdown.getSanitizingConverter();
|
||||||
|
var editor = new Markdown.Editor(converter);
|
||||||
|
editor.run();
|
||||||
|
|
||||||
|
$(".wmd-button-row").addClass("btn-group").find("li:not(.wmd-spacer)").addClass("btn").css({"left": 0,}).find("span").hide();
|
||||||
|
$("#wmd-bold-button").append($("<i>").addClass("icon-bold"));
|
||||||
|
$("#wmd-italic-button").append($("<i>").addClass("icon-italic"));
|
||||||
|
$("#wmd-link-button").append($("<i>").addClass("icon-globe"));
|
||||||
|
$("#wmd-quote-button").append($("<i>").addClass("icon-indent-left"));
|
||||||
|
$("#wmd-code-button").append($("<i>").addClass("icon-code"));
|
||||||
|
$("#wmd-image-button").append($("<i>").addClass("icon-picture"));
|
||||||
|
$("#wmd-olist-button").append($("<i>").addClass("icon-numbered-list"));
|
||||||
|
$("#wmd-ulist-button").append($("<i>").addClass("icon-list"));
|
||||||
|
$("#wmd-heading-button").append($("<i>").addClass("icon-text-height"));
|
||||||
|
$("#wmd-hr-button").append($("<i>").addClass("icon-hr"));
|
||||||
|
$("#wmd-undo-button").append($("<i>").addClass("icon-undo"));
|
||||||
|
$("#wmd-redo-button").append($("<i>").addClass("icon-share-alt"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
(function($) {
|
(function($) {
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
converter = Markdown.getSanitizingConverter();
|
|
||||||
editor = new Markdown.Editor(converter);
|
|
||||||
editor.run();
|
|
||||||
|
|
||||||
$(window).resize(resize);
|
$(window).resize(resize);
|
||||||
resize();
|
resize();
|
||||||
|
Loading…
Reference in New Issue
Block a user