dropzone.scss 2.8 KB

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