dropzone.scss 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. .overlay {
  2. // layout
  3. display: flex;
  4. justify-content: center;
  5. align-items: center;
  6. margin-left: 15px;
  7. }
  8. .overlay-content {
  9. padding: 0.5em;
  10. }
  11. .page-editor-editor-container {
  12. .overlay-content {
  13. font-size: 2.5em;
  14. }
  15. }
  16. .comment-form {
  17. .overlay {
  18. // style
  19. margin-right: 15px;
  20. margin-top: 55px;
  21. margin-bottom: 55px;
  22. }
  23. .overlay-content {
  24. font-size: 1.8em;
  25. }
  26. }
  27. @mixin overlay-processing-style() {
  28. .overlay {
  29. background: rgba(255,255,255,0.5);
  30. }
  31. .overlay-content {
  32. padding: 0.3em;
  33. background: rgba(200,200,200,0.5);
  34. color: #444;
  35. }
  36. }
  37. // add icon on cursor
  38. .autoformat-markdown-table-activated .CodeMirror-cursor {
  39. &:after {
  40. font-family: 'FontAwesome';
  41. content: '\f0ce';
  42. }
  43. }
  44. // for Dropzone
  45. .dropzone {
  46. @mixin insertSimpleLineIcons($code) {
  47. &:before {
  48. margin-right: 0.2em;
  49. font-family: 'simple-line-icons';
  50. content: $code;
  51. }
  52. }
  53. // unuploadable or rejected
  54. &.dropzone-unuploadable, &.dropzone-rejected {
  55. .overlay {
  56. background: rgba(200,200,200,0.8);
  57. }
  58. .overlay-content {
  59. color: #444;
  60. }
  61. }
  62. // uploading
  63. &.dropzone-uploading {
  64. @include overlay-processing-style();
  65. }
  66. // unuploadable
  67. &.dropzone-unuploadable {
  68. .overlay-content {
  69. // insert content
  70. @include insertSimpleLineIcons("\e617"); // icon-exclamation
  71. &:after {
  72. content: "File uploading is disabled";
  73. }
  74. }
  75. }
  76. // uploadable
  77. &.dropzone-uploadable {
  78. // accepted
  79. &.dropzone-accepted:not(.dropzone-rejected) {
  80. .overlay {
  81. border: 4px dashed #ccc;
  82. }
  83. .overlay-content {
  84. // insert content
  85. @include insertSimpleLineIcons("\e084"); // icon-cloud-upload
  86. &:after {
  87. content: "Drop here to upload";
  88. }
  89. // style
  90. color: #666;
  91. background: rgba(200,200,200,0.8);
  92. }
  93. }
  94. // file type mismatch
  95. &.dropzone-rejected:not(.dropzone-uploadablefile) .overlay-content {
  96. // insert content
  97. @include insertSimpleLineIcons("\e032"); // icon-picture
  98. &:after {
  99. content: "Only an image file is allowed";
  100. }
  101. }
  102. // multiple files
  103. &.dropzone-accepted.dropzone-rejected .overlay-content {
  104. // insert content
  105. @include insertSimpleLineIcons("\e617"); // icon-exclamation
  106. &:after {
  107. content: "Only 1 file is allowed";
  108. }
  109. }
  110. }
  111. } // end of.dropzone
  112. .textarea-editor {
  113. border: none;
  114. font-family: monospace;
  115. }
  116. .loading-keymap {
  117. @include overlay-processing-style();
  118. }