Spaces:
Sleeping
Sleeping
Delete templates/base.html
Browse files- templates/base.html +0 -70
templates/base.html
DELETED
|
@@ -1,70 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="utf-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
| 6 |
-
<title>{% block title %}English Helper{% endblock %}</title>
|
| 7 |
-
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
| 8 |
-
<!-- Tailwind CDN (kept for quick demo; consider building Tailwind for production) -->
|
| 9 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
-
{% block head %}{% endblock %}
|
| 11 |
-
<style>
|
| 12 |
-
/* Small helper styles for the header/navigation */
|
| 13 |
-
.site-nav { background: #ffffff; border-bottom: 1px solid #e5e7eb; }
|
| 14 |
-
.site-nav a { margin-right: 1rem; color: #374151; text-decoration: none; font-weight: 600; }
|
| 15 |
-
</style>
|
| 16 |
-
</head>
|
| 17 |
-
<body class="bg-gray-50 min-h-screen">
|
| 18 |
-
<nav class="site-nav p-4">
|
| 19 |
-
<div class="max-w-7xl mx-auto flex justify-between items-center">
|
| 20 |
-
<div class="flex items-center gap-4">
|
| 21 |
-
<a href="/" class="font-bold text-lg">English Helper</a>
|
| 22 |
-
</div>
|
| 23 |
-
<div class="flex items-center gap-4">
|
| 24 |
-
<a href="/admin" class="text-sm">Admin</a>
|
| 25 |
-
<a href="/dashboard" class="text-sm">Dashboard</a>
|
| 26 |
-
<a href="/status" class="text-sm">Status</a>
|
| 27 |
-
</div>
|
| 28 |
-
</div>
|
| 29 |
-
</nav>
|
| 30 |
-
|
| 31 |
-
<!-- Demo banner (visible on HF spaces) -->
|
| 32 |
-
<div id="demoBanner" class="w-full text-center py-2 px-4" style="display:none; background:#eff6ff; color:#1e40af;">
|
| 33 |
-
🚀 Demo Mode — data is stored in-memory and will be lost on restart. <button id="dismissDemo" class="ml-3 underline">Dismiss</button>
|
| 34 |
-
</div>
|
| 35 |
-
|
| 36 |
-
<main class="py-8">
|
| 37 |
-
<div class="max-w-6xl mx-auto px-4">
|
| 38 |
-
{% block content %}{% endblock %}
|
| 39 |
-
</div>
|
| 40 |
-
</main>
|
| 41 |
-
|
| 42 |
-
{% block scripts %}{% endblock %}
|
| 43 |
-
|
| 44 |
-
<script>
|
| 45 |
-
// Demo banner logic
|
| 46 |
-
(function(){
|
| 47 |
-
try {
|
| 48 |
-
const isHF = window.location.hostname.includes('hf.space') || window.location.hostname.includes('huggingface.co');
|
| 49 |
-
if (!isHF) return;
|
| 50 |
-
if (localStorage.getItem('eh_demo_dismissed')) return;
|
| 51 |
-
const b = document.getElementById('demoBanner');
|
| 52 |
-
if (b) b.style.display = 'block';
|
| 53 |
-
document.getElementById('dismissDemo')?.addEventListener('click', ()=>{
|
| 54 |
-
localStorage.setItem('eh_demo_dismissed','1');
|
| 55 |
-
if (b) b.style.display = 'none';
|
| 56 |
-
});
|
| 57 |
-
} catch(e) { /* non-critical */ }
|
| 58 |
-
})();
|
| 59 |
-
|
| 60 |
-
// Small toast helper used across templates
|
| 61 |
-
function showToast(msg, type='info'){
|
| 62 |
-
const t = document.createElement('div');
|
| 63 |
-
t.className = 'fixed top-4 right-4 p-3 rounded shadow z-50 ' + (type==='success'?'bg-green-600':type==='error'?'bg-red-600':'bg-blue-600');
|
| 64 |
-
t.textContent = msg;
|
| 65 |
-
document.body.appendChild(t);
|
| 66 |
-
setTimeout(()=>t.remove(), 4000);
|
| 67 |
-
}
|
| 68 |
-
</script>
|
| 69 |
-
</body>
|
| 70 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|