By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

 repo-commit.html

View raw Download
text/html • 4.31 kiB
HTML document, ASCII text
        
            
1
{% extends "repo.html" %}
2
3
{% set active_page = "log" %}
4
5
{% block title %}
6
{% trans message=data.message|split("\n\n")|first, username=username, repository=repository %}{{ basename }} in {{ username }}/{{ repository }}{% endtrans %}
7
{% endblock %}
8
{% block content %}
9
<x-vbox>
10
<x-frame style="--width: 896px;" class="flexible-space">
11
<x-vbox>
12
<article>
13
<h1>{{ data.message | split("\n\n", 1) | first | inline_markdown }}</h1>
14
{{ data.message | split("\n\n", 1) | last | markdown }}
15
</article>
16
17
<p>
18
{% trans owner_name=data.owner_name %}
19
<a href="/{{ owner_name }}">{{ owner_name }}</a>,<br>
20
{% endtrans %}
21
{% trans receive_date=data.receive_date.strftime('%A, %e %B %Y, %H:%M:%S'), author_date=data.author_date.strftime("%A, %e %B %Y, %H:%M:%S"),
22
receive_unix=data.receive_date.timestamp() | int, author_unix=data.author_date.timestamp() | int
23
%}
24
created on {{ author_date }} ({{ author_unix }}),
25
received on {{ receive_date }} ({{ receive_unix }})
26
{% endtrans %}
27
<br>
28
{% trans %}Author identity:{% endtrans %} <code>{{ data.owner_identity }}</code>
29
</p>
30
31
<code>{{ data.sha }}</code>
32
33
<x-vbox>
34
{% for file in diff %}
35
<article class="card">
36
<section class="card-main">
37
<h2>{{ file }}</h2>
38
{% set vars = namespace(original_line=0, modified_line=0, hunk_started=false) %}
39
{% for line in diff[file] %}
40
{% if line.startswith("@@") %}
41
{% if vars.hunk_started %}
42
</pre> <!-- close the previous pre block if this isn't the first hunk -->
43
{% endif %}
44
{% set vars.hunk_started = true %}
45
{% set diff_location = line|parse_diff_location %}
46
{% set vars.original_line = diff_location[0][0] %}
47
{% set vars.modified_line = diff_location[1][0] %}
48
<h3 class="diff-position">{{ line }}</h3>
49
<pre class="code-view">
50
{% elif vars.hunk_started %}
51
{% if line.startswith("+") %}
52
<span class="line-number">{{ vars.modified_line }}&nbsp;+</span>
53
<ins>{{ line[1:] }}</ins>
54
{% set vars.modified_line = vars.modified_line + 1 %}
55
{% elif line.startswith("-") %}
56
<span class="line-number">{{ vars.original_line }}&nbsp;-</span>
57
<del>{{ line[1:] }}</del>
58
{% set vars.original_line = vars.original_line + 1 %}
59
{% elif not line.startswith("\\") %}
60
{% if line %}
61
<span class="line-number">{{ vars.modified_line }}&nbsp;&nbsp;</span>
62
<x-codeline>{{ line[1:] }}</x-codeline>
63
{% endif %}
64
{% if not line.startswith("@@") %}
65
{% set vars.original_line = vars.original_line + 1 %}
66
{% set vars.modified_line = vars.modified_line + 1 %}
67
{% endif %}
68
{% endif %}
69
{% endif %}
70
{% endfor %}
71
{% if vars.hunk_started %}
72
</pre> <!-- close the last hunk -->
73
{% endif %}
74
</section>
75
</article>
76
{% endfor %}
77
</x-vbox>
78
</x-vbox>
79
</x-frame>
80
</x-vbox>
81
{% endblock %}
82