a73x

src/server/http/templates/diff.html

Ref:   Size: 864 B

{% extends "repo_base.html" %}

{% block title %}{{ short_id }} — {{ repo_name }} — {{ site_title }}{% endblock %}

{% block content %}
<h2 class="mono">{{ short_id }}</h2>
<p><strong>{{ summary }}</strong></p>
<p style="color: #666;">{{ author }} &nbsp; {{ date }}</p>
{% if !body.is_empty() %}
<pre style="background: #f8f8f8; padding: 12px; border-radius: 4px; white-space: pre-wrap;">{{ body }}</pre>
{% endif %}
<hr style="margin: 16px 0;">
<pre class="diff">{% for line in diff_lines %}{% if line.kind == "add" %}<span class="diff-add">{{ line.text }}</span>{% elif line.kind == "del" %}<span class="diff-del">{{ line.text }}</span>{% elif line.kind == "hunk" %}<span class="diff-hunk">{{ line.text }}</span>{% elif line.kind == "file" %}<span class="diff-file">{{ line.text }}</span>{% else %}{{ line.text }}{% endif %}{% endfor %}</pre>
{% endblock %}