| 1 |
{% extends "base.html" %} |
| 2 |
{% import "repo_tabs.html" as m %} |
| 3 |
{% block title %}History of {% if name.is_empty() %}lines {{ start }}–{{ end }}{% else %}{{ name }}{% endif %} · {{ path }} · {{ repo.owner }}/{{ repo.name }}{% endblock %} |
| 4 |
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %} |
| 5 |
{% block tabs %}{% call m::tabs(repo, "code") %}{% endblock %} |
| 6 |
{% block content %} |
| 7 |
<div class="head"><h1>History of <code>{% if name.is_empty() %}lines {{ start }}–{{ end }}{% else %}{{ name }}{% endif %}</code> <small>{{ entries.len() }} change{% if entries.len() != 1 %}s{% endif %}</small></h1> |
| 8 |
<p class="small mute">In <a href="{{ repo.url }}/file/{{ r }}/{{ path }}#L{{ start }}">{{ path }}</a>, lines {{ start }}–{{ end }} on {{ r }}. Every change that wrote or deleted one of these lines, or deleted a line from between them. Exact, because each line keeps its identity across edits; edits elsewhere in the file are not here. Also: <code>oxy log -L {{ start }},{{ end }}:{{ path }}</code>.</p></div> |
| 9 |
{% if entries.is_empty() %}<p class="empty">No changes.</p>{% else %} |
| 10 |
<div class="hist" style="--lanes: {{ lanes }}"> |
| 11 |
{% for c in entries %} |
| 12 |
{% let row = rows[loop.index0] %} |
| 13 |
<div class="hrow"> |
| 14 |
<svg class="lanes" width="{{ lanes * 18 + 4 }}" height="100%" viewBox="0 0 {{ lanes * 18 + 4 }} 60" preserveAspectRatio="none" aria-hidden="true"> |
| 15 |
{% for l in row.through %}<line x1="{{ l * 18 + 10 }}" y1="0" x2="{{ l * 18 + 10 }}" y2="60" class="lane"/>{% endfor %} |
| 16 |
{% for e in row.edges %}<path d="M{{ e.0 * 18 + 10 }} 30 L{{ e.0 * 18 + 10 }} 44 L{{ e.1 * 18 + 10 }} 60" class="lane"/>{% endfor %} |
| 17 |
<line x1="{{ row.lane * 18 + 10 }}" y1="0" x2="{{ row.lane * 18 + 10 }}" y2="30" class="lane{% if loop.first %} none{% endif %}"/> |
| 18 |
<circle cx="{{ row.lane * 18 + 10 }}" cy="30" r="4" class="node{% if c.resolution %} res{% endif %}"/> |
| 19 |
</svg> |
| 20 |
{% call m::change_row(repo, c) %} |
| 21 |
</div> |
| 22 |
{% endfor %} |
| 23 |
</div> |
| 24 |
{% endif %} |
| 25 |
{% endblock %} |