Branch

repo.njk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
ac0345 Tucker McKnight
ac0345 Tucker McKnight
b8418b tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
b8418b tucker
b8418b tucker
b8418b tucker
b8418b tucker
b8418b tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
ac0345 tucker
<div class="row">
  <div class="col-md-8 col-sm-12 order-md-1 order-sm-2">
    {{ branch.repoName | getReadMe(branch.branchName) | renderContentIfAvailable("md") | safe }}
  </div>
  <div class="col-md-4 col-sm-12 order-md-2 order-sm-1">
    <div class="row">
      <div class="col">
        <div class="row align-items-center">
          <div class="col-auto">
            <h2 class="fs-6 my-0">Recent patches in {{branch.branchName}}</h2>
          </div>
          {% if rssAvailable %}
            <div class="col-auto">
              <a href="{{reposPath}}/{{ branch.repoName | slugify }}/branches/{{ branch.branchName | slugify }}/patches.xml" class="initialism">RSS<i class="bi bi-rss-fill ms-2" style="color: orange;"></i></a>
            </div>
          {% endif %}
        </div>
        {% for patch in repos[branch.repoName].branches[branch.branchName].patches | batch(3) | first %}
        <div class="card mt-2 mb-4">
          <div class="card-body">
            <a href="{{reposPath}}/{{branch.repoName | slugify}}/branches/{{branch.branchName | slugify}}/patches/{{patch.hash}}" class="text-primary d-inline-block card-title fs-5">{{patch.name}}</a>
            <p class="card-subtitle fs-6 mb-2 text-body-secondary">{{patch.date}}</p>
            <p class="card-subtitle fs-6 mb-2 text-body-secondary">{{patch.author}}</p>
            <p class="card-text">{{patch.description | truncate(150)}}</p>
          </div>
          <div class="card-footer">
            {% if reposConfig.repos[branch.repoName]._type == "darcs" %}
            <button data-hash="{{patch.hash}}" data-vcs="darcs" class="copy-btn btn btn-sm btn-outline-primary ms-2">
              <i class="bi-copy bi me-1"></i>darcs pull {{patch.hash | truncate(6, true, "")}}
            </button>
            {% elif reposConfig.repos[branch.repoName]._type == "git" %}
            <button data-hash="{{patch.hash}}" data-vcs="git" class="copy-btn btn btn-sm btn-outline-primary">
              {{patch.hash | truncate(8, true, "")}} <i class="bi-copy bi me-1"></i>
            </button>
            {% endif %}
          </div>
        </div>
        {% endfor %}
      </div>
    </div>
  </div>
</div>