index.ejs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <section id="hero" class="IndexHero">
  2. <header id="logo-wrap" class="IndexHero-header">
  3. <img id="logo" class="IndexHero-logo" title="Uppy" alt="Uppy" src="<%- config.logo_medium %>">
  4. <h1 class="IndexHero-title"><%- config.title %></h1>
  5. <h2 class="IndexHero-tagline">
  6. The file uploader that <br>
  7. <span class="IndexHero-taglinePart js-IndexHero-taglinePart is-visible">loves to play fetch</span>
  8. </h2>
  9. <ul class="IndexHero-taglineList js-IndexHero-taglineList">
  10. <% site.data.taglines.forEach(function(tagline) {%>
  11. <li><%- tagline %></li>
  12. <% }); %>
  13. </ul>
  14. </header>
  15. <%- partial('partials/social') %>
  16. </section>
  17. <section id="example" class="IndexExample">
  18. <!-- <h2 class="IndexSection-title">Demo</h2> -->
  19. <div class="IndexExample-block">
  20. <video class="IndexExample-video"
  21. autoplay loop muted playsinline>
  22. <source src="/images/uppy-demo-2.mp4" type="video/mp4">
  23. Your browser does not support the video tag, you can <a href="/images/blog/0.25/link-drop-demo.mp4">download the video</a> to watch it.
  24. </video>
  25. <form id="upload-form">
  26. <input type="file">
  27. </form>
  28. <p class="TryMe-line">Try me: <button id="select-files" class="TryMe-btn">Select Files</button></p>
  29. </div>
  30. <div class="IndexExample-block">
  31. <%- partial('partials/frontpage-code-sample') %>
  32. </div>
  33. <a class="GetStartedBtn" href="/docs/">Get Started</a>
  34. </section>
  35. <section class="IndexAbout">
  36. <div class="IndexAbout-item">
  37. <img class="IndexAbout-icon" src="/images/traffic-light.svg">
  38. <h2 class="IndexSection-title">Work in progress</h2>
  39. <p><%- config.description %></p>
  40. </div>
  41. <div class="IndexAbout-item">
  42. <a href="https://transloadit.com"><img class="IndexAbout-icon" src="/images/transloadit-logo.png"></a>
  43. <h2 class="IndexSection-title">Open Source</h2>
  44. <p><%- config.descriptionWho %></p>
  45. </div>
  46. </section>
  47. <section class="IndexDesignGoals">
  48. <h2>Design Goals:</h2>
  49. <ul>
  50. <% for (var k in site.data.design_goals) { var v = site.data.design_goals[k]; %>
  51. <li>
  52. <%- v %>
  53. </li>
  54. <% } %>
  55. </ul>
  56. </section>
  57. <section class="IndexActivity">
  58. <h2>Activity Feed</h2>
  59. <div class="on-the-githubs" data-event-source="repos/transloadit/uppy">Loading...</div>
  60. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  61. <script src="//kvz.github.io/on-the-githubs/js/jquery.on-the-githubs.min.js"></script>
  62. <script type="text/javascript">
  63. $('.on-the-githubs').onthegithubs();
  64. </script>
  65. </section>
  66. <footer class="IndexFooter">
  67. <p>Released under the <a href="http://opensource.org/licenses/MIT" rel="noreferrer noopener" target="_blank">MIT License</a></p>
  68. <p>This site borrows heavily from Evan You's excellent <a href="https://github.com/vuejs/vuejs.org">Vue.js</a> (<a href="https://github.com/transloadit/uppy/blob/master/website/VUEORG_LICENSE">LICENSE</a>) (he <a href="https://twitter.com/youyuxi/status/672441843183960067">approves</a>)</p>
  69. <p>© <%- date(Date.now(), 'YYYY') %> <a href="https://transloadit.com" rel="noreferrer noopener" target="_blank">Transloadit</a></p>
  70. </footer>
  71. <link href="https://transloadit.edgly.net/releases/uppy/v0.27.1/dist/uppy.min.css" rel="stylesheet">
  72. <script src="https://transloadit.edgly.net/releases/uppy/v0.27.1/dist/uppy.min.js"></script>
  73. <script>
  74. var TUS_ENDPOINT = 'https://master.tus.io/files/'
  75. var uppy = Uppy.Core({ debug: true, autoProceed: false })
  76. .use(Uppy.Dashboard, {
  77. trigger: '#select-files',
  78. target: '#upload-form',
  79. replaceTargetContent: true,
  80. metaFields: [
  81. { id: 'license', name: 'License', placeholder: 'specify license' },
  82. { id: 'caption', name: 'Caption', placeholder: 'describe what the image is about' }
  83. ]
  84. })
  85. .use(Uppy.Tus, { endpoint: TUS_ENDPOINT})
  86. uppy.on('success', (files) => {
  87. console.log(`Upload complete! We’ve uploaded these files: ${files}`)
  88. })
  89. </script>