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 · 37 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/tree.njk8   Purpose : Directory browsing — breadcrumb + file table9   License : MIT © Simon-Pierre Boucher10  ─────────────────────────────────────────────11#}{% extends "layout.njk" %}12{% block content %}13{% include "partials/repo-header.njk" %}1415<div class="repo-toolbar">16  <div class="ref-select-wrap">17    <label class="sr-only" for="ref-select">Branch</label>18    <select id="ref-select" class="ref-select" data-repo="{{ overview.name }}" data-kind="tree" data-path="{{ path }}">19      {% for branch in branches %}20      <option value="{{ branch.name }}" {{ 'selected' if branch.name == currentRef }}>{{ branch.name }}{{ ' (default)' if branch.isDefault }}</option>21      {% endfor %}22      {% for tag in tags %}23      <option value="{{ tag.name }}" {{ 'selected' if tag.name == currentRef }}>tag: {{ tag.name }}</option>24      {% endfor %}25    </select>26  </div>27  <nav class="path-breadcrumb" aria-label="Path">28    <a href="/{{ overview.name }}">{{ overview.name }}</a>29    {% for crumb in crumbs %}30    <span class="crumb-sep">/</span>{% if loop.last %}<strong>{{ crumb.name }}</strong>{% else %}<a href="{{ crumb.href }}">{{ crumb.name }}</a>{% endif %}31    {% endfor %}32  </nav>33</div>3435{% include "partials/file-table.njk" %}36{% endblock %}37