2024-09-10 19:41:49 +02:00
<!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 %}
2024-09-10 20:16:06 +02:00
< a href = "{{ url_for('redirect_vanity', vanity=info.vanity)|replace('/download', '') }}" class = "btn" > View/Embed< / a >
< a href = "{{ url_for('redirect_vanity', vanity=info.vanity) ~ ('/download' if '/download' not in url_for('redirect_vanity', vanity=info.vanity) else '') }}" class = "btn" > Download< / a >
2024-09-10 19:41:49 +02:00
{% elif info.type == 'url' %}
< div class = "info-item" > < strong > Target URL:< / strong > {{ info.data }}< / div >
2024-09-10 20:16:06 +02:00
< a href = "{{ url_for('redirect_vanity', vanity=info.vanity) }}" class = "btn" > Visit URL< / a >
{% elif info.type == 'pastebin' %}
< a href = "{{ url_for('redirect_vanity', vanity=info.vanity) }}" class = "btn" > View Pastebin< / a >
< a href = "{{ url_for('raw_vanity', vanity=info.vanity) }}" class = "btn" > View Raw< / a >
2024-09-10 19:41:49 +02:00
{% 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 >