_form.scss 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. // import crowi variable
  2. @import 'utilities';
  3. .crowi.main-container .main .content-main.on-edit { // {{{ Edit Form of Page
  4. padding: 0;
  5. position: fixed;
  6. z-index: 1050;
  7. background: #fff;
  8. top: 0;
  9. left: 0;
  10. height: 100%;
  11. width: 100%;
  12. .nav {
  13. margin-top: 8px;
  14. height: 40px;
  15. .dropdown-menu {
  16. z-index: 1060;
  17. }
  18. }
  19. .tab-content {
  20. top: 48px;
  21. bottom: 58px;
  22. position: absolute;
  23. z-index: 1051;
  24. left: 0;
  25. right: 0;
  26. margin-top: 4px;
  27. .alert-info.alert-moved,
  28. .alert-info.alert-unlinked {
  29. display: none;
  30. }
  31. // layout (height: 100%)
  32. .edit-form {
  33. height: 100%;
  34. > form {
  35. height: 100%;
  36. > #page-editor {
  37. height: 100%;
  38. .row, .col-md-6, .col-sm-12,
  39. .react-codemirror2, .CodeMirror, .CodeMirror-scroll,
  40. .page-editor-preview-body
  41. {
  42. height: 100%;
  43. }
  44. }
  45. }
  46. }
  47. }
  48. .page-form-setting {
  49. .extended-setting {
  50. label {
  51. margin-bottom: 0;
  52. }
  53. }
  54. }
  55. .page-editor-editor-container {
  56. padding-right: 0;
  57. border-right: 1px solid #ccc;
  58. // override CodeMirror styles
  59. .CodeMirror {
  60. pre {
  61. font-family: $font-family-monospace-not-strictly;
  62. }
  63. .cm-matchhighlight {
  64. background-color: cyan;
  65. }
  66. .CodeMirror-selection-highlight-scrollbar {
  67. background-color: darkcyan;
  68. }
  69. }
  70. .dropzone-overlay {
  71. // layout
  72. display: flex;
  73. justify-content: center;
  74. align-items: center;
  75. // style
  76. font-size: 2em;
  77. margin: 0 15px;
  78. > * {
  79. pointer-events: none;
  80. }
  81. }
  82. .dropzone-overlay-activated {
  83. color: #ccc;
  84. border: 4px dashed #999;
  85. }
  86. .dropzone-overlay-disabled {
  87. background: rgba(0,0,0,0.5);
  88. color: #333;
  89. }
  90. }
  91. .page-editor-preview-container {
  92. }
  93. .page-editor-preview-body {
  94. padding-top: 18px;
  95. padding-right: 15px;
  96. overflow-y: scroll;
  97. }
  98. .form-group.form-submit-group {
  99. position: fixed;
  100. z-index: 1054;
  101. bottom: 0;
  102. width: 100%;
  103. left: 0;
  104. padding: 8px;
  105. min-height: 50px;
  106. background: rgba(255,255,255,.8);
  107. border-top: solid 1px #ccc;
  108. margin-bottom: 0;
  109. }
  110. } // }}}
  111. .crowi.main-container .main .page-list.content-main { // {{{ Edit Form of Page List
  112. .close-button {
  113. display: none;
  114. }
  115. }
  116. .crowi.main-container .main .page-list.content-main.on-edit { // {{{ Edit Form of Page List
  117. .close-button {
  118. display: block;
  119. }
  120. .page-list-container {
  121. display: none;
  122. }
  123. .portal-form-header {
  124. height: 16px;
  125. padding: 8px;
  126. border-bottom: solid 1px #ccc;
  127. }
  128. } // }}}
  129. @media (max-width: $screen-sm-max) { // {{{ less than tablet size
  130. .content-main.on-edit {
  131. .form-group.form-submit-group {
  132. select.form-control {
  133. display: inline-block;
  134. max-width: 50%;
  135. }
  136. }
  137. }
  138. } // }}}
  139. @media (max-width: $screen-xs-max) { // {{{ less than smartphone size
  140. #edit-form-submit {
  141. float: right;
  142. }
  143. } // }}}
  144. // overwrite .CodeMirror-hints
  145. .CodeMirror-hints {
  146. // FIXME: required because .content-main.on-edit has 'z-index:1050'
  147. z-index: 1060 !important;
  148. max-height: 30em !important;
  149. .CodeMirror-hint.crowi-emoji-autocomplete {
  150. font-family: $font-family-monospace-not-strictly;
  151. line-height: 1.6em;
  152. .img-container {
  153. display: inline-block;
  154. width: 30px;
  155. img.emojione {
  156. width: 1.6em;
  157. }
  158. }
  159. }
  160. // active line
  161. .CodeMirror-hint-active.crowi-emoji-autocomplete {
  162. .img-container {
  163. font-size: 15px; // adjust to .wiki
  164. padding-top: 0.3em;
  165. padding-bottom: 0.3em;
  166. }
  167. }
  168. }