60 lines
2.6 KiB
HTML
60 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
||
{% block title %}Proje Yükleme — Key Ajansı{% endblock %}
|
||
{% block content %}
|
||
|
||
<section class="auth-single">
|
||
<div class="form-card form-card-wide">
|
||
<h2 class="form-title">Proje Yükle</h2>
|
||
<p class="form-note">Yeni projenizi GitHub'a benzer şekilde ekleyin. İstediğiniz zaman kaldırabilir veya dosyayı geri indirebilirsiniz.</p>
|
||
|
||
<form method="post" action="{{ url_for('projects.do_upload') }}" enctype="multipart/form-data">
|
||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||
<label>Başlık
|
||
<input type="text" name="title" maxlength="150" placeholder="Proje adı" required>
|
||
</label>
|
||
<label>Açıklama
|
||
<textarea name="description" maxlength="5000" rows="5" placeholder="Proje hakkında kısa bilgi"></textarea>
|
||
</label>
|
||
<label>Etiketler
|
||
<input type="text" name="tags" maxlength="300" placeholder="örn. web, tasarım, python">
|
||
</label>
|
||
<label>Bağlantı (isteğe bağlı)
|
||
<input type="url" name="link" maxlength="500" placeholder="https://…">
|
||
</label>
|
||
<label>Dosya (isteğe bağlı)
|
||
<input type="file" name="file" accept=".png,.jpg,.jpeg,.gif,.webp,.pdf,.zip,.rar,.7z,.tar,.gz,.txt,.md,.doc,.docx,.ppt,.pptx,.xls,.xlsx">
|
||
</label>
|
||
<button class="btn btn-primary btn-block" type="submit">Projeyi Yükle</button>
|
||
</form>
|
||
</div>
|
||
</section>
|
||
|
||
<section class="section">
|
||
<h2 class="section-title">Yüklenen Projeler</h2>
|
||
{% if projects %}
|
||
<div class="admin-list">
|
||
{% for p in projects %}
|
||
<div class="admin-row">
|
||
<div class="admin-row-main">
|
||
<span class="proj-title">{{ p.title }}</span>
|
||
<span class="admin-row-meta">{{ p.created_at }} · {% if p.size %}{{ (p.size / 1024) | round(1) }} KB{% else %}dosya yok{% endif %}</span>
|
||
</div>
|
||
<div class="admin-row-actions">
|
||
<a class="btn btn-ghost" href="{{ url_for('index') }}#projeler">Gör</a>
|
||
{% if p.stored_name %}
|
||
<a class="btn btn-primary" href="{{ url_for('projects.download', pid=p.id) }}">İndir</a>
|
||
{% endif %}
|
||
<form class="inline-form" method="post" action="{{ url_for('projects.do_delete', pid=p.id) }}">
|
||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||
<button class="btn btn-danger" type="submit" onclick="return confirm('Bu proje silinsin mi?')">Sil</button>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
{% else %}
|
||
<p class="empty-note">Henüz proje yüklenmedi.</p>
|
||
{% endif %}
|
||
</section>
|
||
|
||
{% endblock %} |