index.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <style>
  6. body {
  7. font-family: Roboto, 'Open Sans';
  8. background: #f4f5f6;
  9. }
  10. h1,
  11. h2,
  12. h3,
  13. h4,
  14. h5,
  15. h6 {
  16. font-family:
  17. Oxygen,
  18. Raleway,
  19. Open Sans;
  20. }
  21. header {
  22. width: 800px;
  23. margin: auto;
  24. }
  25. header h1 {
  26. text-align: center;
  27. }
  28. main {
  29. background: white;
  30. margin: auto;
  31. width: 800px;
  32. border: 2px solid #e8eaee;
  33. padding: 36px;
  34. border-radius: 5px;
  35. }
  36. main p:first-child {
  37. margin-top: 0;
  38. }
  39. label {
  40. display: flex;
  41. padding-bottom: 16px;
  42. border-bottom: 1px solid #e8eaee;
  43. margin-bottom: 16px;
  44. }
  45. .label-text {
  46. width: 25%;
  47. text-transform: uppercase;
  48. color: #888888;
  49. line-height: 34px;
  50. }
  51. label input,
  52. label textarea {
  53. flex-grow: 1;
  54. height: 34px;
  55. }
  56. label textarea {
  57. box-sizing: border-box;
  58. padding: 6px;
  59. border-radius: 5px;
  60. border: 1px solid #b7b7b4;
  61. font-family:
  62. Roboto,
  63. Open Sans;
  64. min-height: 160px;
  65. width: 100%;
  66. resize: vertical;
  67. }
  68. .form-createSnippet {
  69. border: 1px solid #2e6da4;
  70. border-bottom-width: 3px;
  71. padding: 8px;
  72. border-radius: 5px;
  73. background-color: #337ab7;
  74. color: white;
  75. width: 100%;
  76. }
  77. .mdtxt {
  78. width: 100%;
  79. height: 100%;
  80. }
  81. .mdtxt-controls {
  82. }
  83. .mdtxt-upload {
  84. box-sizing: border-box;
  85. width: 100%;
  86. border-radius: 0 0 5px 5px;
  87. border: 1px solid #b7b7b4;
  88. border-top-width: 0;
  89. padding: 4px 8px;
  90. cursor: pointer;
  91. }
  92. .mdtxt textarea {
  93. margin-bottom: 0;
  94. border-bottom-left-radius: 0;
  95. border-bottom-right-radius: 0;
  96. }
  97. .mdtxt-upload .error {
  98. border-color: red;
  99. color: red;
  100. }
  101. .mdtxt-upload .error .message {
  102. margin-right: 8px;
  103. }
  104. .snippet {
  105. margin-top: 25px;
  106. }
  107. </style>
  108. </head>
  109. <body>
  110. <header>
  111. <h1>Markdown Bin</h1>
  112. </header>
  113. <main>
  114. <p>
  115. Markdown Bin is a demo app that works a bit like Github Gists or
  116. pastebin. You can add markdown snippets, and add file attachments to
  117. each snippet by clicking "Upload an attachment" or by dragging files
  118. onto the text area. Transloadit generates an inline preview image for
  119. images, videos, and audio files.
  120. <a
  121. target="_blank"
  122. href="https://github.com/transloadit/uppy/blob/main/examples/transloadit-textarea/template.json"
  123. >&raquo;&nbsp;View the Assembly Template here.</a
  124. >
  125. </p>
  126. <p>
  127. ⚠️ For this demo, snippets are stored locally in your browser.
  128. Attachments are stored in Transloadit's temporary storage and expire
  129. after about 24 hours. In a real app, you can easily export files to a
  130. permanent storage solution like Amazon S3 or Google Cloud.
  131. <a
  132. target="_blank"
  133. href="https://transloadit.com/docs/#17-saving-conversion-results"
  134. >&raquo;&nbsp;Learn more</a
  135. >
  136. </p>
  137. <form id="new">
  138. <h2>Create a new snippet</h2>
  139. <label>
  140. <span class="label-text">Snippet Title</span>
  141. <input type="text" name="title" placeholder="Snippet Title" />
  142. </label>
  143. <label>
  144. <textarea name="snippet"></textarea>
  145. </label>
  146. <p>
  147. <button class="form-createSnippet" type="submit">Create</button>
  148. </p>
  149. </form>
  150. <h2>Previous snippets</h2>
  151. <div id="snippets"></div>
  152. </main>
  153. <template id="snippet">
  154. <div class="snippet">
  155. <h3 class="snippet-title"></h3>
  156. <div class="snippet-content"></div>
  157. </div>
  158. </template>
  159. <noscript>This app requires JavaScript.</noscript>
  160. <script src="./main.js" type="module"></script>
  161. </body>
  162. </html>