Spaces:
Sleeping
Sleeping
Mohammed AL Sarraj commited on
Commit ·
ab72b56
1
Parent(s): e990054
dark theme + back button + mobile responsive
Browse files- app/templates/base.html +189 -84
app/templates/base.html
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8"/>
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
| 6 |
-
<title>{% block title %}
|
| 7 |
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
|
| 8 |
-
<link href="https://fonts.googleapis.com/css2?family=
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
|
| 10 |
<script id="tailwind-config">
|
| 11 |
tailwind.config = {
|
|
@@ -13,109 +13,214 @@ tailwind.config = {
|
|
| 13 |
theme: {
|
| 14 |
extend: {
|
| 15 |
colors: {
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"surface-
|
| 20 |
-
"surface":
|
| 21 |
-
"surface-
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
-
"on-
|
| 27 |
-
"background":
|
| 28 |
-
"
|
| 29 |
-
"on-
|
| 30 |
-
"
|
| 31 |
-
"
|
| 32 |
-
"
|
| 33 |
-
"on-
|
| 34 |
-
"secondary-container":
|
| 35 |
-
"
|
| 36 |
-
"
|
| 37 |
-
"
|
| 38 |
-
"surface-
|
| 39 |
-
"
|
| 40 |
-
"on-
|
| 41 |
-
"inverse-primary":
|
| 42 |
-
"
|
| 43 |
-
"
|
| 44 |
-
"on-
|
| 45 |
-
"
|
| 46 |
-
"
|
| 47 |
-
"
|
| 48 |
-
"
|
| 49 |
-
"
|
| 50 |
-
"
|
| 51 |
-
"
|
| 52 |
-
"
|
| 53 |
-
"on-
|
| 54 |
-
"on-
|
| 55 |
-
"on-primary-fixed": "#003f7d",
|
| 56 |
-
"on-primary-container": "#00519e",
|
| 57 |
-
"on-tertiary-fixed": "#383751",
|
| 58 |
-
"surface-container-low": "#f1f4f6",
|
| 59 |
-
"surface-dim": "#d1dce0",
|
| 60 |
-
"secondary-fixed-dim": "#c9d6e3",
|
| 61 |
-
"on-error-container": "#752121",
|
| 62 |
-
"surface-container-high": "#e3e9ec",
|
| 63 |
-
"surface-variant": "#dbe4e7",
|
| 64 |
-
"tertiary-container": "#d9d7f8",
|
| 65 |
-
"surface-container-highest": "#dbe4e7",
|
| 66 |
-
"secondary-dim": "#48555f"
|
| 67 |
-
},
|
| 68 |
-
borderRadius: {
|
| 69 |
-
"DEFAULT": "0.25rem",
|
| 70 |
-
"lg": "0.5rem",
|
| 71 |
-
"xl": "0.75rem",
|
| 72 |
-
"full": "9999px"
|
| 73 |
},
|
|
|
|
| 74 |
fontFamily: {
|
| 75 |
-
"headline": ["
|
| 76 |
-
"body": ["
|
| 77 |
-
"label": ["
|
| 78 |
}
|
| 79 |
}
|
| 80 |
}
|
| 81 |
}
|
| 82 |
</script>
|
| 83 |
<style>
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
.material-symbols-outlined {
|
| 86 |
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
| 87 |
vertical-align: middle;
|
| 88 |
}
|
| 89 |
-
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
::-webkit-scrollbar { width: 6px; }
|
| 92 |
::-webkit-scrollbar-track { background: transparent; }
|
| 93 |
-
::-webkit-scrollbar-thumb { background: #
|
| 94 |
-
|
| 95 |
-
/* Code editor (test-forge, schema-detective) */
|
| 96 |
-
.code-editor { font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace; }
|
| 97 |
-
.editor-bg { background: #1e1e2e; color: #cdd6f4; }
|
| 98 |
-
/* Arabic text (arabic-bench) */
|
| 99 |
-
.arabic-text { font-family: 'Segoe UI', Tahoma, Arial, sans-serif; }
|
| 100 |
-
/* Scrollbar utilities */
|
| 101 |
.no-scrollbar::-webkit-scrollbar { display: none; }
|
| 102 |
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
|
| 103 |
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
|
| 104 |
-
.custom-scrollbar::-webkit-scrollbar-
|
| 105 |
-
|
| 106 |
-
/*
|
| 107 |
-
.
|
| 108 |
-
.
|
| 109 |
-
.
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
</style>
|
| 114 |
{% block extra_head %}{% endblock %}
|
| 115 |
<meta name="csrf-token" content="{{ csrf_token() }}"/>
|
| 116 |
</head>
|
| 117 |
-
<body class="bg-surface text-on-surface
|
| 118 |
{% block content %}{% endblock %}
|
| 119 |
{% block extra_scripts %}{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
</body>
|
| 121 |
</html>
|
|
|
|
| 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.0"/>
|
| 6 |
+
<title>{% block title %}DevKit{% endblock %}</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600&display=swap" rel="stylesheet"/>
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap" rel="stylesheet"/>
|
| 10 |
<script id="tailwind-config">
|
| 11 |
tailwind.config = {
|
|
|
|
| 13 |
theme: {
|
| 14 |
extend: {
|
| 15 |
colors: {
|
| 16 |
+
"surface": "#0e0e10",
|
| 17 |
+
"background": "#0e0e10",
|
| 18 |
+
"surface-container-lowest": "#131315",
|
| 19 |
+
"surface-container-low": "#18181a",
|
| 20 |
+
"surface-container": "#1e1e20",
|
| 21 |
+
"surface-container-high": "#252527",
|
| 22 |
+
"surface-container-highest": "#2c2c2e",
|
| 23 |
+
"surface-bright": "#222224",
|
| 24 |
+
"surface-dim": "#0a0a0c",
|
| 25 |
+
"on-surface": "#e8e8ea",
|
| 26 |
+
"on-surface-variant": "#8b9198",
|
| 27 |
+
"on-background": "#e8e8ea",
|
| 28 |
+
"primary": "#00d97e",
|
| 29 |
+
"on-primary": "#001a0d",
|
| 30 |
+
"primary-container": "#003d1c",
|
| 31 |
+
"on-primary-container": "#67ffb4",
|
| 32 |
+
"secondary": "#8b9198",
|
| 33 |
+
"on-secondary": "#e8e8ea",
|
| 34 |
+
"secondary-container": "#252527",
|
| 35 |
+
"on-secondary-container": "#c8cdd0",
|
| 36 |
+
"outline": "#4b5563",
|
| 37 |
+
"outline-variant": "#2a2e30",
|
| 38 |
+
"surface-variant": "#252527",
|
| 39 |
+
"inverse-surface": "#e8e8ea",
|
| 40 |
+
"inverse-on-surface": "#18181a",
|
| 41 |
+
"inverse-primary": "#005c33",
|
| 42 |
+
"error-container":"#7f1d1d","on-error-container":"#fca5a5","error":"#f87171","on-error":"#fff",
|
| 43 |
+
"tertiary":"#00d97e","on-tertiary":"#001a0d",
|
| 44 |
+
"tertiary-container":"#1e1e20","on-tertiary-container":"#67ffb4",
|
| 45 |
+
"tertiary-dim":"#00d97e","tertiary-fixed":"#1e1e20","tertiary-fixed-dim":"#00d97e",
|
| 46 |
+
"on-tertiary-fixed":"#001a0d","on-tertiary-fixed-variant":"#001a0d",
|
| 47 |
+
"primary-fixed":"#003d1c","primary-fixed-dim":"#00d97e",
|
| 48 |
+
"on-primary-fixed":"#67ffb4","on-primary-fixed-variant":"#00d97e",
|
| 49 |
+
"secondary-fixed":"#252527","secondary-fixed-dim":"#252527",
|
| 50 |
+
"on-secondary-fixed":"#c8cdd0","on-secondary-fixed-variant":"#c8cdd0",
|
| 51 |
+
"surface-tint":"#00d97e","primary-dim":"#00d97e","secondary-dim":"#8b9198",
|
| 52 |
+
"error-dim":"#450a0a","on-primary-fixed":"#67ffb4",
|
| 53 |
+
"on-primary-container":"#67ffb4","on-secondary-container":"#c8cdd0",
|
| 54 |
+
"on-tertiary-container":"#67ffb4",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
},
|
| 56 |
+
borderRadius: {"DEFAULT":"0.25rem","lg":"0.5rem","xl":"0.75rem","full":"9999px"},
|
| 57 |
fontFamily: {
|
| 58 |
+
"headline": ["DM Sans", "sans-serif"],
|
| 59 |
+
"body": ["DM Sans", "sans-serif"],
|
| 60 |
+
"label": ["DM Sans", "sans-serif"]
|
| 61 |
}
|
| 62 |
}
|
| 63 |
}
|
| 64 |
}
|
| 65 |
</script>
|
| 66 |
<style>
|
| 67 |
+
:root {
|
| 68 |
+
--accent: #00d97e;
|
| 69 |
+
--accent-rgb: 0,217,126;
|
| 70 |
+
--on-primary: #001a0d;
|
| 71 |
+
--surface: #0e0e10;
|
| 72 |
+
--text: #e8e8ea;
|
| 73 |
+
--text-dim: #8b9198;
|
| 74 |
+
--border: #2a2e30;
|
| 75 |
+
}
|
| 76 |
+
*, *::before, *::after { box-sizing: border-box; }
|
| 77 |
+
html, body {
|
| 78 |
+
background: #0e0e10 !important;
|
| 79 |
+
color: #e8e8ea;
|
| 80 |
+
font-family: DM Sans, sans-serif;
|
| 81 |
+
}
|
| 82 |
.material-symbols-outlined {
|
| 83 |
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
|
| 84 |
vertical-align: middle;
|
| 85 |
}
|
| 86 |
+
|
| 87 |
+
/* Remap hardcoded light-theme classes */
|
| 88 |
+
.bg-white { background: #131315 !important; }
|
| 89 |
+
.bg-slate-50 { background: #18181a !important; }
|
| 90 |
+
.bg-slate-100 { background: #1e1e20 !important; }
|
| 91 |
+
.bg-slate-200 { background: #252527 !important; }
|
| 92 |
+
.border-slate-200,
|
| 93 |
+
.border-slate-300 { border-color: #2a2e30 !important; }
|
| 94 |
+
.divide-slate-200 > * + * { border-color: #2a2e30 !important; }
|
| 95 |
+
.text-slate-400, .text-slate-500 { color: #8b9198 !important; }
|
| 96 |
+
.text-slate-600, .text-slate-700,
|
| 97 |
+
.text-slate-800, .text-slate-900 { color: #e8e8ea !important; }
|
| 98 |
+
.text-gray-400, .text-gray-500 { color: #8b9198 !important; }
|
| 99 |
+
.text-gray-600, .text-gray-700 { color: #e8e8ea !important; }
|
| 100 |
+
.hover\:bg-slate-200\/60:hover { background: rgba(255,255,255,.06) !important; }
|
| 101 |
+
.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,.5) !important; }
|
| 102 |
+
.shadow-md { box-shadow: 0 4px 12px rgba(0,0,0,.6) !important; }
|
| 103 |
+
.glass-effect { background: rgba(0,0,0,.5) !important; backdrop-filter: blur(12px); }
|
| 104 |
+
|
| 105 |
+
/* Forms dark */
|
| 106 |
+
input:not([type=checkbox]):not([type=radio]):not([type=range]),
|
| 107 |
+
textarea, select {
|
| 108 |
+
background: #18181a !important;
|
| 109 |
+
color: #e8e8ea !important;
|
| 110 |
+
border-color: #2a2e30 !important;
|
| 111 |
+
}
|
| 112 |
+
input::placeholder, textarea::placeholder { color: #8b9198 !important; opacity: 1; }
|
| 113 |
+
input:focus, textarea:focus, select:focus {
|
| 114 |
+
border-color: #00d97e !important;
|
| 115 |
+
box-shadow: 0 0 0 2px rgba(0,217,126,.2) !important;
|
| 116 |
+
}
|
| 117 |
+
label { color: #8b9198; }
|
| 118 |
+
|
| 119 |
+
/* Scrollbar */
|
| 120 |
::-webkit-scrollbar { width: 6px; }
|
| 121 |
::-webkit-scrollbar-track { background: transparent; }
|
| 122 |
+
::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 10px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
.no-scrollbar::-webkit-scrollbar { display: none; }
|
| 124 |
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
|
| 125 |
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
|
| 126 |
+
.custom-scrollbar::-webkit-scrollbar-thumb { background: #4b5563; border-radius: 10px; }
|
| 127 |
+
|
| 128 |
+
/* Code editor */
|
| 129 |
+
.code-editor { font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace; }
|
| 130 |
+
.editor-bg { background: #0d0d14 !important; color: #cdd6f4; }
|
| 131 |
+
.arabic-text { font-family: 'Segoe UI', Tahoma, Arial, sans-serif; }
|
| 132 |
+
|
| 133 |
+
/* Prompt-bench scoped overrides */
|
| 134 |
+
.toolbar-blur { background: rgba(20,20,28,.88); backdrop-filter: blur(20px); }
|
| 135 |
+
.btn-primary { display:inline-flex;align-items:center;gap:6px;padding:6px 14px;background:#00d97e;color:#001a0d;border-radius:8px;font-size:13px;font-weight:600;border:none;cursor:pointer; }
|
| 136 |
+
.btn-secondary { display:inline-flex;align-items:center;gap:4px;padding:5px 10px;background:rgba(255,255,255,.08);color:#e8e8ea;border-radius:7px;font-size:12px;font-weight:500;border:none;cursor:pointer; }
|
| 137 |
+
.section-label { font-size:11px;font-weight:600;color:#8b9198;text-transform:uppercase;letter-spacing:.06em; }
|
| 138 |
+
.sys-label, .text-sys-label { color: #e8e8ea; }
|
| 139 |
+
|
| 140 |
+
/* Mobile: collapse fixed sidebars on small screens */
|
| 141 |
+
@media (max-width: 768px) {
|
| 142 |
+
.shrink-0.w-64, aside.w-64 {
|
| 143 |
+
display: none !important;
|
| 144 |
+
}
|
| 145 |
+
.flex-1.overflow-hidden {
|
| 146 |
+
flex: 1 1 auto;
|
| 147 |
+
min-width: 0;
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
/* Back-to-hub button */
|
| 152 |
+
.hub-back-btn {
|
| 153 |
+
position: fixed;
|
| 154 |
+
bottom: 1.25rem;
|
| 155 |
+
left: 1.25rem;
|
| 156 |
+
z-index: 9999;
|
| 157 |
+
display: flex;
|
| 158 |
+
align-items: center;
|
| 159 |
+
gap: 5px;
|
| 160 |
+
padding: 6px 14px 6px 9px;
|
| 161 |
+
border-radius: 100px;
|
| 162 |
+
background: rgba(0,217,126, .12);
|
| 163 |
+
border: 1px solid rgba(0,217,126, .28);
|
| 164 |
+
color: #00d97e;
|
| 165 |
+
font-size: 12px;
|
| 166 |
+
font-weight: 500;
|
| 167 |
+
text-decoration: none;
|
| 168 |
+
backdrop-filter: blur(10px);
|
| 169 |
+
-webkit-backdrop-filter: blur(10px);
|
| 170 |
+
transition: background .15s, transform .12s;
|
| 171 |
+
font-family: DM Sans, sans-serif;
|
| 172 |
+
white-space: nowrap;
|
| 173 |
+
}
|
| 174 |
+
.hub-back-btn:hover {
|
| 175 |
+
background: rgba(0,217,126, .22);
|
| 176 |
+
transform: translateY(-1px);
|
| 177 |
+
}
|
| 178 |
+
.hub-back-btn-icon {
|
| 179 |
+
font-size: 15px !important;
|
| 180 |
+
color: #00d97e;
|
| 181 |
+
line-height: 1;
|
| 182 |
+
vertical-align: middle;
|
| 183 |
+
}
|
| 184 |
</style>
|
| 185 |
{% block extra_head %}{% endblock %}
|
| 186 |
<meta name="csrf-token" content="{{ csrf_token() }}"/>
|
| 187 |
</head>
|
| 188 |
+
<body class="bg-surface text-on-surface">
|
| 189 |
{% block content %}{% endblock %}
|
| 190 |
{% block extra_scripts %}{% endblock %}
|
| 191 |
+
<script>
|
| 192 |
+
(function() {
|
| 193 |
+
var toolAlphas = {"schema-detective": "0.10", "test-forge": "0.13", "sql-whisperer": "0.08", "doc-forge": "0.11", "changelog-ai": "0.09", "git-narrator": "0.12"};
|
| 194 |
+
var path = window.location.pathname.replace(/\/+$/, '').split('/').filter(Boolean)[0] || '';
|
| 195 |
+
|
| 196 |
+
// Per-tool micro-variation: slightly shift border opacity for each tool
|
| 197 |
+
var alpha = toolAlphas[path];
|
| 198 |
+
if (alpha) {
|
| 199 |
+
var s = document.createElement('style');
|
| 200 |
+
s.textContent =
|
| 201 |
+
'.border-outline-variant\/10 { border-color: rgba(0,217,126,' + alpha + ') !important; }' +
|
| 202 |
+
'.border-slate-200 { border-color: rgba(0,217,126,' + (parseFloat(alpha) * 0.6).toFixed(2) + ') !important; }';
|
| 203 |
+
document.head.appendChild(s);
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
// Back-to-hub button on all tool pages (not home)
|
| 207 |
+
if (path !== '') {
|
| 208 |
+
var btn = document.createElement('a');
|
| 209 |
+
btn.href = '/';
|
| 210 |
+
btn.className = 'hub-back-btn';
|
| 211 |
+
|
| 212 |
+
var icon = document.createElement('span');
|
| 213 |
+
icon.className = 'material-symbols-outlined hub-back-btn-icon';
|
| 214 |
+
icon.textContent = 'arrow_back_ios_new';
|
| 215 |
+
|
| 216 |
+
var label = document.createElement('span');
|
| 217 |
+
label.textContent = 'DevKit';
|
| 218 |
+
|
| 219 |
+
btn.appendChild(icon);
|
| 220 |
+
btn.appendChild(label);
|
| 221 |
+
document.body.appendChild(btn);
|
| 222 |
+
}
|
| 223 |
+
})();
|
| 224 |
+
</script>
|
| 225 |
</body>
|
| 226 |
</html>
|