index.ejs 3.7 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_large %>">
  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. src="/images/uppy-demo.mp4"
  22. autoplay loop muted></video>
  23. <form id="upload-form">
  24. <input type="file">
  25. </form>
  26. <p class="TryMe-line">Try me: <button id="select-files" class="TryMe-btn">Select Files</button></p>
  27. </div>
  28. <div class="IndexExample-block">
  29. <%- partial('partials/frontpage-code-sample') %>
  30. </div>
  31. <a class="GetStartedBtn" href="/docs/">Get Started</a>
  32. </section>
  33. <section class="IndexAbout">
  34. <div class="IndexAbout-item">
  35. <img class="IndexAbout-icon" src="/images/traffic-light.svg">
  36. <h2 class="IndexSection-title">Work in progress</h2>
  37. <p><%- config.description %></p>
  38. </div>
  39. <div class="IndexAbout-item">
  40. <a href="https://transloadit.com"><img class="IndexAbout-icon" src="/images/transloadit-logo.png"></a>
  41. <h2 class="IndexSection-title">Open Source</h2>
  42. <p><%- config.descriptionWho %></p>
  43. </div>
  44. </section>
  45. <section class="IndexDesignGoals">
  46. <h2>Design Goals:</h2>
  47. <ul>
  48. <% for (var k in site.data.design_goals) { var v = site.data.design_goals[k]; %>
  49. <li>
  50. <%- v %>
  51. </li>
  52. <% } %>
  53. </ul>
  54. </section>
  55. <section class="IndexActivity">
  56. <h2>Activity Feed</h2>
  57. <div class="on-the-githubs" data-event-source="repos/transloadit/uppy">Loading...</div>
  58. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  59. <script src="//kvz.github.io/on-the-githubs/js/jquery.on-the-githubs.min.js"></script>
  60. <script type="text/javascript">
  61. $('.on-the-githubs').onthegithubs();
  62. </script>
  63. </section>
  64. <footer class="IndexFooter">
  65. <p>Released under the <a href="http://opensource.org/licenses/MIT" target="_blank">MIT License</a></p>
  66. <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>
  67. <p>© <%- date(Date.now(), 'YYYY') %> <a href="https://transloadit.com" target="_blank">Transloadit</a></p>
  68. </footer>
  69. <link href="https://transloadit.edgly.net/releases/uppy/v0.24.1/dist/uppy.min.css" rel="stylesheet">
  70. <script src="https://transloadit.edgly.net/releases/uppy/v0.24.1/dist/uppy.min.js"></script>
  71. <script>
  72. var PROTOCOL = location.protocol === 'https:' ? 'https' : 'http'
  73. var TUS_ENDPOINT = PROTOCOL + '://master.tus.io/files/'
  74. var uppy = Uppy.Core({ debug: true, autoProceed: false })
  75. .use(Uppy.Dashboard, {
  76. trigger: '#select-files',
  77. target: '#upload-form',
  78. replaceTargetContent: true,
  79. metaFields: [
  80. { id: 'license', name: 'License', placeholder: 'specify license' },
  81. { id: 'caption', name: 'Caption', placeholder: 'describe what the image is about' }
  82. ]
  83. })
  84. .use(Uppy.Tus, { endpoint: TUS_ENDPOINT})
  85. .run()
  86. uppy.on('success', (files) => {
  87. console.log(`Upload complete! We’ve uploaded these files: ${files}`)
  88. })
  89. </script>