SPB Git

spb/spbgit Public MIT

SPB Git — the platform hosting itself

JavaScript 73.9% CSS 11.7% Nunjucks 11.6% Shell 2.7%
1.7 KB · 42 lines jinja
Raw Blame History
1{#2  ─────────────────────────────────────────────3   SPB Git — Personal Git Platform4  ─────────────────────────────────────────────5   Author  : Simon-Pierre Boucher6   Contact : contact@spboucher.ai7   File    : src/web/views/branches.njk8   Purpose : Branch list with ahead/behind vs default9   License : MIT © Simon-Pierre Boucher10  ─────────────────────────────────────────────11#}{% extends "layout.njk" %}12{% block content %}13{% include "partials/repo-header.njk" %}1415<table class="ref-table">16  <thead><tr><th>Branch</th><th>Last commit</th><th>Ahead / behind {{ overview.defaultBranch }}</th></tr></thead>17  <tbody>18    {% for branch in branchesDetailed %}19    <tr>20      <td>21        <a class="ref-name" href="/{{ overview.name }}/tree/{{ branch.name }}">{{ branch.name }}</a>22        {% if branch.isDefault %}<span class="chip chip-default">default</span>{% endif %}23      </td>24      <td class="muted">{{ branch.subject | truncate(60) }} · {{ branch.date | reltime }}</td>25      <td>26        {% if branch.isDefault %}27        <span class="muted">—</span>28        {% else %}29        <span class="ahead-behind">30          <span class="diff-add" title="{{ branch.ahead }} ahead">↑{{ branch.ahead }}</span>31          <span class="diff-del" title="{{ branch.behind }} behind">↓{{ branch.behind }}</span>32        </span>33        {% endif %}34      </td>35    </tr>36    {% else %}37    <tr><td colspan="3" class="muted">No branches yet.</td></tr>38    {% endfor %}39  </tbody>40</table>41{% endblock %}42