Update app.py
Browse files5 unmodified lines678991011121 unmodified line14151617171819202122232223242526272728293031323334343536371 unmodified line3940414242434445464647484950514950515253545455565657585960616263645960616263646566676869706667686970717273737475767778797980818239 unmodified lines12212312412512512612712830 unmodified lines15916016116216216316411 unmodified lines17617717818017918018118244 unmodified lines2272282292312302312322332342352362382372382395 unmodified lines2452462472502482492502514 unmodified lines25625725826125926026326126226326433 unmodified lines2982993003033013023033043 unmodified lines30830931031331131231350 unmodified lines3643653663703673683693705 unmodified linesapp = Flask(__name__)
# ==========================================# FRONTEND: The Ultimate Floating Glass IDE# FRONTEND: Clean Cinematic Intro + Floating UI# ==========================================HTML_TEMPLATE = """<!DOCTYPE html>1 unmodified line<head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Twenty IDE | Glassmorphism Edition</title> <title>Twenty IDE | Pro Environment</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> :root { --bg-dark: #020204; --glass-bg: rgba(15, 15, 20, 0.45); /* Şüşə arxa planı */ --glass-border: rgba(255, 255, 255, 0.08); /* Şüşə kənarı parıltısı */ --glass-bg: rgba(15, 15, 20, 0.45); --glass-border: rgba(255, 255, 255, 0.08); --text-main: #f4f4f5; --text-muted: #888899; --accent: #00f2fe; --radius-big: 24px; /* Dairəvi fason */ --radius-big: 24px; --radius-small: 12px; }
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; } body { background-color: var(--bg-dark); color: var(--text-main); height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
/* --- ARXA PLAN NEON İŞIQLARI (Blur üçün) --- */ /* --- ARXA PLAN NEON İŞIQLARI --- */ .ambient-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #020204; } .orb { position: absolute; border-radius: 50%; filter: blur(150px); opacity: 0.3; } .orb-1 { width: 600px; height: 600px; background: #00f2fe; top: -10%; left: -10%; animation: float 30s infinite alternate ease-in-out; }1 unmodified line @keyframes float { 0% { transform: translate(0, 0); } 100% { transform: translate(20vw, 20vh); } } @keyframes floatReverse { 0% { transform: translate(0, 0); } 100% { transform: translate(-20vw, -20vh); } }
/* --- SİRR Lİ KÖLGƏ SPLASH EKRANI --- */ /* --- TƏMİZ VƏ KƏSKİN SPLASH EKRANI --- */ #splash { position: fixed; inset: 0; background: #020204; z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 1.5s ease-in-out; transition: opacity 0.8s ease-in-out; } .splash-text { font-size: 65px; font-weight: 200; color: transparent; margin-left: 30px; animation: breatheMelt 4s cubic-bezier(0.25, 1, 0.5, 1) forwards; font-size: 65px; font-weight: 200; color: var(--color-white); margin-left: 30px; letter-spacing: 25px; animation: cleanFade 3s ease-in-out forwards; } .splash-sub { font-size: 13px; color: var(--accent); letter-spacing: 20px; margin-top: 25px; font-size: 13px; color: var(--accent); letter-spacing: 15px; margin-top: 25px; text-transform: uppercase; margin-left: 20px; opacity: 0; animation: subFade 4s ease-in-out forwards; animation: cleanSubFade 2.5s ease-in-out forwards 0.5s; }
/* Kino effekti: Nəfəs alan hərflər */ @keyframes breatheMelt { 0% { opacity: 0; filter: blur(30px); text-shadow: 0 0 0px rgba(0, 242, 254, 0); transform: scale(1.1); letter-spacing: 45px; } 40% { opacity: 1; filter: blur(0px); text-shadow: 0 0 60px rgba(0, 242, 254, 0.7); transform: scale(1); letter-spacing: 30px; color: var(--color-white); } 70% { opacity: 1; filter: blur(0px); text-shadow: 0 0 40px rgba(0, 242, 254, 0.5); transform: scale(1); letter-spacing: 30px; color: var(--color-white); } 100% { opacity: 0; filter: blur(30px); text-shadow: 0 0 0px rgba(0, 242, 254, 0); transform: scale(0.9); letter-spacing: 15px; color: transparent; } /* Kino effekti: Blursuz, təmiz görünüş */ @keyframes cleanFade { 0% { opacity: 0; transform: scale(1.05); } 20% { opacity: 1; transform: scale(1); } 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.95); } } @keyframes subFade { 0% { opacity: 0; filter: blur(10px); } 40% { opacity: 0.9; filter: blur(0px); } 70% { opacity: 0.9; filter: blur(0px); } 100% { opacity: 0; filter: blur(15px); } @keyframes cleanSubFade { 0% { opacity: 0; } 20% { opacity: 0.9; } 80% { opacity: 0.9; } 100% { opacity: 0; } }
/* --- ŞÜŞƏ PANEL STİLLƏRİ (GLASSMORPHISM) --- */ /* --- ŞÜŞƏ PANEL STİLLƏRİ --- */ .glass-panel { background: var(--glass-bg); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border: 1px solid var(--glass-border); border-top: 1px solid rgba(255,255,255,0.15); /* İşıq düşmə effekti */ border-top: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-big); box-shadow: 0 15px 35px rgba(0,0,0,0.4); overflow: hidden;39 unmodified lines .panel-toggle { background: transparent; color: var(--text-muted); border: none; cursor: pointer; font-size: 18px; transition: 0.3s; padding: 5px; } .panel-toggle:hover { color: white; transform: scale(1.1); }
/* --- ƏSAS İŞ ZONASI (BOŞLUQLAR VƏ DAİRƏVİ KƏNARLAR) --- */ /* --- ƏSAS İŞ ZONASI --- */ .main-layout { display: flex; flex: 1; overflow: hidden; padding: 15px; gap: 15px; } .panel-title { padding: 18px 25px; font-size: 11px; text-transform: uppercase; letter-spacing: 3px; color: var(--text-muted); border-bottom: 1px solid var(--glass-border); background: rgba(0,0,0,0.2); }30 unmodified lines .ps-success { color: #c3e88d; } .ps-error { color: #ff5370; }
/* Scrollbar dizaynı */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }11 unmodified lines
<div id="splash"> <div class="splash-text">TWENTY</div> <div class="splash-sub">Glassmorphism UI</div> <div class="splash-sub">Pro Environment</div> </div>
<div class="glass-panel top-bar" id="top-bar">44 unmodified lines <i class="fa-solid fa-broom" style="cursor:pointer; transition:0.3s;" onclick="clearTerminal()" onmouseover="this.style.color='white'" onmouseout="this.style.color='#999'" title="Təmizlə"></i> </div> <div id="terminal-output"><span style="color: #888;">// Twenty Glass Engine Aktivdir...</span><span style="color: #888;">// Twenty IDE Aktivdir...</span><span class="ps-prompt">PS C:\\Twenty\\src></span> Hazırdır. Kodunuzu icra edin.</div> </div> </div> </div>
<script> // --- DİL DƏYİŞDİRMƏ SİSTEMİ --- function changeLanguage() { const lang = document.getElementById('lang-select').value; if(lang === 'az') {5 unmodified lines } }
// --- KİNO GİRİŞİ --- // --- KİNO GİRİŞİ (YENİLƏNMİŞ) --- window.onload = () => { setTimeout(() => { const splash = document.getElementById('splash');4 unmodified lines document.getElementById('top-bar').classList.add('anim-top'); document.getElementById('sidebar-left').classList.add('anim-left'); document.getElementById('center-panel').classList.add('anim-center'); }, 1000); }, 800); }, 4000); // Nəfəs alma animasiyasını tam görmək üçün vaxt }, 3000); };
function togglePanel(side) {33 unmodified lines require.config({ paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.36.1/min/vs' }}); require(['vs/editor/editor.main'], function() { editor = monaco.editor.create(document.getElementById('editor-container'), { value: "# Twenty IDE: Glassmorphism Edition\\n# Dizayn tam olaraq senin istediyin kimi dairevi ve blurludur.\\n\\nprint('Havada asili qalan paneller mukemmel gorunur!')", value: "# Twenty IDE: Pro Environment\\n# Girish animasiyasi daha keskin ve netdir.\\n\\nprint('Sisteme Xosh Gelmisiniz!')", language: 'python', theme: 'vs-dark', automaticLayout: true,3 unmodified lines }); });
// --- TERMINAL İCRA SİSTEMİ --- async function runCode() { const code = editor.getValue(); const terminal = document.getElementById('terminal-output');50 unmodified lines else: return jsonify({"status": "error", "output": result.stderr if result.stderr else result.stdout}) except subprocess.TimeoutExpired: return jsonify({"status": "error", "output": "Vaxt bitdi (10 saniyə limit). Sonsuz dövr ola bilər və ya kod input() gözləyir."}) return jsonify({"status": "error", "output": "Vaxt bitdi (10 saniyə limit)."}) except Exception as e: return jsonify({"status": "error", "output": str(e)}) finally:app.py+34-37