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.

show.tera 669B

1234567891011121314151617181920212223242526272829303132
  1. <html>
  2. <head>
  3. <title>{% if gist %}{{ gist.title }}{% else %}404 - Not Found{% endif %}</title>
  4. <style>
  5. pre {
  6. counter-reset: line;
  7. }
  8. code {
  9. counter-increment: line;
  10. }
  11. code:before {
  12. content: counter(line);
  13. margin-right: 10px;
  14. }
  15. </style>
  16. </head>
  17. <body>
  18. {% if gist %}
  19. <h3>{{ gist.title }}</h3>
  20. <div>
  21. {% set lines = gist.body | split(pat = '
  22. ') %}
  23. <pre>
  24. {%- for line in lines %}<code id="{{ loop.index }}">{{ line }}</code>
  25. {% endfor %}
  26. </pre>
  27. </div>
  28. {% else %}
  29. <h3>Gist not found</h3>
  30. {% endif %}
  31. </body>
  32. </html>