example.ejs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <%- partial('partials/sidebar', { type: page.type, index: page.index }) %>
  2. <div class="Content js-Content <%- page.type ? page.type + ' with-sidebar' : '' %>">
  3. <h1><%- page.title %> Example</h1>
  4. <%- page.content %>
  5. <p>Please see <a href="/docs/">documentation</a> for details.</p>
  6. <hr>
  7. <p>Hey there stranger! Uppy <img src="/images/emojis/dog.png" width="14" align="absmiddle">
  8. is actively developed and the example section
  9. is our playground. Things might not work, but we're working hard to improve.</p>
  10. <p>We're on a monthly release cycle and our latest version is
  11. <a href="https://github.com/transloadit/uppy/blob/master/CHANGELOG.md#<%- theme.uppy_version_anchor %>">v<%- theme.uppy_version %></a>,
  12. but the example pages reflect the latest work in our master branch. Here's
  13. <a href="https://github.com/transloadit/uppy/compare/v<%- theme.uppy_version %>...master">what changed in master since v<%- theme.uppy_version %></a>
  14. in terms of commits, while the CHANGELOG
  15. provides a higher level view of the things planned for our
  16. <a href="https://github.com/transloadit/uppy/blob/master/CHANGELOG.md#next">next release</a>.</p>
  17. <!-- Add textarea already so it's available immediately for logging.
  18. It is later made visible, and moved into the #console-wrapper to position it in layout how
  19. you see fit. -->
  20. <blockquote>Files from the examples are uploaded to our test servers and deleted daily.</blockquote>
  21. <textarea id="console-log" class="Console"></textarea>
  22. <script>
  23. console.log = (function (log, container) {
  24. return function (text) {
  25. log(text);
  26. if (text !== (text + '')) {
  27. text = JSON.stringify(text);
  28. }
  29. container.value += text + '\n';
  30. container.scrollTop = container.scrollHeight;
  31. };
  32. }(console.log.bind(console), document.getElementById("console-log")));
  33. </script>
  34. <script>
  35. // #console-log textarea is declared earlier so it's available immediately for logging.
  36. // Here it is made visible, and moved into the #console-wrapper, so you can position it in the layout how
  37. // you see fit.
  38. document.getElementById('console-wrapper').appendChild(document.getElementById('console-log'));
  39. document.getElementById('console-log').style.display = 'block';
  40. </script>
  41. <div class="footer">Caught a mistake or want to contribute to the documentation?
  42. <a href="https://github.com/transloadit/uppy/blob/master/website/src/<%- page.source %>" rel="noreferrer noopener" target="_blank">Edit/fork this page directly on Github</a>!
  43. </div>
  44. </div>