paste.tpl 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. % link = setdefault("link", "") or ""
  2. % disabled = setdefault("disabled", "") and 'disabled="true"'
  3. % download = setdefault("download", "") or ""
  4. % download_disabled = "" if download else 'disabled="true"'
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <style>
  9. html {
  10. --scrollbarBG: #333333;
  11. --thumbBG: #080808;
  12. }
  13. body {
  14. background-color: #080808;
  15. color: #cccccc;
  16. }
  17. img {
  18. background-color: floralwhite;
  19. color: black;
  20. max-height: min(100vh, calc(100vw * 9 / 16));
  21. max-width: calc(100vw - 2em);
  22. }
  23. </style>
  24. <title>Paste</title>
  25. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  26. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@2.1.0/build/pure-min.css" integrity="sha384-yHIFVG6ClnONEA5yB5DJXfW2/KC173DIQrYoZMEtBvGzmf0PKiGyNEqe9N6BNDBH" crossorigin="anonymous"/>
  27. <link rel="stylesheet" href="https://shandan.one/css/grids-responsive-min.css"/>
  28. <link rel="stylesheet" href="https://shandan.one/css/responsive-visibility-collapse.css"/>
  29. </head>
  30. <body align="center" style="text-align: center">
  31. <div class="pure-g">
  32. % include('button-style')
  33. <div class="pure-u-1">
  34. <div class="pure-button-group" role="action" style="padding: 1em 0 0;">
  35. <button class="button-resize pure-button" type="submit" form="open"> Open </button>
  36. <button class="button-resize pure-button" type="submit" form="new"> New </button>
  37. <button class="button-resize pure-button" type="submit" form="copy"> Edit as New </button>
  38. <button class="button-resize pure-button" type="submit" form="paste" {{!disabled}}> Paste </button>
  39. <button class="button-resize pure-button" type="submit" form="download" {{!download_disabled}}> Download </button>
  40. </div>
  41. </div>
  42. <div class="pure-u-1">
  43. <div class="pure-button" style="margin: 1em 0 0; background: #4f8f4f;">
  44. <a href="{{!link}}" style="color: floralwhite;">{{ link }}</a>
  45. </div>
  46. </div>
  47. <div class="pure-u-1">
  48. <p><details><summary> Show QR code ...</summary><img src="{{qr}}"/></details></p>
  49. {{!form}}
  50. <form id="download" method="get" action="{{ download }}">
  51. <input name="raw" type="text" hidden="true" value="true" />
  52. </form>
  53. </div>
  54. </div>
  55. </body>
  56. </html>