forked from spitkov/sxbin
69 lines
2.5 KiB
HTML
69 lines
2.5 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>Content Info</title>
|
||
|
<style>
|
||
|
body {
|
||
|
font-family: Arial, sans-serif;
|
||
|
line-height: 1.6;
|
||
|
margin: 0;
|
||
|
padding: 20px;
|
||
|
background-color: #1a1a1a;
|
||
|
color: #f0f0f0;
|
||
|
}
|
||
|
.container {
|
||
|
max-width: 800px;
|
||
|
margin: 0 auto;
|
||
|
}
|
||
|
h2 {
|
||
|
color: #4CAF50;
|
||
|
}
|
||
|
.info-item {
|
||
|
margin-bottom: 10px;
|
||
|
}
|
||
|
.btn {
|
||
|
display: inline-block;
|
||
|
background-color: #4CAF50;
|
||
|
color: white;
|
||
|
padding: 8px 12px;
|
||
|
text-decoration: none;
|
||
|
border-radius: 4px;
|
||
|
margin: 5px 0;
|
||
|
}
|
||
|
.btn:hover {
|
||
|
background-color: #45a049;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="container">
|
||
|
<h2>Content Information</h2>
|
||
|
<div class="info-item"><strong>Type:</strong> {{ info.type }}</div>
|
||
|
<div class="info-item"><strong>Vanity URL:</strong> {{ info.vanity }}</div>
|
||
|
<div class="info-item"><strong>Created At:</strong> {{ info.created_at }}</div>
|
||
|
<div class="info-item"><strong>Uploaded By:</strong> {{ info.username }}</div>
|
||
|
{% if info.type == 'file' %}
|
||
|
<div class="info-item"><strong>Filename:</strong> {{ info.data }}</div>
|
||
|
{% if info.file_size %}
|
||
|
<div class="info-item"><strong>File Size:</strong> {{ info.file_size }} bytes</div>
|
||
|
{% endif %}
|
||
|
{% elif info.type == 'url' %}
|
||
|
<div class="info-item"><strong>Target URL:</strong> {{ info.data }}</div>
|
||
|
{% endif %}
|
||
|
<a href="{{ url_for('redirect_vanity', vanity=info.vanity) }}" class="btn">View Content</a>
|
||
|
{% if info.type == 'file' %}
|
||
|
<a href="{{ url_for('redirect_vanity', vanity=info.vanity) }}/download" class="btn">Download</a>
|
||
|
{% endif %}
|
||
|
{% if current_user.is_authenticated and current_user.username == info.username %}
|
||
|
{% if info.type != 'file' or not info.is_media %}
|
||
|
<a href="{{ url_for('edit_content', vanity=info.vanity) }}" class="btn">Edit</a>
|
||
|
{% endif %}
|
||
|
<form action="{{ url_for('delete_content', vanity=info.vanity) }}" method="post" style="display: inline;">
|
||
|
<button type="submit" class="btn">Delete</button>
|
||
|
</form>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|