_note.less 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. .gfm-render {
  2. font-size: 12px;
  3. -webkit-user-select: text;
  4. color: #333;
  5. line-height: 1.8em;
  6. blockquote, ul, table, p, pre, hr {
  7. margin: 1em 0;
  8. cursor: text;
  9. &:first-child:last-child {
  10. margin: 0;
  11. }
  12. }
  13. img {
  14. max-width: 100%;
  15. }
  16. a {
  17. color: blue;
  18. &:hover {
  19. color: red;
  20. }
  21. }
  22. blockquote {
  23. display: block;
  24. border-left: 4px solid #E4AD91;
  25. color: darken(#E4AD91, 10%);
  26. padding-left: 10px;
  27. font-style: italic;
  28. margin-left: 2em;
  29. }
  30. ul, ol {
  31. padding-left: 3em;
  32. }
  33. table {
  34. width: 100%;
  35. border-collapse: collapse;
  36. th, td {
  37. border: 1px solid #666;
  38. padding: 2px 4px;
  39. }
  40. th {
  41. background: rgba(45, 141, 234, 0.2);
  42. }
  43. tr:nth-child(even) td {
  44. background: rgba(45, 141, 234, 0.03);
  45. }
  46. margin: 1em 0;
  47. }
  48. em {
  49. color: red;
  50. }
  51. del {
  52. color: #999;
  53. }
  54. pre {
  55. background: rgba(45, 141, 234, 0.1);
  56. padding: 5px;
  57. border-radius: 5px;
  58. word-break: break-all;
  59. word-wrap: break-word;
  60. }
  61. code {
  62. background: rgba(45, 141, 234, 0.1);
  63. /* display: inline-block; */
  64. padding: 0 5px;
  65. border-radius: 3px;
  66. }
  67. pre code {
  68. background: none;
  69. }
  70. hr {
  71. border: none;
  72. border-top: 1px solid #CCC;
  73. }
  74. .highlight {
  75. background: yellow;
  76. color: red;
  77. }
  78. }
  79. #note-panel {
  80. width: 300px;
  81. border-left: 1px solid lighten(@ui-color, 50%);
  82. background: white;
  83. .dock(100px, 0, 0, auto);
  84. .tab {
  85. height: 30px;
  86. background: #EEE;
  87. font-size: 12px;
  88. line-height: 30px;
  89. padding: 0 10px;
  90. position: relative;
  91. a.edit-tab, a.preview-tab {
  92. display: inline-block;
  93. padding: 0 10px;
  94. height: 24px;
  95. line-height: 24px;
  96. vertical-align: bottom;
  97. margin-right: 5px;
  98. border-radius: 3px 3px 0 0;
  99. &:hover {
  100. background: rgba(255, 255, 255, 0.5);
  101. }
  102. &.active-tab {
  103. background: white;
  104. }
  105. }
  106. a.help {
  107. position: absolute;
  108. right: 10px;
  109. height: 30px;
  110. line-height: 30px;
  111. top: 0;
  112. }
  113. }
  114. .note-editor {
  115. .dock(60px, 0, 0);
  116. padding: 5px;
  117. -webkit-user-select: text;
  118. .CodeMirror {
  119. cursor: text;
  120. font-size: 14px;
  121. line-height: 1.3em;
  122. font-family: consolas;
  123. }
  124. }
  125. .note-preview {
  126. .dock(60px, 0, 0);
  127. padding: 10px;
  128. -webkit-user-select: text;
  129. overflow-x: hidden;
  130. overflow-y: auto;
  131. .gfm-render;
  132. }
  133. .close {
  134. .close-button;
  135. position: absolute;
  136. right: 5px;
  137. top: 6px;
  138. }
  139. &[disabled] {
  140. &:after {
  141. content: ' ';
  142. display: block;
  143. .dock(20px, 0, 0);
  144. background: rgba(100, 100, 100, .1);
  145. }
  146. }
  147. & > h2 {
  148. font-size: 12px;
  149. margin: 0;
  150. font-weight: normal;
  151. background: lighten(@ui-color, 30%);
  152. color: @ui-fore;
  153. padding: 5px 10px;
  154. height: 20px;
  155. line-height: 20px;
  156. }
  157. }
  158. #note-previewer {
  159. position: absolute;
  160. background: #FFD;
  161. padding: 5px 15px;
  162. border-radius: 5px;
  163. max-width: 400px;
  164. max-height: 200px;
  165. overflow: auto;
  166. z-index: 10;
  167. box-shadow: 0 0 15px rgba(0, 0, 0, .5);
  168. .gfm-render;
  169. }
  170. #content-wrapper.note-panel-visible #kityminder {
  171. right: 300px;
  172. }
  173. #tab-container.collapsed + #kityminder + #note-panel {
  174. top: 40px;
  175. }