Преглед изворни кода

Multipart & DragDrop examples cleanup

Artur Paikin пре 9 година
родитељ
комит
4a172c60ef

+ 3 - 5
website/src/examples/dragdrop/app.css

@@ -1,8 +1,6 @@
 /* Drag & Drop CSS to style the demo itself */
 /* Drag & Drop CSS to style the demo itself */
 
 
-.UppyDragDrop-puppy {
-  display: block;
-  max-width: 80px;
-  margin: auto;
-  margin-bottom: 20px;
+.UppyDragDrop-One-Progress,
+.UppyDragDrop-Two-Progress {
+  position: relative;
 }
 }

+ 2 - 4
website/src/examples/dragdrop/app.es6

@@ -1,20 +1,18 @@
 import Uppy from '../../../../src/core/Core.js'
 import Uppy from '../../../../src/core/Core.js'
 import DragDrop from '../../../../src/plugins/DragDrop.js'
 import DragDrop from '../../../../src/plugins/DragDrop.js'
 import ProgressBar from '../../../../src/plugins/ProgressBar.js'
 import ProgressBar from '../../../../src/plugins/ProgressBar.js'
-import Spinner from '../../../../src/plugins/Spinner.js'
 import Tus10 from '../../../../src/plugins/Tus10.js'
 import Tus10 from '../../../../src/plugins/Tus10.js'
 
 
 const uppyOne = new Uppy({debug: true})
 const uppyOne = new Uppy({debug: true})
 uppyOne
 uppyOne
   .use(DragDrop, {target: '.UppyDragDrop-One'})
   .use(DragDrop, {target: '.UppyDragDrop-One'})
   .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'})
   .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'})
-  // .use(ProgressBar, {target: '.UppyDragDrop-One-Progress'})
-  // .use(Spinner, {target: '.UppyDragDrop-One-Spinner'})
+  .use(ProgressBar, {target: '.UppyDragDrop-One-Progress'})
   .run()
   .run()
 
 
 const uppyTwo = new Uppy({debug: true, autoProceed: false})
 const uppyTwo = new Uppy({debug: true, autoProceed: false})
 uppyTwo
 uppyTwo
   .use(DragDrop, {target: '#UppyDragDrop-Two'})
   .use(DragDrop, {target: '#UppyDragDrop-Two'})
   .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'})
   .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'})
-  // .use(ProgressBar, {target: '.UppyDragDrop-Two-Progress'})
+  .use(ProgressBar, {target: '.UppyDragDrop-Two-Progress'})
   .run()
   .run()

+ 12 - 10
website/src/examples/multipart/app.html

@@ -1,17 +1,19 @@
 <!-- Basic Uppy styles -->
 <!-- Basic Uppy styles -->
 <link rel="stylesheet" href="/uppy/uppy.css">
 <link rel="stylesheet" href="/uppy/uppy.css">
 
 
-<div class="clearfix"></div>
+<div class="grid">
+  <div class="column-1-2">
+    <form id="myform1">
+      <input id="myfile1" type="file" name="myfile" multiple />
+    </form>
+  </div>
 
 
-<form id="myform1">
-  <input id="myfile1" type="file" name="myfile" multiple />
-</form>
-
-<form id="myform2">
-  <input id="myfile2" type="file" name="myfile" multiple />
-</form>
-
-<div class="clearfix"></div>
+  <div class="column-1-2">
+    <form id="myform2">
+      <input id="myfile2" type="file" name="myfile" multiple />
+    </form>
+  </div>
+</div>
 
 
 <button id="myupload">
 <button id="myupload">
   Upload
   Upload

+ 3 - 3
website/src/examples/multipart/index.ejs

@@ -25,14 +25,14 @@ we showcase uploading files from 2 different forms in one go:
 <p>
 <p>
   On this page we're using the following HTML snippet:
   On this page we're using the following HTML snippet:
 </p>
 </p>
-{% include_code lang:html dragdrop/app.html %}
+{% include_code lang:html multipart/app.html %}
 
 
 <p>
 <p>
   Along with this JavaScript:
   Along with this JavaScript:
 </p>
 </p>
-{% include_code lang:js dragdrop/app.es6 %}
+{% include_code lang:js multipart/app.es6 %}
 
 
 <p>
 <p>
   And the following CSS:
   And the following CSS:
 </p>
 </p>
-{% include_code lang:css dragdrop/app.css %}
+{% include_code lang:css multipart/app.css %}