Files
damn_simple_architecture/dsx/dsx_server/templates/components/file_tree.html.tera
T

35 lines
1.6 KiB
Plaintext

<!-- File tree -->
<div class="pkg-main">
<div class="file-tree">
<div class="file-toolbar">
<div class="file-toolbar-search">
<svg class="file-toolbar-search-icon" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
<form method="get" action="/packages/{{ meta.id }}/~repo">
<input type="text" name="q" placeholder="Filter files…" value="{{ query | default(value='') }}">
</form>
</div>
<span class="dim small mono">{{ current_path | default(value="/") }}</span>
</div>
{% if files and files | length > 0 %}
<div class="file-tree-body">
{% if current_path %}
<a class="file-row" href="/packages/{{ meta.id }}/~repo/{{ parent_path | default(value='') }}">
<span class="file-icon">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/></svg>
</span>
<span class="file-name" style="color:var(--text-dim)">..</span>
</a>
{% endif %}
{% for file in files %}
{{ files::file_view(package = meta.id, file = file) }}
{% endfor %}
</div>
{% else %}
<div class="file-tree-empty">No files found.</div>
{% endif %}
</div>
</div>