/
dayekb
/
vibecoding_mermaideditor
Обзор
Документация
Войти
/
dayekb
/
vibecoding_mermaideditor
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
styles.css
334 строки
7 KB
dayekb
upload files
05 сен 2025, 20:14
05 сен 2025, 20:14
e30abc8
Код
Авторство
О чём код?
* { margin: 0; padding: 0; box-sizing: border-box; } :root { --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%); --bg-secondary: white; --text-primary: #333; --text-secondary: #666; --panel-bg: white; --input-bg: #f8f9fa; --border-color: #e0e0e0; --shadow: 0 8px 32px rgba(0,0,0,0.1); } [data-theme="dark"] { --bg-primary: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); --bg-secondary: #1a1a1a; --text-primary: #e0e0e0; --text-secondary: #b0b0b0; --panel-bg: #2d2d2d; --input-bg: #3a3a3a; --border-color: #404040; --shadow: 0 8px 32px rgba(0,0,0,0.3); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--bg-primary); min-height: 100vh; color: var(--text-primary); transition: all 0.3s ease; } .container { max-width: 1400px; margin: 0 auto; padding: 20px; } header { text-align: center; margin-bottom: 30px; color: white; position: relative; } .theme-toggle { position: absolute; top: 0; right: 0; } .btn-theme { background: rgba(255, 255, 255, 0.2); color: white; border: 2px solid rgba(255, 255, 255, 0.3); backdrop-filter: blur(10px); } .btn-theme:hover { background: rgba(255, 255, 255, 0.3); border-color: rgba(255, 255, 255, 0.5); } header h1 { font-size: 2.5rem; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); } header p { font-size: 1.1rem; opacity: 0.9; } .main-content { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; } .editor-panel, .preview-panel { background: var(--panel-bg); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; transition: all 0.3s ease; } .panel-header { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; } .panel-header h2 { font-size: 1.3rem; font-weight: 600; } .toolbar { display: flex; gap: 10px; } .btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-weight: 500; transition: all 0.3s ease; font-size: 0.9rem; } .btn-primary { background: #4CAF50; color: white; } .btn-primary:hover { background: #45a049; transform: translateY(-2px); } .btn-secondary { background: #f44336; color: white; } .btn-secondary:hover { background: #da190b; transform: translateY(-2px); } .btn-success { background: #2196F3; color: white; } .btn-success:hover { background: #1976D2; transform: translateY(-2px); } .zoom-indicator { background: rgba(255, 255, 255, 0.2); color: white; padding: 8px 12px; border-radius: 6px; font-size: 0.9rem; font-weight: 500; min-width: 50px; text-align: center; backdrop-filter: blur(10px); } #mermaidCode { width: 100%; height: 500px; padding: 20px; border: none; font-family: 'Courier New', monospace; font-size: 14px; line-height: 1.5; resize: vertical; outline: none; background: var(--input-bg); color: var(--text-primary); transition: all 0.3s ease; } #mermaidCode:focus { background: var(--bg-secondary); box-shadow: inset 0 0 0 2px #667eea; } .preview-container { padding: 20px; min-height: 600px; display: flex; align-items: center; justify-content: center; background: var(--input-bg); transition: all 0.3s ease; overflow: visible; position: relative; } .loading { color: var(--text-secondary); font-style: italic; } .mermaid { max-width: 100%; height: auto; transform-origin: center; min-width: 600px; min-height: 400px; transition: transform 0.3s ease; } .mermaid svg { width: 100% !important; height: auto !important; min-width: 600px; min-height: 400px; } /* Специальные стили для диаграммы Ганта */ .mermaid .gantt { font-size: 14px !important; } .mermaid .gantt .section { font-size: 16px !important; font-weight: bold !important; } .mermaid .gantt .task { font-size: 12px !important; } .mermaid .gantt .grid .tick { stroke: #ccc !important; } .mermaid .gantt .grid .tick.thick { stroke: #999 !important; } .mermaid .gantt .grid path { stroke: #ccc !important; } .examples-panel { background: var(--panel-bg); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); transition: all 0.3s ease; } .examples-panel h3 { margin-bottom: 15px; color: var(--text-primary); font-size: 1.2rem; } .examples-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; } .example-btn { padding: 12px 16px; border: 2px solid var(--border-color); background: var(--panel-bg); border-radius: 8px; cursor: pointer; transition: all 0.3s ease; font-weight: 500; color: var(--text-primary); } .example-btn:hover { border-color: #667eea; background: var(--input-bg); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2); } .error { color: #f44336; background: #ffebee; padding: 15px; border-radius: 6px; border-left: 4px solid #f44336; margin: 10px 0; } .success { color: #4CAF50; background: #e8f5e8; padding: 15px; border-radius: 6px; border-left: 4px solid #4CAF50; margin: 10px 0; } @media (max-width: 768px) { .main-content { grid-template-columns: 1fr; } .container { padding: 10px; } header h1 { font-size: 2rem; } .examples-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); } } /* Анимации */ @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } .editor-panel, .preview-panel, .examples-panel { animation: fadeIn 0.6s ease-out; } /* Стили для экспортированных диаграмм */ .export-container { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }