editor.less 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. @import "./editor/file-tree.less";
  2. @import "./editor/history.less";
  3. @import "./editor/toolbar.less";
  4. @import "./editor/left-menu.less";
  5. @import "./editor/pdf.less";
  6. @import "./editor/enago.less";
  7. @import "./editor/share.less";
  8. @import "./editor/chat.less";
  9. @import "./editor/binary-file.less";
  10. @import "./editor/search.less";
  11. @import "./editor/publish-template.less";
  12. @import "./editor/online-users.less";
  13. @import "./editor/hotkeys.less";
  14. @import "./editor/review-panel.less";
  15. @import "./editor/feature-onboarding.less";
  16. .full-size {
  17. position: absolute;
  18. top: 0;
  19. bottom: 0;
  20. left: 0;
  21. right: 0;
  22. }
  23. .global-alerts {
  24. position: absolute;
  25. z-index: 20;
  26. top: 2px;
  27. width: 400px;
  28. left: 50%;
  29. margin-left: -200px;
  30. .alert {
  31. padding: (@line-height-computed / 4);
  32. font-size: 14px;
  33. margin-bottom: (@line-height-computed / 4);
  34. }
  35. }
  36. #ide-body {
  37. .full-size;
  38. top: 40px;
  39. }
  40. #editor {
  41. .full-size;
  42. }
  43. .loading-screen {
  44. h3 {
  45. padding-top: 136px;
  46. background-image: url(/img/lion-128.png);
  47. background-repeat: no-repeat;
  48. background-position: top center;
  49. }
  50. .full-size;
  51. background-color: #fafafa;
  52. .container {
  53. text-align: center;
  54. position: absolute;
  55. top: 50%;
  56. left: 50%;
  57. width: 400px;
  58. margin-left: -200px;
  59. margin-top: -200px;
  60. }
  61. }
  62. .loading-panel {
  63. .full-size;
  64. padding-top: 10rem;
  65. font-family: @font-family-serif;
  66. text-align: center;
  67. background-color: #fafafa;
  68. }
  69. .error-panel {
  70. .full-size;
  71. padding: @line-height-computed;
  72. background-color: #fafafa;
  73. .alert {
  74. max-width: 400px;
  75. margin: auto;
  76. }
  77. }
  78. .project-name {
  79. .name {
  80. display: inline-block;
  81. max-width: 250px;
  82. overflow: hidden;
  83. text-overflow: ellipsis;
  84. vertical-align: top;
  85. padding: 6px;
  86. color: @gray;
  87. font-weight: 700;
  88. white-space: nowrap;
  89. }
  90. input {
  91. height: 30px;
  92. margin-top: 4px;
  93. text-align: center;
  94. padding: 6px;
  95. font-weight: 700;
  96. }
  97. a.rename {
  98. visibility: hidden;
  99. display: inline-block;
  100. color: @gray-light;
  101. padding: 5px;
  102. border-radius: @border-radius-small;
  103. &:hover {
  104. text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  105. color: @gray-dark;
  106. text-decoration: none;
  107. }
  108. }
  109. &:hover {
  110. a.rename {
  111. visibility: visible;
  112. }
  113. }
  114. }
  115. // The internal components of the aceEditor directive
  116. .ace-editor-wrapper {
  117. .full-size;
  118. .undo-conflict-warning {
  119. position: absolute;
  120. top: 0;
  121. right: 0;
  122. left: 0;
  123. z-index: 10;
  124. }
  125. .ace-editor-body {
  126. width: 100%;
  127. height: 100%;
  128. }
  129. .spelling-highlight {
  130. position: absolute;
  131. background-image: url(/img/spellcheck-underline.png);
  132. @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  133. background-image: url(/img/spellcheck-underline@2x.png);
  134. background-size: 5px 4px;
  135. }
  136. background-repeat: repeat-x;
  137. background-position: bottom left;
  138. }
  139. .remote-cursor {
  140. position: absolute;
  141. border-left: 2px solid transparent;
  142. .nubbin {
  143. height: 5px;
  144. width: 5px;
  145. position: absolute;
  146. left: -2px;
  147. }
  148. }
  149. .annotation-label {
  150. padding: (@line-height-computed / 4) (@line-height-computed / 2);
  151. font-size: 0.8rem;
  152. z-index: 100;
  153. font-family: @font-family-sans-serif;
  154. color: white;
  155. font-weight: 700;
  156. white-space: nowrap;
  157. }
  158. .annotation {
  159. position: absolute;
  160. z-index: 2;
  161. }
  162. .highlights-before-label, .highlights-after-label {
  163. position: absolute;
  164. right: @line-height-computed;
  165. z-index: 1;
  166. }
  167. .highlights-before-label {
  168. top: @line-height-computed / 2;
  169. }
  170. .highlights-after-label {
  171. bottom: @line-height-computed / 2;
  172. }
  173. }
  174. // Hack to solve an issue where scrollbars aren't visible in Safari.
  175. // Safari seems to clip part of the scrollbar element. By giving the
  176. // element a background, we're telling Safari that it *really* needs to
  177. // paint the whole area. See https://github.com/ajaxorg/ace/issues/2872
  178. .ace_scrollbar-inner {
  179. background-color: #FFF;
  180. opacity: 0.01;
  181. .ace_dark & {
  182. background-color: #000;
  183. }
  184. }
  185. .ui-layout-resizer {
  186. width: 6px;
  187. background-color: #f4f4f4;
  188. border-left: 1px solid @toolbar-border-color;
  189. border-right: 1px solid @toolbar-border-color;
  190. .ui-layout-toggler {
  191. color: #999;
  192. font-family: FontAwesome;
  193. font-style: normal;
  194. font-weight: normal;
  195. line-height: 1;
  196. -webkit-font-smoothing: antialiased;
  197. -moz-osx-font-smoothing: grayscale;
  198. font-size: 16px !important;
  199. line-height: 50px;
  200. &:hover {
  201. background-color: #ddd;
  202. color: #333;
  203. }
  204. }
  205. }
  206. .ui-layout-resizer-west.ui-layout-resizer-open, .ui-layout-resizer-east.ui-layout-resizer-closed {
  207. .ui-layout-toggler {
  208. &:before {
  209. content: "\f104"
  210. }
  211. }
  212. }
  213. .ui-layout-resizer-east.ui-layout-resizer-open, .ui-layout-resizer-west.ui-layout-resizer-closed {
  214. .ui-layout-toggler {
  215. &:before {
  216. content: "\f105"
  217. }
  218. }
  219. }
  220. .ui-layout-resizer-dragging {
  221. background-color: #ddd;
  222. }
  223. .context-menu {
  224. position: fixed;
  225. z-index: 100;
  226. }
  227. .editor-dark {
  228. color: @gray-lighter;
  229. background-color: @editor-dark-background-color;
  230. .ui-layout-resizer {
  231. background-color: darken(@editor-dark-background-color, 10%);
  232. border: none;
  233. }
  234. .btn-default {
  235. color: white;
  236. background-color: @gray;
  237. border-color: darken(@gray-dark, 10%);
  238. &:hover {
  239. background-color: darken(@gray, 5%);
  240. border-color: darken(@gray-dark, 20%);
  241. }
  242. }
  243. }
  244. .modal-alert {
  245. margin-top:10px;
  246. margin-bottom:0px;
  247. }
  248. // vertically centre the "connection down" modal so it does not hide
  249. // the reconnecting indicator
  250. .modal.lock-editor-modal {
  251. display: flex !important;
  252. .modal-dialog {
  253. margin: auto;
  254. }
  255. }
  256. .sl_references_search_hint-varDefault {
  257. position: absolute;
  258. bottom: -22px;
  259. left: -1px;
  260. right: 0px;
  261. text-align: center;
  262. padding: 2px;
  263. background: rgb(202, 214, 250);
  264. border: 1px solid lightgray;
  265. box-shadow: 3px 3px 5px rgba(0,0,0,.2);
  266. span {
  267. color: black;
  268. }
  269. }
  270. .sl_references_search_hint-varButton {
  271. position: absolute;
  272. bottom: -65px;
  273. left: -1px;
  274. right: 0px;
  275. padding: 0 6px 6px;
  276. text-align: center;
  277. background: #fbfbfb;
  278. color: #FFF;
  279. box-shadow: 3px 3px 5px rgba(0,0,0,.2);
  280. border-left: 1px solid lightgray;
  281. font-family: @font-family-sans-serif;
  282. font-size: 13px;
  283. font-weight: 600;
  284. hr {
  285. margin: 6px -6px;
  286. }
  287. button {
  288. width: 100%;
  289. font-size: inherit;
  290. line-height: 1.4;
  291. }
  292. span {
  293. padding-left: 10px;
  294. }
  295. kbd {
  296. display: block;
  297. font-family: inherit;
  298. font-size: 12px;
  299. font-weight: normal;
  300. }
  301. }
  302. // -- References Search Modal --
  303. .references-search-modal-backdrop {
  304. // don't grey out the editor when the
  305. // modal is active
  306. background-color: transparent;
  307. }
  308. .references-search-modal {
  309. // upgrade prompt
  310. .references-search-upgrade-prompt {
  311. padding: 24px;
  312. padding-bottom: 48px;
  313. .upgrade-prompt {
  314. text-align: center;
  315. width: 400px;
  316. padding-top: 14px;
  317. padding-bottom: 14px;
  318. padding-left: 38px;
  319. padding-right: 38px;
  320. margin: auto;
  321. background: white;
  322. opacity: 0.95;
  323. border-radius: 8px;
  324. .message {
  325. margin-top: 15px;
  326. &.call-to-action {
  327. font-weight: bold;
  328. }
  329. ul.list-unstyled {
  330. text-align: left;
  331. }
  332. }
  333. a.btn {
  334. opacity: 1.0;
  335. }
  336. }
  337. }
  338. .search-form {
  339. // position the spinner inside the input element
  340. i.fa-spinner {
  341. margin-top: -30px;
  342. }
  343. }
  344. .alert-danger {
  345. margin-top: 12px;
  346. margin-bottom: 0px;
  347. }
  348. // search result items list
  349. .search-results {
  350. font-size: 12px;
  351. .no-results-message {
  352. font-size: 16px;
  353. }
  354. .search-result-hit {
  355. &:hover {
  356. cursor: pointer;
  357. }
  358. border-bottom: 1px solid #ddd;
  359. padding: 8px;
  360. &:last-child {
  361. border-bottom: 1px solid transparent;
  362. }
  363. border-left: 4px solid transparent;
  364. &.selected-search-result-hit {
  365. background-color: @red;
  366. color: white;
  367. .hit-year.small {
  368. color: white;
  369. }
  370. .hit-journal.small {
  371. color: white;
  372. }
  373. }
  374. .hit-title {
  375. font-size: 1.3em;
  376. font-style: italic;
  377. }
  378. }
  379. }
  380. }
  381. .referencesImportModal {
  382. .referencesImportPreview {
  383. margin-top: 15px;
  384. .referencesImportPreviewScroller {
  385. font-family: monospace;
  386. font-size: 0.8em;
  387. max-height: 360px;
  388. overflow: scroll;
  389. white-space: pre;
  390. padding: 8px 12px;
  391. margin-bottom: 15px;
  392. border: 1px solid @gray-lighter;
  393. background-color: @gray-lightest;
  394. }
  395. }
  396. }
  397. .teaser-title,
  398. .dropbox-teaser-title {
  399. margin-top: 0;
  400. text-align: center;
  401. }
  402. .teaser-img,
  403. .dropbox-teaser-img {
  404. .img-responsive;
  405. margin-bottom: 5px;
  406. }
  407. .teaser-video-container,
  408. .dropbox-teaser-video-container {
  409. margin-top: -@modal-inner-padding;
  410. margin-left: -@modal-inner-padding;
  411. margin-right: -@modal-inner-padding;
  412. margin-bottom: 5px;
  413. overflow: hidden;
  414. }
  415. .teaser-video,
  416. .dropbox-teaser-video {
  417. width: 100%;
  418. height: auto;
  419. border-bottom: 1px solid @modal-header-border-color;
  420. }