1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- {% set snippet = context.snippet %}
- <html>
- <head>
- <title>{{ snippet.title }}</title>
- <style>
- .container {
- margin: auto;
- max-width: 800px;
- }
-
- .header {
- align-items: baseline;
- display: flex;
- flex-wrap: wrap;
- font-family: serif;
- justify-content: space-between;
- margin-bottom: 10px;
- padding: 0;
- }
-
- .header__title {
- font-size: 28px;
- margin-right: 10px;
- }
-
- .header__date {
- font-size: 16px;
- font-weight: normal;
- margin-right: 10px;
- }
-
- .header__raw-link {
- font-size: 16px;
- font-weight: normal;
- }
-
- pre {
- background-color: #f5f5f5;
- counter-reset: line;
- font-size: 16px;
- margin: 0;
- 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">
- <span class="header__title">{{ snippet.title }}</span>
- <div class="header__right">
- <span class="header__date">{{ snippet.created_at | date(format="%Y-%m-%d %H:%M:%S") }} UTC</span>
- <a class="header__raw-link" href="/snippets/{{ snippet.uuid }}/raw">
- view raw
- </a>
- </div>
- </h1>
- <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>
- </div>
- </body>
- </html>
|