Sfoglia il codice sorgente

fix: removed jquery explicit includes

NGPixel 8 anni fa
parent
commit
485e1a78f6

+ 1 - 1
client/js/app.js

@@ -1,8 +1,8 @@
 'use strict'
 
+/* global $ */
 /* eslint-disable no-new */
 
-import $ from 'jquery'
 import Vue from 'vue'
 import VueResource from 'vue-resource'
 import VueClipboards from 'vue-clipboards'

+ 1 - 1
client/js/components/editor.component.js

@@ -1,6 +1,6 @@
 'use strict'
 
-import $ from 'jquery'
+/* global $ */
 
 let mde
 

+ 0 - 2
client/js/components/search.vue

@@ -18,8 +18,6 @@
 </template>
 
 <script>
-  import * as $ from 'jquery'
-
   export default {
     data () {
       return {

+ 1 - 1
client/js/login.js

@@ -1,6 +1,6 @@
 'use strict'
 
-import $ from 'jquery'
+/* global $ */
 
 $(() => {
   $('#login-user').focus()

+ 2 - 1
client/js/pages/content-view.component.js

@@ -1,7 +1,8 @@
 'use strict'
 
+/* global $ */
+
 import MathJax from 'mathjax'
-import $ from 'jquery'
 
 export default {
   name: 'content-view',

+ 1 - 1
client/scss/app.scss

@@ -32,7 +32,7 @@ $primary: 'indigo';
 @import 'node_modules/highlight.js/styles/atom-one-dark';
 @import 'node_modules/simplemde/dist/simplemde.min';
 
-@import 'components/_editor';
+@import 'components/editor';
 
 @import 'layout/_header';
 @import 'layout/_loader';

+ 15 - 0
client/scss/components/_editor.scss → client/scss/components/editor.scss

@@ -367,3 +367,18 @@ main > .ace-container {
 	bottom: 0;
 	right: 0;
 }
+
+.editor-sd {
+  max-width: 250px;
+  flex: 0 1 250px;
+  background-color: mc('blue-grey', '100');
+
+  &-item {
+    background-color: mc('blue-grey', '50');
+
+    &:first-child {
+      margin-top: 60px;
+    }
+  }
+
+}

+ 1 - 1
package.json

@@ -139,7 +139,7 @@
     "eslint-plugin-node": "^5.0.0",
     "eslint-plugin-promise": "^3.5.0",
     "eslint-plugin-standard": "^3.0.1",
-    "fuse-box": "2.1.0-beta.10",
+    "fuse-box": "^2.0.2",
     "i18next-xhr-backend": "^1.4.2",
     "jest": "^20.0.4",
     "jquery": "^3.2.1",

+ 6 - 2
server/views/pages/edit.pug

@@ -15,8 +15,12 @@ block rootNavRight
 
 block content
   editor(inline-template, current-path=pageData.meta.path, v-cloak)
-    .editor-area
-      textarea(ref='editorTextArea', v-pre)= pageData.markdown
+    .columns.is-gapless
+      .column.editor-area
+        textarea(ref='editorTextArea', v-pre)= pageData.markdown
+      .column.editor-sd
+        .editor-sd-item Images
+        .editor-sd-item Files
 
   editor-file
   editor-video

+ 3 - 3
yarn.lock

@@ -2618,9 +2618,9 @@ functional-red-black-tree@^1.0.1:
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
 
-fuse-box@2.1.0-beta.10:
-  version "2.1.0-beta.10"
-  resolved "https://registry.yarnpkg.com/fuse-box/-/fuse-box-2.1.0-beta.10.tgz#37a3eced1aaa3e665a848af6523f3b87f39e6cbc"
+fuse-box@^2.0.2:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/fuse-box/-/fuse-box-2.0.2.tgz#f1171f1c7d5a584dc8151dbfbb50f739c1477b82"
   dependencies:
     acorn "^4.0.3"
     acorn-es7 "^0.1.0"