anycoder-077fdffd / index.html
T0adOG's picture
Upload folder using huggingface_hub
1528862 verified
Raw
History Blame Contribute Delete
36.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IPY β€” Interactive Python Console</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.11.0/brython.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/brython/3.11.0/brython_stdlib.js"></script>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
/* ── Dark Theme (Default) ── */
--bg-base: #0b0f17;
--bg-surface: #111827;
--bg-elevated: #1a2235;
--bg-input: #0e1321;
--bg-hover: #1e2a45;
--border-subtle: #1e293b;
--border-default: #2d3a52;
--border-active: #3b82f6;
--text-primary: #e2e8f0;
--text-secondary: #8896a8;
--text-muted: #5a6b82;
--text-accent: #60a5fa;
--text-success: #34d399;
--text-warning: #fbbf24;
--text-danger: #f87171;
--accent: #3b82f6;
--accent-hover: #2563eb;
--accent-dim: rgba(59, 130, 246, 0.1);
--cell-num: #4ade80;
--scrollbar: #2d3a52;
--scrollbar-hover: #3b82f6;
--sidebar-w: 320px;
--header-h: 56px;
--font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
--font-sans: 'Inter', -apple-system, sans-serif;
}
[data-theme="light"] {
--bg-base: #f8fafc;
--bg-surface: #ffffff;
--bg-elevated: #f1f5f9;
--bg-input: #f8fafc;
--bg-hover: #e2e8f0;
--border-subtle: #e2e8f0;
--border-default: #cbd5e1;
--border-active: #3b82f6;
--text-primary: #1e293b;
--text-secondary: #64748b;
--text-muted: #94a3b8;
--text-accent: #2563eb;
--text-success: #059669;
--text-warning: #d97706;
--text-danger: #dc2626;
--accent: #2563eb;
--accent-hover: #1d4ed8;
--accent-dim: rgba(37, 99, 235, 0.08);
--cell-num: #059669;
--scrollbar: #cbd5e1;
--scrollbar-hover: #2563eb;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
scrollbar-width: thin;
scrollbar-color: var(--scrollbar) transparent;
}
body {
font-family: var(--font-sans);
background: var(--bg-base);
color: var(--text-primary);
min-height: 100dvh;
display: flex;
flex-direction: column;
overflow-x: hidden;
transition: background 0.3s, color 0.3s;
}
/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }
/* ═══════════════════════════════════════
TOP HEADER
═══════════════════════════════════════ */
.topbar {
height: var(--header-h);
background: var(--bg-surface);
border-bottom: 1px solid var(--border-subtle);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
position: sticky;
top: 0;
z-index: 100;
transition: all 0.3s;
}
.topbar-left {
display: flex;
align-items: center;
gap: 18px;
}
.logo-group {
display: flex;
align-items: center;
gap: 10px;
cursor: default;
}
.logo-icon {
width: 32px;
height: 32px;
border-radius: 8px;
background: linear-gradient(135deg, #3b82f6, #8b5cf6);
display: flex;
align-items: center;
justify-content: center;
font-family: var(--font-mono);
font-weight: 700;
font-size: 13px;
color: #fff;
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
transition: transform 0.2s;
}
.logo-icon:hover { transform: scale(1.05); }
.logo-text {
font-weight: 700;
font-size: 18px;
letter-spacing: -0.02em;
color: var(--text-primary);
}
.logo-text span {
font-weight: 400;
color: var(--text-muted);
font-size: 14px;
margin-left: 4px;
}
.sep {
width: 1px;
height: 24px;
background: var(--border-default);
}
.built-with {
font-size: 11px;
color: var(--text-muted);
letter-spacing: 0.02em;
}
.built-with a {
color: var(--text-accent);
text-decoration: none;
font-weight: 500;
transition: opacity 0.2s;
}
.built-with a:hover { opacity: 0.75; }
.topbar-right {
display: flex;
align-items: center;
gap: 6px;
}
.btn {
display: flex;
align-items: center;
gap: 6px;
padding: 7px 14px;
border: 1px solid var(--border-default);
border-radius: 8px;
background: var(--bg-surface);
color: var(--text-secondary);
font-family: var(--font-sans);
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
white-space: nowrap;
}
.btn:hover {
background: var(--bg-hover);
color: var(--text-primary);
border-color: var(--border-active);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-primary {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
.btn-primary:hover {
background: var(--accent-hover);
color: #fff;
box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}
.btn-danger {
background: rgba(248, 113, 113, 0.1);
color: var(--text-danger);
border-color: rgba(248, 113, 113, 0.2);
}
.btn-danger:hover {
background: rgba(248, 113, 113, 0.15);
border-color: rgba(248, 113, 113, 0.4);
}
/* ═══════════════════════════════════════
LAYOUT
═══════════════════════════════════════ */
.main-wrap {
flex: 1;
display: grid;
grid-template-columns: 1fr var(--sidebar-w);
min-height: calc(100dvh - var(--header-h));
}
.console-area {
padding: 20px;
display: flex;
flex-direction: column;
gap: 16px;
overflow-y: auto;
max-height: calc(100dvh - var(--header-h));
}
/* ═══════════════════════════════════════
TOOLBAR
═══════════════════════════════════════ */
.toolbar {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 10px;
}
.toolbar-left {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.toolbar-right {
display: flex;
align-items: center;
gap: 6px;
}
.kernel-status {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
color: var(--text-muted);
}
.status-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--text-success);
position: relative;
}
.status-dot::after {
content: '';
position: absolute;
inset: -3px;
border-radius: 50%;
border: 1.5px solid var(--text-success);
opacity: 0.5;
animation: pulse-ring 2.5s infinite;
}
@keyframes pulse-ring {
0%, 100% { transform: scale(1); opacity: 0.5; }
50% { transform: scale(1.6); opacity: 0; }
}
.shortcut-badge {
font-family: var(--font-mono);
font-size: 10px;
padding: 2px 6px;
border-radius: 4px;
background: var(--bg-elevated);
border: 1px solid var(--border-subtle);
color: var(--text-muted);
}
/* ═══════════════════════════════════════
CELL
═══════════════════════════════════════ */
.cell {
border: 1px solid var(--border-subtle);
border-radius: 14px;
overflow: hidden;
background: var(--bg-surface);
transition: border-color 0.2s, box-shadow 0.2s;
animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.cell:focus-within {
border-color: var(--border-active);
box-shadow: 0 0 0 3px var(--accent-dim), 0 8px 32px rgba(0,0,0,0.1);
}
.cell-header {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 14px;
border-bottom: 1px solid var(--border-subtle);
background: var(--bg-elevated);
user-select: none;
}
.cell-num {
font-family: var(--font-mono);
font-size: 11px;
font-weight: 600;
color: var(--cell-num);
min-width: 36px;
}
.cell-type {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
font-weight: 500;
}
.cell-actions {
margin-left: auto;
display: flex;
gap: 4px;
opacity: 0;
transition: opacity 0.2s;
}
.cell:hover .cell-actions { opacity: 1; }
.cell-action-btn {
width: 24px;
height: 24px;
border-radius: 6px;
border: none;
background: transparent;
color: var(--text-muted);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
}
.cell-action-btn:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.cell-action-btn svg { width: 13px; height: 13px; }
/* ── Code Input ── */
.cell-input {
display: flex;
align-items: stretch;
}
.line-nums {
width: 44px;
flex-shrink: 0;
padding: 14px 0;
text-align: right;
font-family: var(--font-mono);
font-size: 12px;
line-height: 1.65;
color: var(--text-muted);
user-select: none;
border-right: 1px solid var(--border-subtle);
background: var(--bg-elevated);
}
.line-num { padding-right: 10px; }
.code-editor {
flex: 1;
padding: 14px 16px;
font-family: var(--font-mono);
font-size: 13.5px;
line-height: 1.65;
color: var(--text-primary);
background: transparent;
border: none;
resize: none;
outline: none;
min-height: 72px;
tab-size: 4;
white-space: pre;
overflow: auto;
}
/* ── Output Area ── */
.cell-output {
border-top: 1px solid var(--border-subtle);
background: var(--bg-base);
padding: 14px 16px;
font-family: var(--font-mono);
font-size: 13px;
line-height: 1.6;
color: var(--text-primary);
white-space: pre-wrap;
word-break: break-word;
}
.cell-output:empty { display: none; }
.output-empty {
color: var(--text-muted);
font-style: italic;
font-family: var(--font-sans);
font-size: 12px;
}
.output-error {
color: var(--text-danger);
background: rgba(248, 113, 113, 0.05);
border-left: 2px solid var(--text-danger);
padding: 10px 14px;
margin: 4px -16px;
border-radius: 0 6px 6px 0;
}
.output-success {
color: var(--text-success);
}
/* ── Add Cell Bar ── */
.add-cell-bar {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
padding: 4px 0;
opacity: 0;
transition: opacity 0.2s;
}
.add-cell-btn {
font-size: 12px;
color: var(--text-muted);
background: none;
border: 1px dashed var(--border-default);
border-radius: 6px;
padding: 4px 14px;
cursor: pointer;
font-family: var(--font-sans);
transition: all 0.2s;
}
.add-cell-btn:hover {
color: var(--text-accent);
border-color: var(--text-accent);
background: var(--accent-dim);
}
/* ═══════════════════════════════════════
SIDEBAR
═══════════════════════════════════════ */
.sidebar {
border-left: 1px solid var(--border-subtle);
background: var(--bg-surface);
display: flex;
flex-direction: column;
overflow: hidden;
}
.sidebar-header {
padding: 16px 18px;
border-bottom: 1px solid var(--border-subtle);
display: flex;
align-items: center;
justify-content: space-between;
}
.sidebar-title {
font-weight: 600;
font-size: 13px;
color: var(--text-primary);
text-transform: uppercase;
letter-spacing: 0.06em;
}
.sidebar-badge {
font-size: 10px;
padding: 2px 8px;
border-radius: 10px;
background: var(--bg-elevated);
color: var(--text-muted);
font-family: var(--font-mono);
}
.sidebar-body {
flex: 1;
overflow-y: auto;
padding: 10px 0;
}
/* ── History Entry ── */
.hist-entry {
padding: 10px 18px;
cursor: pointer;
border-left: 2px solid transparent;
transition: all 0.15s;
position: relative;
}
.hist-entry:hover {
background: var(--bg-elevated);
border-left-color: var(--accent);
}
.hist-time {
font-size: 10px;
color: var(--text-muted);
font-family: var(--font-mono);
margin-bottom: 4px;
}
.hist-code {
font-family: var(--font-mono);
font-size: 11.5px;
color: var(--text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.5;
}
.hist-status {
position: absolute;
right: 14px;
top: 50%;
transform: translateY(-50%);
width: 6px;
height: 6px;
border-radius: 50%;
}
.hist-status.ok { background: var(--text-success); }
.hist-status.err { background: var(--text-danger); }
/* ── Snippets ── */
.snippets {
padding: 0 14px;
}
.snippet-card {
border: 1px solid var(--border-subtle);
border-radius: 10px;
padding: 12px 14px;
margin-bottom: 8px;
cursor: pointer;
transition: all 0.2s;
background: var(--bg-elevated);
}
.snippet-card:hover {
border-color: var(--accent);
background: var(--accent-dim);
transform: translateX(3px);
}
.snippet-title {
font-weight: 600;
font-size: 12px;
color: var(--text-primary);
margin-bottom: 4px;
display: flex;
align-items: center;
gap: 6px;
}
.snippet-desc {
font-size: 11px;
color: var(--text-muted);
line-height: 1.4;
}
/* ═══════════════════════════════════════
BOTTOM BAR
═══════════════════════════════════════ */
.bottom-bar {
height: 36px;
background: var(--bg-elevated);
border-top: 1px solid var(--border-subtle);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 18px;
font-size: 11px;
color: var(--text-muted);
}
.bottom-left, .bottom-right {
display: flex;
align-items: center;
gap: 14px;
}
.bottom-item {
display: flex;
align-items: center;
gap: 5px;
}
.bottom-item svg { width: 12px; height: 12px; opacity: 0.6; }
.version-pill {
font-family: var(--font-mono);
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
border-radius: 4px;
padding: 1px 7px;
font-size: 10px;
}
/* ═══════════════════════════════════════
ANIMATIONS & EFFECTS
═══════════════════════════════════════ */
.fade-in { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.run-spin {
animation: spin 0.7s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.typing-cursor::after {
content: '|';
animation: blink 1s step-end infinite;
color: var(--accent);
margin-left: 1px;
}
@keyframes blink {
50% { opacity: 0; }
}
/* ═══════════════════════════════════════
RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
.main-wrap { grid-template-columns: 1fr; }
.sidebar { display: none; }
.sidebar.open { display: flex; position: fixed; right: 0; top: var(--header-h); bottom: 0; width: var(--sidebar-w); z-index: 90; }
.menu-toggle { display: flex !important; }
}
@media (max-width: 600px) {
.topbar { padding: 0 12px; }
.topbar-right .btn span { display: none; }
.logo-text span { display: none; }
.console-area { padding: 12px; }
.toolbar-left { gap: 4px; }
.toolbar-left .btn { padding: 6px 10px; font-size: 11px; }
}
.menu-toggle {
display: none;
}
/* ── Mobile sidebar overlay ── */
.sidebar-overlay {
display: none;
position: fixed;
inset: 0;
background: rgba(0,0,0,0.4);
z-index: 80;
backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }
/* ═══════════════════════════════════════
WELCOME BANNER
═══════════════════════════════════════ */
.welcome-banner {
background: linear-gradient(135deg, var(--accent-dim), transparent);
border: 1px solid var(--border-active);
border-radius: 12px;
padding: 20px 24px;
margin-bottom: 4px;
position: relative;
overflow: hidden;
}
.welcome-banner::before {
content: '';
position: absolute;
top: -50%;
right: -10%;
width: 200px;
height: 200px;
background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
opacity: 0.08;
pointer-events: none;
}
.welcome-title {
font-size: 18px;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 6px;
position: relative;
}
.welcome-sub {
font-size: 13px;
color: var(--text-secondary);
line-height: 1.6;
position: relative;
}
.welcome-sub code {
font-family: var(--font-mono);
font-size: 11px;
padding: 1px 6px;
border-radius: 4px;
background: var(--bg-elevated);
color: var(--text-accent);
}
/* ═══════════════════════════════════════
DROPDOWN
═══════════════════════════════════════ */
.dropdown-wrap { position: relative; }
.dropdown-menu {
position: absolute;
top: calc(100% + 6px);
right: 0;
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
border-radius: 10px;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
min-width: 180px;
opacity: 0;
visibility: hidden;
transform: translateY(-4px);
transition: all 0.2s;
z-index: 200;
overflow: hidden;
}
.dropdown-wrap.open .dropdown-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.dropdown-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
font-size: 13px;
color: var(--text-secondary);
cursor: pointer;
transition: all 0.15s;
border: none;
background: none;
width: 100%;
text-align: left;
font-family: var(--font-sans);
}
.dropdown-item:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.dropdown-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.dropdown-sep {
height: 1px;
background: var(--border-subtle);
margin: 4px 0;
}
/* ═══════════════════════════════════════
MODAL / DIALOG
═══════════════════════════════════════ */
.modal-overlay {
display: none;
position: fixed;
inset: 0;
background: rgba(0,0,0,0.45);
z-index: 300;
align-items: center;
justify-content: center;
backdrop-filter: blur(3px);
}
.modal-overlay.active { display: flex; }
.modal-box {
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
border-radius: 16px;
width: 90%;
max-width: 480px;
max-height: 80dvh;
overflow: hidden;
box-shadow: 0 24px 64px rgba(0,0,0,0.25);
animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
from { opacity: 0; transform: scale(0.92) translateY(10px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
padding: 18px 22px;
border-bottom: 1px solid var(--border-subtle);
display: flex;
align-items: center;
justify-content: space-between;
}
.modal-title {
font-weight: 700;
font-size: 16px;
color: var(--text-primary);
}
.modal-close {
width: 28px;
height: 28px;
border-radius: 8px;
border: none;
background: var(--bg-elevated);
color: var(--text-muted);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
}
.modal-close:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.modal-body {
padding: 18px 22px;
max-height: 60dvh;
overflow-y: auto;
}
.modal-foot {
padding: 14px 22px;
border-top: 1px solid var(--border-subtle);
display: flex;
justify-content: flex-end;
gap: 8px;
}
/* Settings row */
.setting-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 0;
border-bottom: 1px solid var(--border-subtle);
}
.setting-row:last-child { border-bottom: none; }
.setting-label {
font-size: 13px;
color: var(--text-primary);
font-weight: 500;
}
.setting-desc {
font-size: 11px;
color: var(--text-muted);
margin-top: 2px;
}
/* Toggle */
.toggle {
width: 40px;
height: 22px;
border-radius: 11px;
background: var(--border-default);
position: relative;
cursor: pointer;
transition: background 0.2s;
flex-shrink: 0;
}
.toggle.on { background: var(--accent); }
.toggle-knob {
width: 18px;
height: 18px;
border-radius: 50%;
background: #fff;
position: absolute;
top: 2px;
left: 2px;
transition: transform 0.2s;
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on .toggle-knob { transform: translateX(18px); }
/* Select */
.sel {
padding: 6px 10px;
border-radius: 8px;
border: 1px solid var(--border-default);
background: var(--bg-elevated);
color: var(--text-primary);
font-family: var(--font-sans);
font-size: 13px;
cursor: pointer;
outline: none;
}
.sel:focus { border-color: var(--accent); }
/* ═══════════════════════════════════════
TOAST
═══════════════════════════════════════ */
.toast-wrap {
position: fixed;
bottom: 44px;
left: 50%;
transform: translateX(-50%);
z-index: 400;
display: flex;
flex-direction: column;
gap: 8px;
pointer-events: none;
}
.toast {
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
border-radius: 10px;
padding: 10px 18px;
font-size: 13px;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 10px;
box-shadow: 0 8px 24px rgba(0,0,0,0.2);
animation: toastSlide 0.3s ease;
pointer-events: auto;
}
@keyframes toastSlide {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.toast-out { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut {
to { opacity: 0; transform: translateY(10px); }
}
.toast-icon { width: 16px; height: 16px; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--text-success); }
.toast-error .toast-icon { color: var(--text-danger); }
</style>
</head>
<body onload="brython({debug:1, indexedDB: false})">
<!-- ═══════════════════════════════════════
TOP BAR
═══════════════════════════════════════ -->
<header class="topbar">
<div class="topbar-left">
<div class="logo-group">
<div class="logo-icon">&gt;_</div>
<div class="logo-text">IPY<span>Console</span></div>
</div>
<div class="sep"></div>
<span class="built-with">
Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" rel="noopener">anycoder</a>
</span>
</div>
<div class="topbar-right">
<button class="btn menu-toggle" id="menuToggle" onclick="toggleSidebar()" title="Toggle sidebar">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="21" y2="18"/></svg>
</button>
<div class="dropdown-wrap" id="settingsDropdown">
<button class="btn" onclick="toggleDropdown('settingsDropdown')" title="Settings">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>
<span>Settings</span>
</button>
<div class="dropdown-menu">
<button class="dropdown-item" onclick="toggleTheme(); closeDropdown('settingsDropdown')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>
Toggle Theme
</button>
<button class="dropdown-item" onclick="clearHistory(); closeDropdown('settingsDropdown')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
Clear History
</button>
<div class="dropdown-sep"></div>
<button class="dropdown-item" onclick="showAbout(); closeDropdown('settingsDropdown')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/></svg>
About IPY
</button>
</div>
</div>
</div>
</header>
<!-- ═══════════════════════════════════════
MAIN LAYOUT
═══════════════════════════════════════ -->
<div class="main-wrap">
<div class="console-area" id="consoleArea">
<!-- Toolbar -->
<div class="toolbar">
<div class="toolbar-left">
<button class="btn btn-primary" onclick="runAllCells()" id="runAllBtn">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="5 3 19 12 5 21 5 3"/></svg>
<span>Run All</span>
</button>
<button class="btn" onclick="clearAllOutputs()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
<span>Clear Output</span>
</button>
<button class="btn" onclick="addCellAtEnd()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
<span>Add Cell</span>
</button>
<div class="sep" style="height: 20px;"></div>
<span class="shortcut-badge">Ctrl+Enter</span>
<span class="shortcut-badge">Shift+Enter</