/
slavatlsn
/
PetNet
Обзор
Документация
Войти
/
slavatlsn
/
PetNet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/static/css/style.css
523 строки
12 KB
slavatlsn
upload files
11 ноя 2025, 19:32
11 ноя 2025, 19:32
798112e
Код
Авторство
О чём код?
:root { /* Цвета для светлой темы */ --primary-color: #4361ee; --primary-hover: #3a56d4; --secondary-color: #5667f9; --secondary-hover: #4361ee; --background-color: #f9fafb; --background-secondary: #ffffff; --text-primary: #1f2937; --text-secondary: #4b5563; --text-light: #ffffff; --border-color: #e5e7eb; --border-light: #d1d5db; --shadow-color: rgba(0, 0, 0, 0.05); --panel-background: #f3f4f6; --accent-color: #7209b7; --success-color: #10b981; --error-color: #ef4444; /* Размеры */ --header-height: 60px; --footer-height: 50px; --sidebar-width: 25%; --button-padding: 8px 14px; --spacing-sm: 10px; --spacing-md: 15px; --spacing-lg: 20px; --radius-default: 6px; --radius-circle: 50%; --transition-speed: 0.2s; --transition-function: ease; /* Шрифты */ --font-family: 'Roboto', sans-serif; --font-size-xs: 0.75rem; --font-size-sm: 0.85rem; --font-size-md: 0.9rem; --font-size-lg: 0.95rem; --font-size-xl: 1.1rem; --font-size-xxl: 1.25rem; --font-size-heading: 1.4rem; --line-height: 1.6; /* Темная тема - значения по умолчанию (светлая) */ --bg-primary: var(--background-color); --bg-secondary: var(--background-secondary); --text-primary-dark: var(--text-primary); --text-secondary-dark: var(--text-secondary); --border-primary: var(--border-color); --panel-bg: var(--panel-background); --canvas-bg: var(--background-color); --canvas-grid: #e5e7eb; --element-stroke: #6b7280; --arc-color: #6b7280; --arc-inhibitor: #f43f5e; --token-color: #1f2937; --arc-weight: #1f2937; } /* Темная тема */ body.dark-theme { --bg-primary: #0f172a; --bg-secondary: #1e293b; --text-primary-dark: #f3f4f6; --text-secondary-dark: #cbd5e1; --border-primary: #334155; --panel-bg: #1e293b; --canvas-bg: #0f172a; --canvas-grid: #1e293b; --element-stroke: #94a3b8; --arc-color: #94a3b8; --arc-inhibitor: #f87171; --token-color: #f3f4f6; --arc-weight: #f3f4f6; } * { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-family); } body { background-color: var(--bg-primary); color: var(--text-primary-dark); display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; line-height: var(--line-height); } header { background: var(--bg-secondary); border-bottom: 1px solid var(--border-primary); color: var(--text-light); padding: var(--spacing-md) var(--spacing-lg); display: flex; justify-content: space-between; align-items: center; } header h2 { color: var(--primary-color); font-weight: 600; } .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; } .logo img { height: 40px; } .logo h1 { font-size: var(--font-size-xxl); font-weight: 500; } .header-controls { display: flex; gap: var(--spacing-sm); } .btn { background-color: var(--primary-color); color: var(--text-light); border: none; padding: var(--button-padding); border-radius: var(--radius-default); cursor: pointer; font-size: var(--font-size-md); font-weight: 500; transition: all var(--transition-speed) var(--transition-function); box-shadow: 0 2px 4px rgba(67, 97, 238, 0.3); min-height: 36px; } .btn:hover { background-color: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(58, 86, 212, 0.4); } .btn-secondary { background-color: var(--panel-bg); color: var(--text-primary-dark); border: 1px solid var(--border-primary); padding: var(--button-padding); border-radius: var(--radius-default); cursor: pointer; font-size: var(--font-size-md); font-weight: 500; transition: all var(--transition-speed) var(--transition-function); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); min-height: 36px; } .btn-secondary:hover { background-color: var(--secondary-hover); color: var(--text-light); border-color: var(--primary-color); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); } main { display: grid; grid-template-columns: var(--sidebar-width) 1fr; height: calc(100vh - var(--header-height) - var(--footer-height)); } .sidebar { background-color: var(--bg-secondary); border-right: 1px solid var(--border-primary); overflow-y: auto; box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05); } .toolbar { padding: var(--spacing-md); border-bottom: 1px solid var(--border-primary); } .toolbar h2 { margin-bottom: var(--spacing-sm); font-size: var(--font-size-xl); color: var(--primary-color); font-weight: 600; } .tool-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--spacing-sm); } .tool-button { aspect-ratio: 1/1; display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: var(--panel-bg); border-radius: var(--radius-default); cursor: pointer; transition: all var(--transition-speed) var(--transition-function); font-size: var(--font-size-xs); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } .tool-button:hover { background-color: rgba(59, 130, 246, 0.1); transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } .tool-button.active { background-color: var(--primary-color); color: var(--text-light); box-shadow: 0 0 0 2px white, 0 4px 6px rgba(37, 99, 235, 0.3); } .tool-button h2 { font-size: 1.5rem; margin-bottom: 5px; } /* Стили для модального окна анализа */ #analysis-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; } #analysis-modal .modal-content { background: var(--bg-primary); border-radius: 8px; padding: 24px; width: 500px; max-width: 90%; max-height: 80vh; overflow-y: auto; box-shadow: 0 4px 20px rgba(0,0,0,0.2); } .analysis-item { margin: 16px 0; padding: 12px; border-left: 4px solid #ddd; background: var(--bg-primary); } .analysis-item.safe { border-left-color: #10b981; } .analysis-item.live { border-left-color: #10b981; } .analysis-item.unsafe { border-left-color: #ef4444; } .analysis-item.dead { border-left-color: #ef4444; } .analysis-item h4 { margin: 0 0 8px 0; font-size: 16px; } .analysis-item p { margin: 0; font-size: 14px; color: var(--text-primary-dark); } /* Стили для модального окна */ .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1000; justify-content: center; align-items: center; } .modal-content { background: var(--bg-primary); border-radius: 8px; padding: 20px; width: 300px; max-width: 90%; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); text-align: center; } .example-btn { width: 100%; padding: 10px; margin: 8px 0; border: 1px solid #ddd; border-radius: 4px; background: var(--bg-secondary); color: var(--text-primary-dark); cursor: pointer; text-align: left; font-size: 14px; transition: background 0.2s; } .example-btn:hover { background: var(--bg-primary); } .speed-control { display: flex; align-items: center; gap: 8px; font-size: var(--font-size-sm); color: var(--text-secondary-dark); margin-left: auto; } .speed-control label { white-space: nowrap; } .speed-control input[type="range"] { width: 100px; } .speed-control span { font-size: var(--font-size-sm); color: var(--primary-color); font-weight: 500; min-width: 30px; text-align: center; } .close-modal-btn { width: 100%; padding: 10px; margin-top: 15px; border: 1px solid #ccc; border-radius: 4px; background: #eee; cursor: pointer; font-weight: 500; } .close-modal-btn:hover { background: #ddd; } .properties { padding: var(--spacing-md); } .properties h2 { margin-bottom: var(--spacing-sm); font-size: var(--font-size-xl); color: var(--primary-color); font-weight: 600; } .property-group { margin-bottom: 15px; background-color: var(--panel-bg); border-radius: var(--radius-default); padding: var(--spacing-md); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); } .property-group h3 { margin-bottom: 8px; font-size: var(--font-size-sm); color: var(--text-secondary-dark); font-weight: 600; padding-bottom: 5px; border-bottom: 1px solid var(--border-primary); } .property { margin-bottom: var(--spacing-sm); } .property label { display: block; margin-bottom: 5px; font-size: var(--font-size-sm); color: var(--text-secondary-dark); font-weight: 500; } .property input, .property select { width: 100%; padding: 8px; border: 1px solid var(--border-primary); border-radius: var(--radius-default); background-color: var(--bg-primary); color: var(--text-primary-dark); transition: border-color var(--transition-speed); } .property input:focus, .property select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2); } .workspace { display: flex; flex-direction: column; overflow: hidden; } .workspace-header { padding: 10px var(--spacing-md); background-color: var(--bg-secondary); border-bottom: 1px solid var(--border-primary); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); } .workspace-title { font-weight: 600; color: var(--primary-color); font-size: var(--font-size-lg); } .simulation-controls { display: flex; gap: var(--spacing-sm); } .canvas-container { flex-grow: 1; position: relative; overflow: hidden; background-color: var(--canvas-bg); display: flex; align-items: center; justify-content: center; } #petri-net-canvas { border: 1px dashed var(--border-light); background-image: radial-gradient(var(--canvas-grid) 1px, transparent 1px); background-size: 20px 20px; cursor: crosshair; box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); } .canvas-placeholder { text-align: center; padding: 30px; color: var(--text-secondary-dark); } .canvas-placeholder h3 { margin-bottom: 15px; color: var(--primary-color); font-size: var(--font-size-heading); font-weight: 600; } .canvas-placeholder p { margin-bottom: 10px; font-size: var(--font-size-lg); color: var(--text-secondary-dark); } .canvas-placeholder-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 20px; } footer { background-color: var(--panel-bg); color: var(--text-secondary-dark); padding: var(--spacing-md) var(--spacing-lg); text-align: center; font-size: var(--font-size-md); border-top: 1px solid var(--border-primary); } footer a { color: var(--secondary-color); text-decoration: none; font-weight: 500; } footer a:hover { text-decoration: underline; color: var(--primary-hover); } .theme-toggle { background: none; border: 1px solid rgba(255, 255, 255, 0.3); width: 40px; height: 40px; border-radius: var(--radius-circle); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.2rem; transition: all 0.3s ease; color: var(--text-light); }