mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-22 09:48:06 +00:00
Add a 'real' example to the frontpage
This commit is contained in:
parent
df14f37d82
commit
12fbe4cf5e
4 changed files with 29 additions and 56 deletions
|
|
@ -39,52 +39,13 @@
|
|||
|
||||
<div id="example">
|
||||
<h2>10 Second Example</h2>
|
||||
<div class="block">
|
||||
<figure class="highlight lang-html"><table><tbody><tr><td class="gutter"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
</pre></td><td class="code"><pre><span class="tag"><<span class="title">div</span> <span class="attribute">id</span>=<span class="value">"demo"</span>></span>
|
||||
<span class="tag"><<span class="title">p</span>></span>{{message}}<span class="tag"></<span class="title">p</span>></span>
|
||||
<span class="tag"><<span class="title">input</span> <span class="attribute">v-model</span>=<span class="value">"message"</span>></span>
|
||||
<span class="tag"></<span class="title">div</span>></span>
|
||||
</pre></td></tr></tbody></table></figure>
|
||||
</div>
|
||||
|
||||
<div class="sign">+</div>
|
||||
<div class="block"><%- partial('partials/example1') %></div>
|
||||
|
||||
<div class="block">
|
||||
<figure class="highlight lang-js"><table><tbody><tr><td class="gutter"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
</pre></td><td class="code"><pre><span class="keyword">var</span> demo = <span class="keyword">new</span> Uppy({
|
||||
el: <span class="string">'#demo'</span>,
|
||||
data: {
|
||||
message: <span class="string">'Hello Uppy!'</span>
|
||||
}
|
||||
})
|
||||
</pre></td></tr></tbody></table></figure>
|
||||
</div>
|
||||
<div class="sign">»</div>
|
||||
|
||||
<div class="sign">=</div>
|
||||
<div class="block"><%- partial('partials/example2') %></div>
|
||||
|
||||
<div class="block result">
|
||||
<div id="demo">
|
||||
<p>{{message}}</p>
|
||||
<input v-model="message">
|
||||
</div>
|
||||
<script>
|
||||
var demo = new Uppy({
|
||||
el: '#demo',
|
||||
data: {
|
||||
message: 'Hello Uppy!'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div id="features">
|
||||
<div class="feats">
|
||||
|
|
|
|||
12
website/themes/uppy/layout/partials/example1.md
Normal file
12
website/themes/uppy/layout/partials/example1.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
```html
|
||||
<div id="drag-drop"></div>
|
||||
|
||||
<script src="http://assets.transloadit.com/uppy.min.js" />
|
||||
<script>
|
||||
var uppy = new Uppy();
|
||||
uppy
|
||||
.use(DragDrop, {selector: '#drag-drop'})
|
||||
.use(Tus10, {endpoint: 'http://master.tus.io:8080'})
|
||||
.run();
|
||||
</script>
|
||||
```
|
||||
1
website/themes/uppy/layout/partials/example2.md
Normal file
1
website/themes/uppy/layout/partials/example2.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
@todo screenshot here?
|
||||
|
|
@ -104,8 +104,19 @@ html, body
|
|||
margin 0 auto 3em
|
||||
h2
|
||||
margin-bottom 1.5em
|
||||
pre
|
||||
padding 2px
|
||||
margin 2px
|
||||
code
|
||||
padding 0px
|
||||
margin 0px
|
||||
code, pre
|
||||
background-color transparent
|
||||
white-space pre
|
||||
font-family: 'Roboto Mono', Monaco, courier, monospace;
|
||||
font-size: 12px;
|
||||
height: auto;
|
||||
line-height: 18px;
|
||||
figure.highlight
|
||||
margin 0
|
||||
box-shadow none
|
||||
|
|
@ -120,24 +131,12 @@ html, body
|
|||
.block
|
||||
text-align left
|
||||
display inline-block
|
||||
width 28%
|
||||
height 10em
|
||||
width 43%
|
||||
height 13em
|
||||
vertical-align top
|
||||
background-color #f9f9f9
|
||||
border-radius 2px
|
||||
box-shadow 0 1px 2px rgba(0,0,0,.125)
|
||||
#demo
|
||||
padding 0 20px
|
||||
word-wrap break-word
|
||||
input
|
||||
font-size .75em
|
||||
border 1px solid #ccc
|
||||
padding 4px 8px
|
||||
border-radius 2px
|
||||
font-family $body-font
|
||||
&:focus
|
||||
outline none
|
||||
border-color $primary
|
||||
|
||||
#features
|
||||
padding 3em 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue