diff --git a/website/src/api-usage-example.ejs b/website/src/api-usage-example.ejs index 42bacaa0a..d1eb8371b 100644 --- a/website/src/api-usage-example.ejs +++ b/website/src/api-usage-example.ejs @@ -1,19 +1,11 @@ import Uppy from 'uppy/lib/core' import Dashboard from 'uppy/lib/plugins/Dashboard' -import Tus10 from 'uppy/lib/plugins/Tus10' -import MetaData from 'uppy/lib/plugins/MetaData' +import Tus from 'uppy/lib/plugins/Tus'   -const uppy = Uppy({autoProceed: false}) - .use(Dashboard, {trigger: '#select-files', target: '#upload-form', replaceTargetContent: true}) - .use(Tus10, {endpoint: '://master.tus.io/files/'}) - .use(MetaData, { - fields: [ - { id: 'license', name: 'License', value: 'Creative Commons', placeholder: 'specify license' }, - { id: 'caption', name: 'Caption', value: 'none', placeholder: 'describe what the image is about' } - ] - }) -uppy.run() -  -uppy.on('success', (files) => { - console.log(`Upload complete! We’ve uploaded these files: ${files}`) -}) \ No newline at end of file +Uppy({ autoProceed: false }) + .use(Dashboard, { trigger: '#select-files' }) + .use(Tus, { endpoint: 'https://master.tus.io/files/' }) + .run() + .on('complete', (result) => { + console.log('Upload result:', result) + }) \ No newline at end of file diff --git a/website/src/examples/dashboard/app.es6 b/website/src/examples/dashboard/app.es6 index 47b738b34..235d4fc06 100644 --- a/website/src/examples/dashboard/app.es6 +++ b/website/src/examples/dashboard/app.es6 @@ -36,7 +36,9 @@ function uppyInit () { trigger: '.UppyModalOpenerBtn', inline: opts.DashboardInline, target: opts.DashboardInline ? '.DashboardContainer' : 'body', + replaceTargetContent: true, note: opts.restrictions ? 'Images and video only, 2–3 files, up to 1 MB' : '', + maxHeight: 450, metaFields: [ { id: 'license', name: 'License', placeholder: 'specify license' }, { id: 'caption', name: 'Caption', placeholder: 'describe what the image is about' } diff --git a/website/src/examples/dashboard/index.ejs b/website/src/examples/dashboard/index.ejs index a7dfa98fa..bd4d01901 100644 --- a/website/src/examples/dashboard/index.ejs +++ b/website/src/examples/dashboard/index.ejs @@ -40,8 +40,10 @@ const uppy = Uppy({ .use(Dashboard, { trigger: '.UppyModalOpenerBtn', inline: true, - target: '.DashboardContainer' + target: '.DashboardContainer', + replaceTargetContent: true, note: 'Images and video only, 2–3 files, up to 1 MB', + maxHeight: 450, metaFields: [ { id: 'license', name: 'License', placeholder: 'specify license' }, { id: 'caption', name: 'Caption', placeholder: 'describe what the image is about' } diff --git a/website/src/examples/dragdrop/app.html b/website/src/examples/dragdrop/app.html index 621691c0d..936886512 100644 --- a/website/src/examples/dragdrop/app.html +++ b/website/src/examples/dragdrop/app.html @@ -1,8 +1,8 @@ -
-
+
+
autoProceed is on
@@ -12,7 +12,7 @@
-
+
autoProceed is off
diff --git a/website/themes/uppy/layout/example.ejs b/website/themes/uppy/layout/example.ejs index 21398de03..873b2bf60 100644 --- a/website/themes/uppy/layout/example.ejs +++ b/website/themes/uppy/layout/example.ejs @@ -6,6 +6,8 @@

Please see documentation for details.

+
+

Hey there stranger! Uppy is in the early stages of development and the example section is our playground. Things might not yet work, but we're working hard to improve this.

diff --git a/website/themes/uppy/layout/partials/frontpage-code-sample.html b/website/themes/uppy/layout/partials/frontpage-code-sample.html index 45c7acf26..4ffe3f7de 100644 --- a/website/themes/uppy/layout/partials/frontpage-code-sample.html +++ b/website/themes/uppy/layout/partials/frontpage-code-sample.html @@ -4,4 +4,4 @@ save it as a layout partial -->
$ npm install uppy
-
api-usage-example.ejsview raw
import Uppy from 'uppy/lib/core'
import Dashboard from 'uppy/lib/plugins/Dashboard'
import Tus10 from 'uppy/lib/plugins/Tus10'
import MetaData from 'uppy/lib/plugins/MetaData'
 
const uppy = Uppy({autoProceed: false})
.use(Dashboard, {trigger: '#select-files', target: '#upload-form', replaceTargetContent: true})
.use(Tus10, {endpoint: '://master.tus.io/files/'})
uppy.use(MetaData, {
fields: [
{ id: 'resizeTo', name: 'Resize to', value: 1200, placeholder: 'specify future image size' },
{ id: 'description', name: 'Description', value: 'none', placeholder: 'describe what the file is for' }
]
})
uppy.run()
 
uppy.on('success', (files) => {
console.log(`Upload complete! We’ve uploaded these files: ${files}`)
})
+
api-usage-example.ejsview raw
import Uppy from 'uppy/lib/core'
import Dashboard from 'uppy/lib/plugins/Dashboard'
import Tus from 'uppy/lib/plugins/Tus'
 
Uppy({ autoProceed: false })
.use(Dashboard, { trigger: '#select-files' })
.use(Tus, { endpoint: 'https://master.tus.io/files/' })
.run()
.on('complete', (result) => {
console.log('Upload result:', result)
})
diff --git a/website/themes/uppy/source/css/_index.scss b/website/themes/uppy/source/css/_index.scss index fb991dd6c..4362bebd2 100644 --- a/website/themes/uppy/source/css/_index.scss +++ b/website/themes/uppy/source/css/_index.scss @@ -254,7 +254,7 @@ max-width: 100%; width: 47%; display: inline-block; - vertical-align: middle; + vertical-align: top; // height: 250px; } }