SPB Git

Repository Public MIT Selected

repo-row.njk 2.9 KB 31 lines jinja

1{#2  ─────────────────────────────────────────────3   SPB Git — Personal Git Platform4  ─────────────────────────────────────────────5   Author  : Simon-Pierre Boucher6   Contact : contact@spboucher.ai7   File    : src/web/views/partials/repo-row.njk8   Purpose : One line of the repository index — serif name, description, language, commits, size, last push, 26-week sparkline9   License : MIT © Simon-Pierre Boucher10  ─────────────────────────────────────────────11#}{% import "components/ui.njk" as ui %}12<article class="repo-card repo-row" data-name="{{ repo.name }}"13  data-description="{{ repo.description }}"14  data-language="{{ repo.topLanguage or '' }}"15  data-topics="{{ repo.topics | join(',') }}"16  data-pushed="{{ repo.lastPush or '' }}"17  data-created="{{ repo.created or '' }}"18  data-commits="{{ repo.commitCount or 0 }}">19  <span class="ix-no" aria-hidden="true"></span>20  <div class="ix-name">21    <h3 class="repo-row-name"><a href="/{{ repo.name }}">{{ repo.name }}</a>{% if repo.pinned %}<span class="row-flag" title="Selected repository">Selected</span>{% endif %}{% if repo.research or repo.researchDetected %}<span class="row-flag" title="Research repository">Research</span>{% endif %}</h3>22    {% if repo.description %}<p class="repo-row-desc">{{ repo.description }}</p>{% endif %}23    {% if repo.topics.length %}<p class="repo-row-topics">{% for topic in repo.topics %}{% if loop.index <= 5 %}<a href="/search?q={{ topic | urlencode }}">{{ topic }}</a>{% endif %}{% endfor %}</p>{% endif %}24  </div>25  <span class="ix-lang">{% if repo.topLanguage %}<span class="lang-dot-label"><span class="lang-dot" style="background:{{ repo.topLanguage | langcolor }}"></span>{{ repo.topLanguage }}</span>{% else %}<span class="ix-nil">—</span>{% endif %}</span>26  <span class="ix-num" title="Commits on {{ repo.defaultBranch }}"><span class="ix-cap">Commits</span>{{ repo.commitCount | num if repo.commitCount else '—' }}</span>27  <span class="ix-num ix-size" title="Size on disk"><span class="ix-cap">Size</span>{{ repo.sizeBytes | bytes }}</span>28  <span class="ix-num">{% if repo.lastPush %}<span class="ix-cap ix-cap-pushed">Pushed</span><time datetime="{{ repo.lastPush }}" title="{{ repo.lastPush | dateexact }}">{{ repo.lastPush | reltime }}</time>{% else %}<span class="ix-nil">empty</span>{% endif %}</span>29  <span class="ix-spark">{% if repo.spark %}<svg class="spark {{ 'spark-quiet' if repo.spark.total == 0 }}" viewBox="0 0 120 34" preserveAspectRatio="none" role="img" aria-label="{{ repo.spark.total | num }} commits in the last 26 weeks"><path class="spark-area" d="{{ repo.spark.area }}"/><path class="spark-line" d="{{ repo.spark.path }}"/></svg>{% endif %}</span>30</article>31
Files main
Menu

Theme