348 lines
12 KiB
HTML
348 lines
12 KiB
HTML
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html lang="en" data-theme="{% if user.is_authenticated %}{{ user.profile.theme_preference }}{% else %}dark{% endif %}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}Phantom Card Fam - Premium TCG Store{% endblock %}</title>
|
|
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
|
{% if not debug %}
|
|
<script async defer src="https://tianji.aimloperations.com/tracker.js" data-website-id="cmklg5jenh4wx14nrurt5yqyl"></script>
|
|
{% endif %}
|
|
<style>
|
|
:root {
|
|
--primary-color: #6366f1;
|
|
--secondary-color: #a855f7;
|
|
--bg-color: #0f172a;
|
|
--text-color: #f8fafc;
|
|
--card-bg: #1e293b;
|
|
--border-color: #334155;
|
|
}
|
|
|
|
[data-theme="light"] {
|
|
--primary-color: #4f46e5;
|
|
--secondary-color: #9333ea;
|
|
--bg-color: #f8fafc;
|
|
--text-color: #0f172a;
|
|
--card-bg: #ffffff;
|
|
--border-color: #e2e8f0;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
|
background-color: var(--bg-color);
|
|
color: var(--text-color);
|
|
margin: 0;
|
|
line-height: 1.5;
|
|
transition: background-color 0.3s, color 0.3s;
|
|
}
|
|
|
|
nav {
|
|
background-color: var(--card-bg);
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding: 1rem 2rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.nav-brand {
|
|
font-size: 1.5rem;
|
|
font-weight: 800;
|
|
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.nav-links a {
|
|
color: var(--text-color);
|
|
text-decoration: none;
|
|
margin-left: 1.5rem;
|
|
font-weight: 500;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.nav-links a:hover {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 2rem auto;
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
.btn {
|
|
display: inline-block;
|
|
padding: 0.5rem 1rem;
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: 0.375rem;
|
|
font-weight: 600;
|
|
transition: opacity 0.2s;
|
|
border: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.card-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
gap: 2rem;
|
|
}
|
|
|
|
.tcg-card {
|
|
background-color: var(--card-bg);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 0.5rem;
|
|
overflow: hidden;
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.tcg-card:hover {
|
|
transform: translateY(-4px);
|
|
}
|
|
|
|
.tcg-card img {
|
|
width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
}
|
|
|
|
.tcg-card-body {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.messages {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.messages li {
|
|
padding: 1rem;
|
|
border-radius: 0.375rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.messages .success { background-color: #064e3b; color: #a7f3d0; }
|
|
.messages .error { background-color: #7f1d1d; color: #fecaca; }
|
|
[data-theme="light"] .messages .success { background-color: #d1fae5; color: #065f46; }
|
|
[data-theme="light"] .messages .error { background-color: #fce7f3; color: #9d174d; }
|
|
|
|
/* Auth Modal Styles */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.7);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 1000;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transition: opacity 0.3s, visibility 0.3s;
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
|
|
.modal-overlay.active {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
}
|
|
|
|
.auth-modal {
|
|
background-color: var(--card-bg);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 0.75rem;
|
|
padding: 2rem;
|
|
max-width: 400px;
|
|
width: 90%;
|
|
text-align: center;
|
|
transform: translateY(20px);
|
|
transition: transform 0.3s;
|
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
.modal-overlay.active .auth-modal {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.auth-modal h2 {
|
|
margin-top: 0;
|
|
color: var(--primary-color);
|
|
font-size: 1.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.auth-modal p {
|
|
margin-bottom: 2rem;
|
|
color: var(--text-color);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.auth-modal-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
justify-content: center;
|
|
}
|
|
|
|
.btn-outline {
|
|
background-color: transparent;
|
|
border: 1px solid var(--primary-color);
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.btn-outline:hover {
|
|
background-color: rgba(99, 102, 241, 0.1);
|
|
}
|
|
|
|
.close-modal {
|
|
position: absolute;
|
|
top: 1rem;
|
|
right: 1rem;
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-color);
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
opacity: 0.5;
|
|
padding: 0;
|
|
line-height: 1;
|
|
}
|
|
|
|
.close-modal:hover {
|
|
opacity: 1;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div style="background: #f59e0b; color: #000; text-align: center; padding: 0.5rem; font-weight: 600; font-size: 0.875rem;">
|
|
DEMO SITE: This is an example application. No real products, payments, or purchases are processed.
|
|
</div>
|
|
<nav>
|
|
<a href="{% url 'home' %}" class="nav-brand">Phantom Card Fam</a>
|
|
<div class="nav-links">
|
|
<a href="{% url 'store:card_list' %}">Browse</a>
|
|
<a href="{% url 'store:pack_list' %}">Packs</a>
|
|
{% if user.is_authenticated %}
|
|
<a href="{% url 'decks:deck_list' %}">Decks</a>
|
|
<a href="{% url 'users:vault' %}">Vault</a>
|
|
<a href="{% url 'store:my_packs' %}">My Packs</a>
|
|
<a href="{% url 'store:cart' %}">Cart ({{ user.cart.items.count|default:0 }})</a>
|
|
<a href="{% url 'users:profile' %}">Profile</a>
|
|
<form action="{% url 'logout' %}" method="post" style="display:inline;">
|
|
{% csrf_token %}
|
|
<button type="submit" class="btn" style="background:none; color:var(--text-color); margin-left:1rem;">Logout</button>
|
|
</form>
|
|
{% else %}
|
|
<a href="{% url 'decks:deck_list' %}"
|
|
class="auth-required"
|
|
data-feature-title="Deck Builder"
|
|
data-feature-desc="Build and save custom decks, analyze mana curves, and prepare your strategies for battle. Create an account to start building!">Decks</a>
|
|
|
|
<a href="{% url 'users:vault' %}"
|
|
class="auth-required"
|
|
data-feature-title="Collection Vault"
|
|
data-feature-desc="Track your entire card collection, monitor value trends, and manage your inventory in one place. Log in to access your Vault.">Vault</a>
|
|
|
|
<a href="{% url 'store:my_packs' %}"
|
|
class="auth-required"
|
|
data-feature-title="My Packs"
|
|
data-feature-desc="Open virtual packs, collect rare cards, and grow your digital library. Sign up now to start cracking packs!">My Packs</a>
|
|
|
|
<a href="{% url 'login' %}">Login</a>
|
|
<a href="{% url 'users:register' %}">Register</a>
|
|
{% endif %}
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container">
|
|
{% if messages %}
|
|
<ul class="messages">
|
|
{% for message in messages %}
|
|
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
{% block content %}
|
|
{% endblock %}
|
|
</div>
|
|
|
|
<footer style="text-align: center; padding: 2rem; color: #64748b; font-size: 0.875rem;">
|
|
<p>© 2026 Phantom Card Fam TCG Store.</p>
|
|
<p>Made by <a href="https://aimloperations.com" target="_blank" style="color: inherit; text-decoration: underline;">AI ML Operations, LLC</a></p>
|
|
</footer>
|
|
|
|
{% if not user.is_authenticated %}
|
|
<div id="authModal" class="modal-overlay">
|
|
<div class="auth-modal">
|
|
<button class="close-modal" aria-label="Close modal">×</button>
|
|
<h2 id="modalTitle">Login Required</h2>
|
|
<p id="modalDesc">Please log in to access this feature.</p>
|
|
<div class="auth-modal-actions">
|
|
<a href="{% url 'login' %}" class="btn">Log In</a>
|
|
<a href="{% url 'users:register' %}" class="btn btn-outline">Create Account</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const modal = document.getElementById('authModal');
|
|
const closeBtn = document.querySelector('.close-modal');
|
|
const modalTitle = document.getElementById('modalTitle');
|
|
const modalDesc = document.getElementById('modalDesc');
|
|
const authLinks = document.querySelectorAll('.auth-required');
|
|
|
|
function openModal(title, desc) {
|
|
modalTitle.textContent = title;
|
|
modalDesc.textContent = desc;
|
|
modal.classList.add('active');
|
|
document.body.style.overflow = 'hidden'; // Prevent scrolling
|
|
}
|
|
|
|
function closeModal() {
|
|
modal.classList.remove('active');
|
|
document.body.style.overflow = '';
|
|
}
|
|
|
|
authLinks.forEach(link => {
|
|
link.addEventListener('click', function(e) {
|
|
e.preventDefault();
|
|
const title = this.dataset.featureTitle || 'Login Required';
|
|
const desc = this.dataset.featureDesc || 'Please log in to access this feature.';
|
|
openModal(title, desc);
|
|
});
|
|
});
|
|
|
|
closeBtn.addEventListener('click', closeModal);
|
|
|
|
// Close on outside click
|
|
modal.addEventListener('click', function(e) {
|
|
if (e.target === modal) {
|
|
closeModal();
|
|
}
|
|
});
|
|
|
|
// Close on Escape key
|
|
document.addEventListener('keydown', function(e) {
|
|
if (e.key === 'Escape' && modal.classList.contains('active')) {
|
|
closeModal();
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{% endif %}
|
|
</body>
|
|
</html>
|