添加编辑器图标

This commit is contained in:
fen
2013-10-18 22:25:19 +08:00
parent 8ac5bfe451
commit 990df82d80
23 changed files with 78 additions and 49 deletions
+33 -25
View File
@@ -440,6 +440,9 @@ button {
content: " *";
color: #B94A48; }
.typecho-option span {
margin-right: 15px; }
.typecho-option .description {
margin: .5em 0 0;
color: #999;
@@ -970,13 +973,18 @@ a.operate-reply {
/**
* icons
*/
.icon-sprite-hack {
background: url('../images/icons-s2ae04ce87c.png'); }
.i-edit, .i-delete, .i-caret-up, .i-caret-down, .i-exlink {
width: 16px;
height: 16px;
display: inline-block;
vertical-align: text-bottom;
background: url('../images/icons-s2ae04ce87c.png');
background: url(../images/icons.png) no-repeat; }
.i-edit:hover, .i-delete:hover, .i-caret-up:hover, .i-caret-down:hover, .i-exlink:hover {
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=75);
opacity: 0.75; }
.i-edit {
background-position: 0 -32px; }
@@ -1034,32 +1042,32 @@ a.operate-reply {
* Editor
*/
.editor {
margin-bottom: -0.5em;
font-size: .92857em; }
margin-bottom: -1em; }
.wmd-button-row {
list-style: none;
margin: 0;
padding: 0; }
.wmd-button-row li {
display: inline-block;
margin-right: 4px;
padding: 3px;
cursor: pointer; }
.wmd-button-row li:hover {
background-color: #E9E9E6; }
.wmd-button-row li.wmd-spacer {
height: 20px;
margin: 0 10px 0 6px;
padding: 3px 0;
width: 1px;
background: #E9E9E6;
cursor: default; }
.editor span {
display: inline-block;
padding: 0 12px;
height: 25px;
line-height: 25px;
cursor: pointer; }
.editor span:hover {
background-color: #E9E9E6; }
.editor span:active {
background-color: #467B96;
color: #FFF; }
.btnBold {
font-weight: bold; }
.btnItalic {
font-style: italic; }
.btnLink {
text-decoration: underline; }
.btnDel {
text-decoration: line-through; }
display: block;
width: 20px;
height: 20px;
background: transparent url(../images/editor.png) no-repeat; }
/**
* Jquery Timepicker
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

+1 -1
View File
@@ -63,7 +63,7 @@ $stat = Typecho_Widget::widget('Widget_Stat');
<td><a href="<?php $options->adminUrl('manage-comments.php?cid=' . $attachments->cid); ?>" class="balloon-button size-<?php echo Typecho_Common::splitByCount($attachments->commentsNum, 1, 10, 20, 50, 100); ?>"><?php $attachments->commentsNum(); ?></a></td>
<td>
<a class="typecho-mime typecho-mime-<?php echo $mime; ?>" href="<?php $options->adminUrl('media.php?cid=' . $attachments->cid); ?>"><?php $attachments->title(); ?></a>
<a class="right" href="<?php $attachments->permalink(); ?>"><i class="i-exlink" title="<?php _e('浏览 %s', $attachments->title); ?>"></i></a>
<a href="<?php $attachments->permalink(); ?>"><i class="i-exlink" title="<?php _e('浏览 %s', $attachments->title); ?>"></i></a>
</td>
<td><?php $attachments->author(); ?></td>
<td>
+1 -1
View File
@@ -60,7 +60,7 @@ include 'menu.php';
<tr id="mid-<?php $categories->theId(); ?>">
<td><input type="checkbox" value="<?php $categories->mid(); ?>" name="mid[]"/></td>
<td><a href="<?php echo $request->makeUriByRequest('mid=' . $categories->mid); ?>"><?php $categories->name(); ?></a>
<a class="right" href="<?php $categories->permalink(); ?>"><i class="i-exlink" title="<?php _e('浏览 %s', $categories->name); ?>"></i></a>
<a href="<?php $categories->permalink(); ?>"><i class="i-exlink" title="<?php _e('浏览 %s', $categories->name); ?>"></i></a>
</td>
<td><?php $categories->slug(); ?></td>
<td>
+1 -1
View File
@@ -73,7 +73,7 @@ $stat = Typecho_Widget::widget('Widget_Stat');
}
?>
<?php if ('page_draft' != $pages->type): ?>
<a class="right" href="<?php $pages->permalink(); ?>"><i class="i-exlink" title="<?php _e('浏览 %s', htmlspecialchars($pages->title)); ?>"></i></a>
<a href="<?php $pages->permalink(); ?>"><i class="i-exlink" title="<?php _e('浏览 %s', htmlspecialchars($pages->title)); ?>"></i></a>
<?php endif; ?>
</td>
<td><?php $pages->slug(); ?></td>
+1 -1
View File
@@ -82,7 +82,7 @@ $stat = Typecho_Widget::widget('Widget_Stat');
}
?>
<?php if ('post_draft' != $posts->type): ?>
<a class="right" href="<?php $posts->permalink(); ?>"><i class="i-exlink" title="<?php _e('浏览 %s', htmlspecialchars($posts->title)); ?>" /></i></a>
<a href="<?php $posts->permalink(); ?>"><i class="i-exlink" title="<?php _e('浏览 %s', htmlspecialchars($posts->title)); ?>" /></i></a>
<?php endif; ?>
</td>
<td><a href="<?php $options->adminUrl('manage-posts.php?uid=' . $posts->author->uid); ?>"><?php $posts->author(); ?></a></td>
+1 -1
View File
@@ -56,7 +56,7 @@ include 'menu.php';
<td><input type="checkbox" value="<?php $users->uid(); ?>" name="uid[]"/></td>
<td><a href="<?php $options->adminUrl('manage-posts.php?uid=' . $users->uid); ?>" class="balloon-button left size-<?php echo Typecho_Common::splitByCount($users->postsNum, 1, 10, 20, 50, 100); ?>"><?php $users->postsNum(); ?></a></td>
<td><a href="<?php $options->adminUrl('user.php?uid=' . $users->uid); ?>"><?php $users->name(); ?></a>
<a class="right" href="<?php $users->permalink(); ?>"><i class="i-exlink" title="<?php _e('浏览 %s', $users->screenName); ?>"></i></a>
<a href="<?php $users->permalink(); ?>"><i class="i-exlink" title="<?php _e('浏览 %s', $users->screenName); ?>"></i></a>
</td>
<td><?php $users->screenName(); ?></td>
<td><?php if($users->mail): ?><a href="mailto:<?php $users->mail(); ?>"><?php $users->mail(); ?></a><?php else: _e('暂无'); endif; ?></td>
+7 -1
View File
@@ -4,13 +4,19 @@
$icons: sprite-map("icons/*.png");
.icon-sprite-hack {
background: $icons;
}
%i-16 {
width: 16px;
height: 16px;
display: inline-block;
vertical-align: text-bottom;
background: $icons;
background: url(../images/icons.png) no-repeat;
&:hover {
@include opacity(0.75);
}
}
.i-edit {
+31 -16
View File
@@ -2,21 +2,36 @@
* Editor
*/
.editor {
margin-bottom: -0.5em;
font-size: .92857em;
margin-bottom: -1em;
}
.wmd-button-row {
list-style: none;
margin: 0;
padding: 0;
li {
display: inline-block;
margin-right: 4px;
padding: 3px;
cursor: pointer;
&:hover {
background-color: #E9E9E6;
}
&.wmd-spacer {
height: 20px;
margin: 0 10px 0 6px;
padding: 3px 0;
width: 1px;
background: #E9E9E6;
cursor: default;
}
}
}
.editor span {
display: inline-block;
padding: 0 12px;
height: 25px;
line-height: 25px;
cursor: pointer;
&:hover { background-color: #E9E9E6; }
&:active { background-color: #467B96; color: #FFF; }
}
.btnBold { font-weight: bold; }
.btnItalic { font-style: italic; }
.btnLink { text-decoration: underline; }
.btnDel { text-decoration: line-through; }
display: block;
width: 20px;
height: 20px;
background: transparent url(../images/editor.png) no-repeat;
}
+1 -1
View File
@@ -153,7 +153,7 @@ a.button:hover, a.balloon-button:hover {
}
.typecho-option label.typecho-label+input {
}
.typecho-option span { margin-right: 15px; }
.typecho-option .description {
margin: .5em 0 0;
color: #999;
+1 -1
View File
@@ -160,7 +160,7 @@ $(document).ready(function() {
<script src="<?php $options->adminUrl('js/markdown.js?v=' . $suffixVersion); ?>"></script>
<script>
$(document).ready(function () {
var toolbar = $('<p class="editor" id="wmd-button-bar" />').insertBefore($('#text').parent())
var toolbar = $('<div class="editor" id="wmd-button-bar" />').insertBefore($('#text').parent())
preview = $('<div id="wmd-preview" />').insertAfter('.submit');
var converter = new Showdown.converter(), options = {};