Initial commit: ap_ds Code Repository System v1.0.0
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ metadata.name }} - ap_ds{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="repo-container">
|
||||
<div class="repo-card repo-mb-4">
|
||||
<div class="repo-card__body">
|
||||
<div class="repo-flex repo-justify-between repo-items-center">
|
||||
<div>
|
||||
<h2 class="repo-text-lg repo-font-semibold">{{ metadata.name }}</h2>
|
||||
<div class="repo-text-sm repo-text-tertiary repo-mt-1">
|
||||
{{ metadata.size }} 字节 · 最后修改 {{ metadata.modified }} · 类型: {{ metadata.extension }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="repo-flex repo-gap-2">
|
||||
<a href="{{ url_for('download_file', file_path=metadata.path) }}" class="repo-btn repo-btn--sm repo-btn--primary">下载文件</a>
|
||||
<a href="{{ url_for('code_browser') }}?branch={{ branch }}&version={{ version }}" class="repo-btn repo-btn--sm repo-btn--ghost">返回</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if is_text %}
|
||||
<div class="repo-card">
|
||||
<div class="repo-card__body">
|
||||
<pre style="background: var(--repo-color-bg-tertiary); padding: 1rem; border-radius: 8px; overflow-x: auto; font-family: monospace; font-size: 13px;">{{ content }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="repo-card repo-text-center repo-py-8">
|
||||
<div class="repo-card__body">
|
||||
<span class="icon-file" style="font-size: 4rem; color: var(--repo-color-text-tertiary);"></span>
|
||||
<p class="repo-text-secondary repo-mt-4">此文件类型无法在线预览</p>
|
||||
<a href="{{ url_for('download_file', file_path=metadata.path) }}" class="repo-btn repo-btn--primary repo-mt-4">下载文件</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user