The backend of a gist server written in Rust
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <html>
  2. <head>
  3. <title>{% if snippet %}{{ snippet.title }}{% else %}404 - snippet not found{% endif %}</title>
  4. <style>
  5. .container {
  6. margin: auto;
  7. max-width: 800px;
  8. }
  9. .header {
  10. padding: 15px;
  11. }
  12. .header__raw-link {
  13. font-size: 16px;
  14. font-weight: normal;
  15. }
  16. .body > pre {
  17. font-size: 16px;
  18. padding: 15px;
  19. }
  20. </style>
  21. <meta name="viewport" content="width=device-width">
  22. </head>
  23. <body>
  24. <div class="container">
  25. <h1 class="header">
  26. {% if snippet %}
  27. {{ snippet.title }}
  28. {% if id %}
  29. <a class="header__raw-link" href="/snippets/{{ id }}/raw">raw</a>
  30. {% endif %}
  31. {% else %}
  32. 404 - snippet not found
  33. {% endif %}
  34. </h1>
  35. {% if snippet %}
  36. <div class="body">
  37. {{ snippet.formatted_body | safe }}
  38. </div>
  39. {% endif %}
  40. </div>
  41. </body>
  42. </html>