Files
qr-code_manager/templates/link_page.html
2025-07-15 13:55:52 +03:00

282 lines
7.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title }}</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 800px;
margin: 0 auto;
background: white;
border-radius: 15px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
overflow: hidden;
}
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 40px 30px;
text-align: center;
}
.header h1 {
font-size: 2.5em;
margin-bottom: 10px;
font-weight: 300;
}
.header p {
font-size: 1.1em;
opacity: 0.9;
}
.stats {
background: rgba(255,255,255,0.1);
margin-top: 20px;
padding: 15px;
border-radius: 10px;
display: flex;
justify-content: center;
gap: 30px;
}
.stat-item {
text-align: center;
}
.stat-number {
font-size: 1.5em;
font-weight: bold;
}
.stat-label {
font-size: 0.9em;
opacity: 0.8;
margin-top: 5px;
}
.content {
padding: 30px;
}
.links-section h2 {
color: #333;
margin-bottom: 25px;
font-size: 1.8em;
text-align: center;
}
.link-item {
background: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 12px;
padding: 20px;
margin-bottom: 15px;
transition: all 0.3s ease;
cursor: pointer;
text-decoration: none;
display: block;
color: inherit;
}
.link-item:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
border-color: #667eea;
}
.link-title {
font-size: 1.3em;
font-weight: 600;
color: #333;
margin-bottom: 8px;
display: flex;
align-items: center;
gap: 10px;
}
.link-icon {
width: 20px;
height: 20px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 12px;
}
.link-description {
color: #666;
font-size: 0.95em;
line-height: 1.4;
margin-bottom: 10px;
}
.link-url {
color: #667eea;
font-size: 0.9em;
font-weight: 500;
}
.empty-state {
text-align: center;
padding: 60px 20px;
color: #666;
}
.empty-state .icon {
font-size: 4em;
margin-bottom: 20px;
opacity: 0.5;
}
.empty-state h3 {
font-size: 1.5em;
margin-bottom: 10px;
color: #333;
}
.footer {
background: #f8f9fa;
padding: 20px;
text-align: center;
border-top: 1px solid #e9ecef;
color: #666;
font-size: 0.9em;
}
.footer a {
color: #667eea;
text-decoration: none;
font-weight: 500;
}
.footer a:hover {
text-decoration: underline;
}
.last-updated {
margin-top: 10px;
font-size: 0.8em;
opacity: 0.7;
}
@media (max-width: 768px) {
.header {
padding: 30px 20px;
}
.header h1 {
font-size: 2em;
}
.content {
padding: 20px;
}
.stats {
flex-direction: column;
gap: 15px;
}
}
/* Link animation */
@keyframes linkPulse {
0% { transform: scale(1); }
50% { transform: scale(1.02); }
100% { transform: scale(1); }
}
.link-item:active {
animation: linkPulse 0.2s ease;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>{{ page.title }}</h1>
<p>{{ page.description }}</p>
<div class="stats">
<div class="stat-item">
<div class="stat-number">{{ page.links|length }}</div>
<div class="stat-label">Links</div>
</div>
<div class="stat-item">
<div class="stat-number">{{ page.view_count }}</div>
<div class="stat-label">Views</div>
</div>
</div>
</div>
<div class="content">
<div class="links-section">
{% if page.links %}
<h2>📚 Available Links</h2>
{% for link in page.links %}
<a href="{{ link.url }}" target="_blank" class="link-item">
<div class="link-title">
<div class="link-icon">🔗</div>
{{ link.title }}
</div>
{% if link.description %}
<div class="link-description">{{ link.description }}</div>
{% endif %}
<div class="link-url">{{ link.url }}</div>
</a>
{% endfor %}
{% else %}
<div class="empty-state">
<div class="icon">📝</div>
<h3>No links yet</h3>
<p>This collection is empty. Check back later for new links!</p>
</div>
{% endif %}
</div>
</div>
<div class="footer">
<p>Powered by <a href="/">QR Code Manager</a></p>
{% if page.updated_at %}
<div class="last-updated">
Last updated: {{ page.updated_at[:10] }} at {{ page.updated_at[11:19] }}
</div>
{% endif %}
</div>
</div>
<script>
// Add click tracking (optional)
document.querySelectorAll('.link-item').forEach(link => {
link.addEventListener('click', function() {
// You could add analytics here
console.log('Link clicked:', this.querySelector('.link-title').textContent.trim());
});
});
// Auto-refresh every 30 seconds to get latest links
setInterval(() => {
window.location.reload();
}, 30000);
</script>
</body>
</html>