_form.scss 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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. // for Dropzone
  71. .dropzone-overlay {
  72. // layout
  73. display: flex;
  74. justify-content: center;
  75. align-items: center;
  76. // style
  77. font-size: 2em;
  78. margin: 0 15px;
  79. // > * {
  80. // pointer-events: none;
  81. // }
  82. }
  83. .dropzone {
  84. // unuploadable or rejected
  85. &.dropzone-unuploadable, &.dropzone-rejected {
  86. .dropzone-overlay {
  87. background: rgba(0,0,0,0.5);
  88. color: #333;
  89. }
  90. }
  91. // uploadable
  92. &.dropzone-uploadable {
  93. &.dropzone-accepted .dropzone-overlay {
  94. color: #ccc;
  95. border: 4px dashed #ccc;
  96. // insert content
  97. &:before {
  98. content: "\f093"; // fa-upload
  99. font-family: FontAwesome;
  100. margin-right: 0.5em;
  101. }
  102. &:after {
  103. content: "Drop here to upload";
  104. }
  105. }
  106. // file type mismatch
  107. &.dropzone-rejected:not(.dropzone-uploadablefile) .dropzone-overlay {
  108. // insert content
  109. &:before {
  110. content: "\f03e"; // fa-upload
  111. font-family: FontAwesome;
  112. margin-right: 0.5em;
  113. }
  114. &:after {
  115. content: "Only Image files are allowed";
  116. }
  117. }
  118. // multiple files
  119. &.dropzone-rejected.dropzone-uploadablefile .dropzone-overlay {
  120. // insert content
  121. &:before {
  122. content: "\f071"; // fa-upload
  123. font-family: FontAwesome;
  124. margin-right: 0.5em;
  125. }
  126. &:after {
  127. content: "Only 1 file allowed";
  128. }
  129. }
  130. }
  131. } // end of.dropzone
  132. }
  133. .page-editor-preview-container {
  134. }
  135. .page-editor-preview-body {
  136. padding-top: 18px;
  137. padding-right: 15px;
  138. overflow-y: scroll;
  139. }
  140. .form-group.form-submit-group {
  141. position: fixed;
  142. z-index: 1054;
  143. bottom: 0;
  144. width: 100%;
  145. left: 0;
  146. padding: 8px;
  147. min-height: 50px;
  148. background: rgba(255,255,255,.8);
  149. border-top: solid 1px #ccc;
  150. margin-bottom: 0;
  151. }
  152. } // }}}
  153. .crowi.main-container .main .page-list.content-main { // {{{ Edit Form of Page List
  154. .close-button {
  155. display: none;
  156. }
  157. }
  158. .crowi.main-container .main .page-list.content-main.on-edit { // {{{ Edit Form of Page List
  159. .close-button {
  160. display: block;
  161. }
  162. .page-list-container {
  163. display: none;
  164. }
  165. .portal-form-header {
  166. height: 16px;
  167. padding: 8px;
  168. border-bottom: solid 1px #ccc;
  169. }
  170. } // }}}
  171. @media (max-width: $screen-sm-max) { // {{{ less than tablet size
  172. .content-main.on-edit {
  173. .form-group.form-submit-group {
  174. select.form-control {
  175. display: inline-block;
  176. max-width: 50%;
  177. }
  178. }
  179. }
  180. } // }}}
  181. @media (max-width: $screen-xs-max) { // {{{ less than smartphone size
  182. #edit-form-submit {
  183. float: right;
  184. }
  185. } // }}}
  186. // overwrite .CodeMirror-hints
  187. .CodeMirror-hints {
  188. // FIXME: required because .content-main.on-edit has 'z-index:1050'
  189. z-index: 1060 !important;
  190. max-height: 30em !important;
  191. .CodeMirror-hint.crowi-emoji-autocomplete {
  192. font-family: $font-family-monospace-not-strictly;
  193. line-height: 1.6em;
  194. .img-container {
  195. display: inline-block;
  196. width: 30px;
  197. img.emojione {
  198. width: 1.6em;
  199. }
  200. }
  201. }
  202. // active line
  203. .CodeMirror-hint-active.crowi-emoji-autocomplete {
  204. .img-container {
  205. font-size: 15px; // adjust to .wiki
  206. padding-top: 0.3em;
  207. padding-bottom: 0.3em;
  208. }
  209. }
  210. }