markdownViewer/app/templates/upload.html
2025-03-22 02:13:26 +01:00

40 lines
No EOL
1.1 KiB
HTML

{% extends "base.html" %}
{% block content %}
<h1>Upload Markdown File</h1>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="messages">
{% for message in messages %}
<p class="alert">{{ message }}</p>
{% endfor %}
</div>
{% endif %}
{% endwith %}
<form method="post" enctype="multipart/form-data">
<div>
<label for="file">Select a markdown file:</label>
<input type="file" name="file" id="file" accept=".md">
</div>
<div>
<label for="raw_url">Or enter a URL:</label>
<input type="url" name="raw_url" id="raw_url" placeholder="https://example.com/markdown-file.md">
</div>
<div>
<label for="custom_uri">Custom URI (optional):</label>
<input type="text" name="custom_uri" id="custom_uri" placeholder="e.g., my-document">
<small>Leave blank for an auto-generated URI</small>
</div>
<div>
<button class="glass" type="submit">Submit</button>
</div>
</form>
<button class="glass" href="{{ url_for('main.index') }}">Back to Home</button>
{% endblock %}