12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <html>
- <head>
- <title>{% if context %}{{ context.snippet.title }}{% else %}404 - snippet not found{% endif %}</title>
- <style>
- .container {
- margin: auto;
- max-width: 800px;
- }
-
- .header {
- padding: 15px;
- }
-
- .header__raw-link {
- font-size: 16px;
- font-weight: normal;
- }
-
- pre {
- counter-reset: line;
- font-size: 16px;
- padding: 15px;
- }
-
- pre code {
- counter-increment: line;
- }
-
- pre code:before {
- content: counter(line);
- margin-right: 10px;
- }
- </style>
- <meta name="viewport" content="width=device-width">
- </head>
- <body>
- <div class="container">
- <h1 class="header">
- {% if context %}
- {{ context.snippet.title }}
- <a class="header__raw-link" href="/snippets/{{ context.snippet.id }}/raw">raw</a>
- {% else %}
- 404 - snippet not found
- {% endif %}
- </h1>
- {% if context %}
- <div class="body">
- {% set length = context.lines | length - 1 %}
- {{ context.lines | first | safe }}{% for line in context.lines | slice(start=1, end=length) %}<code id="line-{{ loop.index }}">{{ line | safe }}</code>
- {% endfor %}</pre>
- </div>
- {% endif %}
- </div>
- </body>
- </html>
|