_on-edit.scss 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. body.on-edit {
  2. .navbar.navbar-static-top,
  3. .row.page-list,
  4. .row.page-comments-row,
  5. .row.page-attachments-row,
  6. footer {
  7. display: none;
  8. }
  9. /*
  10. padding: 0;
  11. position: fixed;
  12. z-index: 1050;
  13. background: #fff;
  14. top: 0;
  15. left: 0;
  16. height: 100%;
  17. width: 100%;
  18. .nav {
  19. margin-top: 8px;
  20. height: 40px;
  21. .dropdown-menu {
  22. z-index: 1060;
  23. }
  24. }
  25. .tab-content {
  26. top: 48px;
  27. bottom: 58px;
  28. position: absolute;
  29. z-index: 1051;
  30. left: 0;
  31. right: 0;
  32. margin-top: 4px;
  33. .alert-info.alert-moved,
  34. .alert-info.alert-unlinked {
  35. display: none;
  36. }
  37. // layout (height: 100%)
  38. .edit-form {
  39. height: 100%;
  40. > form {
  41. height: 100%;
  42. > #page-editor {
  43. height: 100%;
  44. .row, .col-md-6, .col-sm-12,
  45. .react-codemirror2, .CodeMirror, .CodeMirror-scroll,
  46. .page-editor-preview-body
  47. {
  48. height: 100%;
  49. }
  50. }
  51. }
  52. }
  53. }
  54. .page-form-setting {
  55. .extended-setting {
  56. label {
  57. margin-bottom: 0;
  58. }
  59. }
  60. }
  61. */
  62. .page-editor-editor-container {
  63. padding-right: 0;
  64. border-right: 1px solid #ccc;
  65. // override CodeMirror styles
  66. .CodeMirror {
  67. pre {
  68. font-family: $font-family-monospace-not-strictly;
  69. }
  70. .cm-matchhighlight {
  71. background-color: cyan;
  72. }
  73. .CodeMirror-selection-highlight-scrollbar {
  74. background-color: darkcyan;
  75. }
  76. }
  77. // for Dropzone
  78. .dropzone {
  79. @mixin insertFontAwesome($code) {
  80. &:before {
  81. margin-right: 0.2em;
  82. font-family: FontAwesome;
  83. content: $code;
  84. }
  85. }
  86. // default layout and style
  87. .dropzone-overlay {
  88. // layout
  89. display: flex;
  90. justify-content: center;
  91. align-items: center;
  92. // style
  93. margin: 0 15px;
  94. }
  95. .dropzone-overlay-content {
  96. font-size: 2em;
  97. padding: 0.2em;
  98. border-radius: 5px;
  99. }
  100. // unuploadable or rejected
  101. &.dropzone-unuploadable, &.dropzone-rejected {
  102. .dropzone-overlay {
  103. background: rgba(200,200,200,0.8);
  104. }
  105. .dropzone-overlay-content {
  106. color: #444;
  107. }
  108. }
  109. // uploading
  110. &.dropzone-uploading {
  111. .dropzone-overlay {
  112. background: rgba(255,255,255,0.5);
  113. }
  114. .dropzone-overlay-content {
  115. padding: 0.3em;
  116. background: rgba(200,200,200,0.5);
  117. color: #444;
  118. }
  119. }
  120. // unuploadable
  121. &.dropzone-unuploadable {
  122. .dropzone-overlay-content {
  123. // insert content
  124. @include insertFontAwesome("\f06a "); // fa-exclamation-circle
  125. &:after {
  126. content: "File uploading is disabled";
  127. }
  128. }
  129. }
  130. // uploadable
  131. &.dropzone-uploadable {
  132. // accepted
  133. &.dropzone-accepted:not(.dropzone-rejected) {
  134. .dropzone-overlay {
  135. border: 4px dashed #ccc;
  136. }
  137. .dropzone-overlay-content {
  138. // insert content
  139. @include insertFontAwesome("\f093"); // fa-upload
  140. &:after {
  141. content: "Drop here to upload";
  142. }
  143. // style
  144. color: #666;
  145. background: rgba(200,200,200,0.8);
  146. }
  147. }
  148. // file type mismatch
  149. &.dropzone-rejected:not(.dropzone-uploadablefile) .dropzone-overlay-content {
  150. // insert content
  151. @include insertFontAwesome("\f03e"); // fa-picture-o
  152. &:after {
  153. content: "Only an image file is allowed";
  154. }
  155. }
  156. // multiple files
  157. &.dropzone-accepted.dropzone-rejected .dropzone-overlay-content {
  158. // insert content
  159. @include insertFontAwesome("\f071"); // fa-fa-exclamation-triangle
  160. &:after {
  161. content: "Only 1 file is allowed";
  162. }
  163. }
  164. }
  165. } // end of.dropzone
  166. .btn-open-dropzone {
  167. font-size: small;
  168. text-align: right;
  169. padding-top: 3px;
  170. padding-bottom: 0;
  171. border: none;
  172. border-radius: 0;
  173. border-top: 1px dotted #ccc;
  174. background-color: transparent;
  175. &:active {
  176. box-shadow: none;
  177. }
  178. }
  179. }
  180. .page-editor-preview-container {
  181. }
  182. .page-editor-preview-body {
  183. padding-top: 18px;
  184. padding-right: 15px;
  185. overflow-y: scroll;
  186. }
  187. // .form-group.form-submit-group {
  188. // position: fixed;
  189. // z-index: 1054;
  190. // bottom: 0;
  191. // width: 100%;
  192. // left: 0;
  193. // padding: 8px;
  194. // min-height: 50px;
  195. // background: rgba(255,255,255,.8);
  196. // border-top: solid 1px #ccc;
  197. // margin-bottom: 0;
  198. // }
  199. #page-editor-options-selector {
  200. label {
  201. margin-right: 0.5em;
  202. }
  203. .btn-style-active-line, .btn-render-mathjax-in-realtime {
  204. &:hover:not(.active), &:focus:not(.active) {
  205. background-color: inherit;
  206. }
  207. }
  208. }
  209. @media (max-width: $screen-xs-max) { // {{{ less than smartphone size
  210. #page-editor-options-selector {
  211. display: none;
  212. }
  213. }
  214. } // }}}
  215. /*
  216. .crowi.main-container .main .page-list.content-main { // {{{ Edit Form of Page List
  217. .close-button {
  218. display: none;
  219. }
  220. }
  221. .crowi.main-container .main .page-list.content-main.on-edit { // {{{ Edit Form of Page List
  222. .close-button {
  223. display: block;
  224. }
  225. .page-list-container {
  226. display: none;
  227. }
  228. .portal-form-header {
  229. height: 16px;
  230. padding: 8px;
  231. border-bottom: solid 1px #ccc;
  232. }
  233. } // }}}
  234. */
  235. /*
  236. @media (max-width: $screen-sm-max) { // {{{ less than tablet size
  237. .content-main.on-edit {
  238. .form-group.form-submit-group {
  239. select.form-control {
  240. display: inline-block;
  241. max-width: 50%;
  242. }
  243. }
  244. }
  245. } // }}}
  246. @media (max-width: $screen-xs-max) { // {{{ less than smartphone size
  247. #edit-form-submit {
  248. float: right;
  249. }
  250. } // }}}
  251. */
  252. // overwrite .CodeMirror-hints
  253. .CodeMirror-hints {
  254. // FIXME: required because .content-main.on-edit has 'z-index:1050'
  255. // z-index: 1060 !important;
  256. max-height: 30em !important;
  257. .CodeMirror-hint.crowi-emoji-autocomplete {
  258. font-family: $font-family-monospace-not-strictly;
  259. line-height: 1.6em;
  260. .img-container {
  261. display: inline-block;
  262. width: 30px;
  263. }
  264. }
  265. // active line
  266. .CodeMirror-hint-active.crowi-emoji-autocomplete {
  267. .img-container {
  268. font-size: 15px; // adjust to .wiki
  269. padding-top: 0.3em;
  270. padding-bottom: 0.3em;
  271. }
  272. }
  273. }