Fix api_tokens.html template structure to properly extend base.html

parent 6e6a9a27
...@@ -4,22 +4,6 @@ ...@@ -4,22 +4,6 @@
{% block head %} {% block head %}
<style> <style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #f8fafc; }
.header { background: white; padding: 1rem 2rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.logo { font-size: 1.5rem; font-weight: 700; color: #667eea; }
.nav { display: flex; gap: 2rem; }
.nav a { text-decoration: none; color: #64748b; font-weight: 500; }
.nav a.active { color: #667eea; }
.user-menu { display: flex; align-items: center; gap: 1rem; position: relative; }
.user-icon { cursor: pointer; padding: 0.5rem; border-radius: 50%; background: #f8fafc; transition: background 0.2s; }
.user-icon:hover { background: #e2e8f0; }
.user-icon i { font-size: 1.2rem; color: #64748b; }
.user-dropdown { display: none; position: absolute; top: 100%; right: 0; background: white; min-width: 200px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); border-radius: 8px; z-index: 1000; }
.user-dropdown a { display: block; padding: 0.75rem 1rem; text-decoration: none; color: #374151; border-bottom: 1px solid #f1f5f9; }
.user-dropdown a:last-child { border-bottom: none; color: #dc2626; }
.user-dropdown a:hover { background: #f8fafc; }
.container { max-width: 1200px; margin: 2rem auto; padding: 0 2rem; } .container { max-width: 1200px; margin: 2rem auto; padding: 0 2rem; }
.tokens-card { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 2rem; } .tokens-card { background: white; padding: 2rem; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 2rem; }
.card-header { margin-bottom: 1.5rem; } .card-header { margin-bottom: 1.5rem; }
...@@ -48,38 +32,10 @@ ...@@ -48,38 +32,10 @@
.modal-header { margin-bottom: 1rem; } .modal-header { margin-bottom: 1rem; }
.modal-footer { text-align: right; margin-top: 1.5rem; } .modal-footer { text-align: right; margin-top: 1.5rem; }
</style> </style>
</head> {% endblock %}
<body>
<header class="header">
<div class="header-content">
<div class="logo">VidAI</div>
<nav class="nav">
<a href="/dashboard">Dashboard</a>
<a href="/analyze">Analyze</a>
<a href="/train">Train</a>
<a href="/history">History</a>
<a href="/api_tokens" class="active">API Tokens</a>
<a href="/settings">Settings</a>
</nav>
<div class="user-menu">
<div class="user-icon" onclick="toggleUserMenu()">
<i class="fas fa-user"></i>
</div>
<div id="userDropdown" class="user-dropdown">
<a href="/account">Account</a>
{% if user.get('role') != 'admin' %}
<a href="/api_tokens">Tokens</a>
{% else %}
<a href="/admin/users">Users</a>
<a href="/config">Configurations</a>
{% endif %}
<a href="/logout">Logout</a>
</div>
</div>
</div>
</header>
<div class="container"> {% block content %}
<div class="container">
<div class="tokens-card"> <div class="tokens-card">
<div class="card-header"> <div class="card-header">
<h3><i class="fas fa-plus"></i> Generate New API Token</h3> <h3><i class="fas fa-plus"></i> Generate New API Token</h3>
...@@ -218,5 +174,4 @@ ...@@ -218,5 +174,4 @@
dropdown.style.display = dropdown.style.display === 'block' ? 'none' : 'block'; dropdown.style.display = dropdown.style.display === 'block' ? 'none' : 'block';
} }
</script> </script>
</body> {% endblock %}
</html> \ No newline at end of file
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment