Upload files to "templates"
This commit is contained in:
372
templates/base.html
Normal file
372
templates/base.html
Normal file
@@ -0,0 +1,372 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}KittyRec INDEV{% endblock %}</title>
|
||||
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/static/kittyrec_icon.png">
|
||||
<link rel="apple-touch-icon" href="/static/kittyrec_icon.png">
|
||||
<link rel="stylesheet" href="/static/admin/admin.css">
|
||||
<style>
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
:root {
|
||||
--bg: #0b0b14;
|
||||
--bg2: #12121f;
|
||||
--bg3: #1a1a2e;
|
||||
--bg4: #222240;
|
||||
--border: #2a2a4a;
|
||||
--purple: #7c3aed;
|
||||
--purple-l: #a855f7;
|
||||
--teal: #06b6d4;
|
||||
--pink: #ec4899;
|
||||
--green: #10b981;
|
||||
--yellow: #f59e0b;
|
||||
--red: #ef4444;
|
||||
--text: #e2e8f0;
|
||||
--text2: #94a3b8;
|
||||
--text3: #475569;
|
||||
--radius: 10px;
|
||||
--shadow: 0 4px 24px rgba(0,0,0,0.6);
|
||||
}
|
||||
|
||||
html, body { height: 100%; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* ── Nav ── */
|
||||
nav {
|
||||
background: rgba(18,18,31,.92);
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding: 0 1.75rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 52px;
|
||||
gap: 1.25rem;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
backdrop-filter: blur(12px);
|
||||
-webkit-backdrop-filter: blur(12px);
|
||||
}
|
||||
.nav-brand {
|
||||
font-weight: 800;
|
||||
font-size: 1rem;
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
letter-spacing: -.3px;
|
||||
}
|
||||
.nav-brand .cat { width: 32px; height: 32px; }
|
||||
.nav-brand .indev {
|
||||
font-size: .6rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
color: var(--purple-l);
|
||||
background: rgba(124,58,237,.12);
|
||||
border: 1px solid rgba(124,58,237,.25);
|
||||
padding: 1px 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.nav-links { display: flex; gap: 2px; margin-left: auto; }
|
||||
.nav-links a {
|
||||
color: var(--text3);
|
||||
text-decoration: none;
|
||||
font-size: .825rem;
|
||||
font-weight: 500;
|
||||
padding: .35rem .8rem;
|
||||
border-radius: 6px;
|
||||
transition: color .12s, background .12s;
|
||||
}
|
||||
.nav-links a:hover { color: var(--text); background: var(--bg3); }
|
||||
.nav-links a.active { color: var(--text); background: var(--bg3); }
|
||||
|
||||
/* ── Layout ── */
|
||||
main { flex: 1; padding: 2rem 1.5rem; max-width: 1200px; margin: 0 auto; width: 100%; }
|
||||
.page-header { margin-bottom: 2rem; }
|
||||
.page-header h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.5px; }
|
||||
.page-header p { color: var(--text2); margin-top: .35rem; font-size: .9rem; }
|
||||
|
||||
/* ── Cards ── */
|
||||
.card {
|
||||
background: var(--bg2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.5rem;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.card-title {
|
||||
font-size: .75rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
color: var(--text3);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
/* ── Stats grid ── */
|
||||
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
|
||||
.stat-card {
|
||||
background: var(--bg2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.25rem 1.5rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.stat-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(135deg, var(--accent-color, var(--purple)) 0%, transparent 60%);
|
||||
opacity: .07;
|
||||
}
|
||||
.stat-card .label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--text3); margin-bottom: .4rem; }
|
||||
.stat-card .value { font-size: 2.25rem; font-weight: 800; line-height: 1; }
|
||||
.stat-card .sub { font-size: .78rem; color: var(--text2); margin-top: .3rem; }
|
||||
.stat-card.green { --accent-color: var(--green); }
|
||||
.stat-card.purple { --accent-color: var(--purple); }
|
||||
.stat-card.teal { --accent-color: var(--teal); }
|
||||
.stat-card.yellow { --accent-color: var(--yellow); }
|
||||
.stat-card.green .value { color: var(--green); }
|
||||
.stat-card.purple .value { color: var(--purple-l); }
|
||||
.stat-card.teal .value { color: var(--teal); }
|
||||
.stat-card.yellow .value { color: var(--yellow); }
|
||||
|
||||
/* ── Tables ── */
|
||||
.table-wrap { overflow-x: auto; }
|
||||
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
|
||||
thead th {
|
||||
text-align: left;
|
||||
font-size: .7rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: .8px;
|
||||
text-transform: uppercase;
|
||||
color: var(--text3);
|
||||
padding: .6rem 1rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
tbody tr { border-bottom: 1px solid var(--bg3); transition: background .1s; }
|
||||
tbody tr:last-child { border-bottom: none; }
|
||||
tbody tr:hover { background: var(--bg3); }
|
||||
td { padding: .7rem 1rem; vertical-align: middle; }
|
||||
|
||||
/* ── Badges ── */
|
||||
.badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 999px;
|
||||
font-size: .7rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: .4px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.badge-green { background: rgba(16,185,129,.15); color: var(--green); border: 1px solid rgba(16,185,129,.25); }
|
||||
.badge-purple { background: rgba(124,58,237,.15); color: var(--purple-l); border: 1px solid rgba(124,58,237,.25); }
|
||||
.badge-teal { background: rgba(6,182,212,.15); color: var(--teal); border: 1px solid rgba(6,182,212,.25); }
|
||||
.badge-red { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.25); }
|
||||
.badge-gray { background: rgba(71,85,105,.2); color: var(--text2); border: 1px solid var(--border); }
|
||||
.badge-yellow { background: rgba(245,158,11,.15); color: var(--yellow); border: 1px solid rgba(245,158,11,.25); }
|
||||
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
|
||||
|
||||
/* ── Buttons ── */
|
||||
.btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: .35rem;
|
||||
padding: .45rem .9rem;
|
||||
border-radius: 7px;
|
||||
border: none;
|
||||
font-size: .8rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
transition: opacity .15s, transform .1s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.btn:hover { opacity: .85; transform: translateY(-1px); }
|
||||
.btn:active { transform: translateY(0); opacity: 1; }
|
||||
.btn-primary { background: var(--purple); color: #fff; }
|
||||
.btn-teal { background: var(--teal); color: #000; }
|
||||
.btn-green { background: var(--green); color: #fff; }
|
||||
.btn-red { background: var(--red); color: #fff; }
|
||||
.btn-ghost { background: var(--bg4); color: var(--text); border: 1px solid var(--border); }
|
||||
.btn-sm { padding: .3rem .65rem; font-size: .75rem; border-radius: 5px; }
|
||||
|
||||
/* ── Forms ── */
|
||||
.form-group { margin-bottom: 1.25rem; }
|
||||
label { display: block; font-size: .8rem; font-weight: 600; color: var(--text2); margin-bottom: .4rem; }
|
||||
input[type=text], input[type=password], input[type=number], select, textarea {
|
||||
width: 100%;
|
||||
background: var(--bg3);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 7px;
|
||||
color: var(--text);
|
||||
padding: .6rem .85rem;
|
||||
font-size: .875rem;
|
||||
outline: none;
|
||||
transition: border-color .15s;
|
||||
font-family: inherit;
|
||||
}
|
||||
input:focus, select:focus, textarea:focus { border-color: var(--purple); }
|
||||
select option { background: var(--bg3); }
|
||||
|
||||
/* ── Alert ── */
|
||||
.alert {
|
||||
padding: .75rem 1rem;
|
||||
border-radius: 7px;
|
||||
font-size: .85rem;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
.alert-red { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: var(--red); }
|
||||
.alert-green { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: var(--green); }
|
||||
|
||||
/* ── Modal ── */
|
||||
.modal-backdrop {
|
||||
display: none;
|
||||
position: fixed; inset: 0;
|
||||
background: rgba(0,0,0,.75);
|
||||
z-index: 200;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.modal-backdrop.open { display: flex; }
|
||||
.modal {
|
||||
background: var(--bg2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 2rem;
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
box-shadow: 0 8px 48px rgba(0,0,0,.8);
|
||||
}
|
||||
.modal h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; }
|
||||
.modal-footer { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; }
|
||||
|
||||
/* ── Section head ── */
|
||||
.section-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.section-head h2 { font-size: 1rem; font-weight: 700; }
|
||||
|
||||
/* ── Inline flex helpers ── */
|
||||
.flex { display: flex; }
|
||||
.gap-1 { gap: .5rem; }
|
||||
.gap-2 { gap: 1rem; }
|
||||
.items-center { align-items: center; }
|
||||
.ml-auto { margin-left: auto; }
|
||||
.mt-1 { margin-top: .5rem; }
|
||||
.mt-2 { margin-top: 1rem; }
|
||||
.mb-2 { margin-bottom: 1rem; }
|
||||
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
|
||||
|
||||
/* ── Footer ── */
|
||||
footer {
|
||||
text-align: center;
|
||||
font-size: .72rem;
|
||||
color: var(--text3);
|
||||
padding: 1.25rem 1.5rem;
|
||||
border-top: 1px solid var(--border);
|
||||
letter-spacing: .2px;
|
||||
}
|
||||
|
||||
/* ── Pulse animation for online dot ── */
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: .4; }
|
||||
}
|
||||
.live-dot {
|
||||
display: inline-block;
|
||||
width: 8px; height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--green);
|
||||
animation: pulse 2s infinite;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* ── Search bar ── */
|
||||
.search-bar {
|
||||
display: flex;
|
||||
gap: .5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.search-bar input { flex: 1; }
|
||||
|
||||
/* ── Toasts ── */
|
||||
#toast-container {
|
||||
position: fixed;
|
||||
bottom: 1.5rem;
|
||||
right: 1.5rem;
|
||||
z-index: 500;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: .5rem;
|
||||
}
|
||||
.toast {
|
||||
background: var(--bg2);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: .75rem 1rem;
|
||||
font-size: .85rem;
|
||||
color: var(--text);
|
||||
box-shadow: var(--shadow);
|
||||
animation: slideIn .2s ease;
|
||||
min-width: 220px;
|
||||
}
|
||||
.toast.success { border-left: 3px solid var(--green); }
|
||||
.toast.error { border-left: 3px solid var(--red); }
|
||||
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
|
||||
</style>
|
||||
{% block head %}{% endblock %}
|
||||
<script>window.KR = window.KR || {};</script>
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<a class="nav-brand" href="/">
|
||||
<img class="cat" src="/static/kittyrec_icon.png" alt="KittyRec">
|
||||
KittyRec
|
||||
<span class="indev">INDEV</span>
|
||||
</a>
|
||||
<div class="nav-links">
|
||||
<a href="/" {% if request.path == '/' %}class="active"{% endif %}>Home</a>
|
||||
<a href="/portal" {% if request.path.startswith('/portal') and not request.path.startswith('/portal/') %}class="active"{% endif %}>Portal</a>
|
||||
{% if request.path.startswith('/admin') %}
|
||||
<a href="/admin" {% if request.path == '/admin' %}class="active"{% endif %}>Dashboard</a>
|
||||
<a href="/admin/players" {% if request.path.startswith('/admin/players') %}class="active"{% endif %}>Players</a>
|
||||
<a href="/admin/bans" {% if request.path.startswith('/admin/bans') %}class="active"{% endif %}>Bans</a>
|
||||
<a href="/admin/sessions" {% if request.path.startswith('/admin/sessions') %}class="active"{% endif %}>Sessions</a>
|
||||
<a href="/admin/gifts" {% if request.path.startswith('/admin/gifts') %}class="active"{% endif %}>Gifts</a>
|
||||
<a href="/admin/logout" style="color:var(--text3);font-size:.8rem;padding:.4rem .7rem">Sign out</a>
|
||||
{% else %}
|
||||
<a href="/admin">Admin</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main>{% block content %}{% endblock %}</main>
|
||||
|
||||
<footer>
|
||||
<img src="/static/kittyrec_logo.png" alt="KittyRec" style="height:48px;opacity:.35;margin-bottom:.5rem;display:block;margin-left:auto;margin-right:auto;">
|
||||
KittyRec INDEV · RecRoom Build {{ app_version_long }} · Revival Server
|
||||
</footer>
|
||||
|
||||
<div id="toast-container"></div>
|
||||
|
||||
<script src="/static/admin/admin.js"></script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user