markdown editor v2

This commit is contained in:
lealife
2015-11-22 22:33:07 +08:00
parent ce491e62c3
commit 6a753682b7
30 changed files with 19369 additions and 2315 deletions

View File

@ -17,162 +17,21 @@
@selectionBg: @aBlackColor;
@selectionColor: #fff;
::selection { background:@selectionBg; color:@selectionColor; }
::-moz-selection { background:@selectionBg; color:@selectionColor; }
::-webkit-selection { background:@selectionBg; color:@selectionColor; }
.new-note {
background-color: #eee; // #50A361;
border: 1px solid transparent;
&, a {
color: #000;
}
&:hover {
background: #E0E0E0;
&, a {
color: #000;
}
}
}
// header
@headerTextColor: #000;
@headerAColor: #000;
@switcherBgColor: #fff;
@logoColor: #fff;
a {
color: @aBlackColor;
cursor: pointer;
}
@searchNoteInputBorder: 1px solid @borderColor;
@searchNoteInputBgColor: #fff;
@searchNoteInputTextColor: #000;
a:hover {
text-decoration: none !important;
color: @aBlackColor;
}
// 原生的a
a.raw {
color: #428bca;
}
a.raw:hover {
color: #2a6496;
}
/* header */
#header {
height: @headerHeight;
background-color: @headerBgColor;
color: @aWhiteColor;
border-bottom: 1px solid @borderColor;
/* for app */
webkit-user-select: none; /* 还不知 */
-webkit-app-region: drag; /* -webkit-app-region: no-drag; */
}
#header {
color: @aBlackColor;
}
#logo, #logo span {
line-height: 50px;// @headerHeight;
}
#logo {
width: 140px;
height: @headerHeight;
//background-color: #41586e; // #374b5e; // #65bd77;
padding-left: 10px;
padding-top: 0px;
border-bottom: 1px solid transparent;
border-color: rgba(255, 255, 255, 0.1);
//color: #ccc;
}
#logo span {
background-color: #000;
color: #fff;
border-radius: 10px;
display: inline-block;
padding: 4px 0;//4px 3px 4px 3px;
line-height: 1.0;
}
#switcher {
line-height: 50px;//@headerHeight;
padding-top: 6px;
padding-right: 5px;
width: 30px;
text-align: center;
i {
font-size: 16px;
cursor: pointer;
&:hover {
color: @hColor;
}
}
span {
border-radius: 5px;
cursor: pointer;
font-size: 18px;
&:hover {
color: @hColor;
}
}
}
#searchNote {
padding-left: 0;
line-height: 60px;
margin:0;
input {
background-size: 18px 13px;
border-color: @borderColor;
padding-left: 14px;
height: 30px;
width: 250px;
line-height: 20px;
box-shadow: none;
&:focus {
outline: none !important;
border-color: @hColor;
box-shadow: none;
}
}
}
#header ul {
margin:0;
padding:0;
list-style: none;
}
#header ul li.dropdown {
display: inline-block;
height: @headerHeight;
}
#header ul > li > a.dropdown-toggle {
display: block;
// 这里必须要有padding-top, 不然不会垂直居中, 悲剧
// li 限制了60px, 所以下拉的top还和之前一样
padding: 15px 5px 0 0;
position: relative;
// -webkit-transition: all 0.3s;
// -moz-transition: all 0.3s;
// transition: all 0.3s;
}
#header span.icon {
display: inline-block;
font-size: 28px;
color: #999999;
}
.dropdown-menu {
// border: 1px solid @hColor;
}
.dropdown-menu li > a {
color: @aBlackColor;
}
.dropdown-menu li:hover, .dropdown-menu li:focus {
background-color: @borderColor;
}
.dropdown-menu li > a:hover, .dropdown-menu li > a:focus {
background-color: @borderColor;
}
@newNoteBgColor: #eee;
@newNoteBgColorHover: #E0E0E0;
@newNoteBorder: 1px solid transparent;
@newNoteTextColor: #000;
/*********************/
#page {
@ -525,222 +384,9 @@ a.raw:hover {
left: 0;
overflow: auto; // 不设置editor隐藏时没有scroll
}
#editorContent_ifr {
}
/* 包裹iframe */
#editor .mce-ifr {
border: none;
// padding: 10px;
overflow: hidden !important; /*不知道哪里设置了auto*/
/*border-radius: 5px;*/
// border: 1px solid @borderColor;
// border-top-left-radius: 5px;
// border-bottom-left-radius: 5px;
//padding-left: 5px;
//margin-right: 3px;
}
/* 最顶层 */
#editor .mce-tinymce {
border: none;
}
#editor iframe {
}
/*编辑器按钮*/
#mceToolbar, #wmd-button-bar {
position: relative;
height: 30px;
overflow: hidden;
border-bottom: 1px solid #ccc;
background-color: #f0f0f0;
}
/* 编辑器工具 需要important, 因为mce还要有js加载css, 肯定在此之后 */
/*加高, 之前显得拥挤*/
.mce-btn-small button {
padding: 5px 5px !important;
line-height: 20px !important;
}
.mce-foot .mce-btn {
border-radius: 3px;
}
.mce-menubtn.mce-btn-small span {
line-height: 20px !important;
}
.mce-btn span {
font-family: @fontFamily !important;
}
.mce-primary button, .mce-primary button i {
text-shadow: none;
}
.mce-primary {
background-color: #47a447 !important;
border: none !important;
}
.mce-menu-item:hover, .mce-menu-item.mce-selected, .mce-menu-item:focus {
background-color: @borderColor;
span {
color: #000 !important;
}
}
// 下拉选中
.mce-menu-item-normal.mce-active {
background-color: @borderColor;
}
// tool的分隔
.tool-split {
display: inline-block;
line-height: 25px;
color: #ddd;
}
/*标签与其它工具*/
/* tag */
#addTagInput {
line-height: 25px;
display: none;
padding:0;
border: none;
background-color: @bgColor;
}
#addTagInput:focus {
outline: none;
}
.label-default {
background-color: #464C5E;
}
.label-red {
background-color: #d9534f;
}
.label-yellow {
background-color: #f0ad4e;
}
.label-blue {
background-color: #428bca;
}
.label-green {
background-color: #5cb85c;
}
.label {
border-radius: 0;
font-weight: normal;
}
.label i {
width: 10px;
cursor: pointer;
font-style: normal;
/*border-left: 1px solid #ccc;*/
display: inline-block;
padding-left: 3px;
opacity: 0;
}
.label i:hover {
opacity: 1;
// font-weight: bold;
}
@sbc: @bgColor;
/*
::-webkit-scrollbar {
width: 5px;
height: 8px;
background-color: @sbc;
}
::-webkit-scrollbar-thumb {
background-color: @sbc;
border:1px solid #dadada;
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background-color:#dadada
}
::-webkit-scrollbar-thumb:active {
background-color:#606060
}
::-webkit-scrollbar-thumb:disabled {
background-color:#f9f9f9
}
::-webkit-scrollbar-corner {
background-color:#f0f0f0
}
::-webkit-scrollbar-button {
height: 0;
background-color:#f0f0f0;
background-repeat:no-repeat
}
::-webkit-scrollbar-button:vertical {
height:0px
}
::-webkit-scrollbar-button:horizontal {
width:33px
}
::-webkit-scrollbar-button:horizontal:increment {
background-position:0 -444px
}
::-webkit-scrollbar-button:horizontal:decrement {
background-position:12px -425px
}
::-webkit-scrollbar-button:vertical:increment {
background-position:-1px -391px
}
::-webkit-scrollbar-button:vertical:decrement {
background-position:-1px -358px
}
::-webkit-scrollbar-button:hover {
background-color:#dadada
}
::-webkit-scrollbar-button:horizontal:increment:hover {
background-position:0 -548px
}
::-webkit-scrollbar-button:horizontal:decrement:hover {
background-position:12px -529px
}
::-webkit-scrollbar-button:vertical:increment:hover {
background-position:-1px -495px
}
::-webkit-scrollbar-button:vertical:decrement:hover {
background-position:-1px -462px
}
::-webkit-scrollbar-button:active {
background-color:#606060
}
::-webkit-scrollbar-button:horizontal:increment:active {
background-position:0 -652px
}
::-webkit-scrollbar-button:horizontal:decrement:active {
background-position:12px -633px
}
::-webkit-scrollbar-button:vertical:increment:active {
background-position:-1px -599px
}
::-webkit-scrollbar-button:vertical:decrement:active {
background-position:-1px -566px
}
::-webkit-scrollbar-button:disabled {
background-color:#f9f9f9
}
::-webkit-scrollbar-button:horizontal:increment:disabled {
background-position:0 -756px
}
::-webkit-scrollbar-button:horizontal:decrement:disabled {
background-position:12px -737px
}
::-webkit-scrollbar-button:vertical:increment:disabled {
background-position:-1px -703px
}
::-webkit-scrollbar-button:vertical:decrement:disabled {
background-position:-1px -670px
}
*/
#editorContent_ifr {
// border: 1px solid red;
}
.fa-calendar {
color: #666;
}
@ -761,12 +407,6 @@ background-position:-1px -670px
padding: 5px 0 0 0;
}
.mce-container-body iframe {
//overflow-x: hidden;
//overflow-y: hidden;
}
// 新建笔记item
#notebookNavForNewNote li, #notebookNavForNewSharedNote > li {
padding-left: 0;