samjeston / openhub Public
Sam Jeston Working vertical 9aa3c45 · History
35 lines· 1.9 KB ·HTML
Raw
1{% extends "layout_repo.html" %}
2{% block page_title %}{{ commit.summary }} · {% endblock %}
3{% block content %}
4{% let base = r.base() %}
5<div class="box commit-header">
6 <div class="box-body">
7 <div class="commit-header-top">
8 <h1 class="commit-summary">{{ commit.summary }}</h1>
9 <a class="btn btn-sm" href="{{ base }}/tree/{{ commit.id }}">{{ crate::web::fmt::icon("code")|safe }} Browse files</a>
10 </div>
11 {% if !commit.body.is_empty() %}<pre class="commit-body">{{ commit.body }}</pre>{% endif %}
12 </div>
13 <div class="box-footer commit-footer">
14 <div class="commit-author">
15 {{ crate::web::fmt::avatar(commit.author_name, 20)|safe }}
16 <strong title="{{ commit.author_email }}">{{ commit.author_name }}</strong>
17 {% if commit.committer_name != commit.author_name %}authored <time title="{{ crate::web::fmt::datetime_full(commit.author_time) }}">{{ crate::web::fmt::ago(commit.author_time) }}</time> and <strong>{{ commit.committer_name }}</strong> committed{% else %}committed{% endif %}
18 <time title="{{ crate::web::fmt::datetime_full(commit.committer_time) }}">{{ crate::web::fmt::ago(commit.committer_time) }}</time>
19 </div>
20 <div class="commit-ids">
21 {% let parents = commit.short_parents() %}
22 {% if !parents.is_empty() %}
23 <span>{% if parents.len() == 1 %}1 parent{% else %}{{ parents.len() }} parents{% endif %}
24 {% for (full, short) in parents %}<a class="text-mono" href="{{ base }}/commit/{{ full }}">{{ short }}</a>{% if !loop.last %} + {% endif %}{% endfor %}
25 </span>
26 {% endif %}
27 <span>commit <span class="text-mono">{{ commit.id }}</span>
28 <button type="button" class="btn btn-sm btn-ghost btn-icon" data-copy-text="{{ commit.id }}" title="Copy full SHA">{{ crate::web::fmt::icon("copy")|safe }}</button>
29 </span>
30 </div>
31 </div>
32</div>
33{% let file_ref = commit.id.clone() %}
34{% include "partials/diff.html" %}
35{% endblock %}