/
Stils
/
SQLTranslator
Обзор
Документация
Войти
/
Stils
/
SQLTranslator
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/App.css
522 строки
10 KB
stilsman
Initial commit: SQL translation app with Oracle to PostgreSQL conversion
21 май 2025, 19:13
21 май 2025, 19:13
04457a0
Код
Авторство
О чём код?
/* Современный минималистичный дизайн для SQL Translator */ :root { --primary-color: #4F46E5; /* Индиго */ --primary-light: #6366F1; --secondary-color: #10B981; /* Изумрудный */ --background-dark: #111827; --background-medium: #1F2937; --background-light: #374151; --text-primary: #F9FAFB; --text-secondary: #D1D5DB; --text-muted: #9CA3AF; --error-color: #EF4444; --success-color: #10B981; --border-radius: 12px; --transition-speed: 0.3s; --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; --font-mono: 'JetBrains Mono', 'SF Mono', 'Courier New', monospace; } /* Base styles */ body { margin: 0; font-family: var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background-color: var(--background-dark); color: var(--text-primary); } /* App container */ .AppContainer { display: flex; height: 100vh; width: 100%; background-color: var(--background-dark); color: var(--text-primary); overflow: hidden; } /* Sidebar styling */ .Sidebar { width: 240px; background-color: var(--background-medium); padding: 1.5rem 1rem; height: 100%; position: fixed; top: 0; left: 0; z-index: 10; transition: all var(--transition-speed) ease; box-shadow: var(--shadow-md); display: flex; flex-direction: column; } .Sidebar.collapsed { width: 60px; } .ToggleButton { background: transparent; border: none; color: var(--text-secondary); font-size: 1.25rem; cursor: pointer; margin-bottom: 2rem; padding: 0.5rem; border-radius: 8px; display: flex; justify-content: center; align-items: center; transition: all var(--transition-speed) ease; align-self: flex-end; } .ToggleButton:hover { color: var(--text-primary); background-color: var(--background-light); } .nav-buttons { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; } .nav-button { background: transparent; border: none; color: var(--text-secondary); padding: 0.75rem 1rem; text-align: left; border-radius: 8px; cursor: pointer; font-size: 0.95rem; font-weight: 500; display: flex; align-items: center; gap: 0.75rem; transition: all var(--transition-speed) ease; } .nav-button:hover { background-color: var(--background-light); color: var(--text-primary); } .nav-button.active { background-color: var(--primary-color); color: white; } /* Model selection dropdown */ .model-dropdown { background-color: var(--background-light); border-radius: 8px; padding: 0.5rem; margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.25rem; box-shadow: var(--shadow-md); } .model-option { background: transparent; border: none; color: var(--text-secondary); padding: 0.6rem 0.75rem; text-align: left; border-radius: 6px; cursor: pointer; font-size: 0.9rem; transition: all 0.2s ease; } .model-option:hover { background-color: rgba(255, 255, 255, 0.1); color: var(--text-primary); } /* Messages container */ .MessagesContainer { flex: 1; overflow-y: auto; padding: 2rem; margin-left: 240px; transition: margin-left var(--transition-speed) ease; display: flex; flex-direction: column; gap: 1.5rem; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--background-light) var(--background-medium); height: calc(100vh - 80px); } .MessagesContainer.shifted { margin-left: 60px; } .MessagesContainer::-webkit-scrollbar { width: 6px; } .MessagesContainer::-webkit-scrollbar-track { background: var(--background-medium); } .MessagesContainer::-webkit-scrollbar-thumb { background-color: var(--background-light); border-radius: 3px; } /* Message styling */ .MessageBubble { position: relative; background-color: var(--background-medium); border-radius: var(--border-radius); padding: 1.25rem; max-width: 85%; align-self: flex-start; box-shadow: var(--shadow-sm); line-height: 1.6; font-size: 0.95rem; color: var(--text-primary); border-left: 4px solid var(--primary-color); animation: fadeIn 0.3s ease-in-out; } .MessageBubble.user { background-color: var(--background-light); align-self: flex-end; border-left: none; border-right: 4px solid var(--secondary-color); } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } /* Code block styling */ .MessageBubble pre { background-color: var(--background-dark) !important; border-radius: 8px; padding: 1rem !important; margin: 1rem 0 !important; overflow-x: auto; font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.5; border: 1px solid var(--background-light); } /* Button container for code actions */ .button-container { position: absolute; top: 0.75rem; right: 0.75rem; display: flex; gap: 0.5rem; opacity: 0; transition: opacity 0.2s ease; } .MessageBubble:hover .button-container { opacity: 1; } .action-button { background-color: var(--primary-light); color: white; border: none; border-radius: 6px; padding: 0.35rem 0.75rem; font-size: 0.8rem; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 0.25rem; font-weight: 500; } .action-button:hover { filter: brightness(1.1); transform: translateY(-1px); } .action-button:disabled { background-color: var(--background-light); color: var(--text-muted); cursor: not-allowed; transform: none; } /* Input form styling */ .InputForm { position: fixed; bottom: 0; right: 0; left: 240px; background-color: var(--background-medium); padding: 1rem 2rem; transition: left var(--transition-speed) ease; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); z-index: 5; border-top: 1px solid var(--background-light); height: 80px; } .InputForm.shifted { left: 60px; } .InputContainer { display: flex; align-items: flex-start; gap: 1rem; position: relative; } .Input { flex: 1; background-color: var(--background-light); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; color: var(--text-primary); padding: 1rem; font-size: 0.95rem; resize: none; min-height: 60px; max-height: 60px; transition: all 0.2s ease; outline: none; font-family: var(--font-sans); line-height: 1.5; } .Input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3); } .file-upload { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background-color: var(--background-light); cursor: pointer; transition: all 0.2s ease; } .file-upload:hover { background-color: var(--primary-light); } .file-upload input[type="file"] { display: none; } .plus-icon { display: flex; align-items: center; justify-content: center; color: var(--text-primary); font-size: 1.5rem; } .Button { background-color: var(--primary-color); color: white; border: none; border-radius: 12px; padding: 0.75rem 1.5rem; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; min-width: 100px; } .Button:hover { background-color: var(--primary-light); transform: translateY(-1px); } .Button:disabled { background-color: var(--background-light); color: var(--text-muted); cursor: not-allowed; } /* Loading animation */ .loading-indicator { display: flex; align-items: center; gap: 0.75rem; color: var(--text-secondary); font-size: 0.9rem; } .loader { border: 3px solid rgba(255, 255, 255, 0.1); border-top: 3px solid var(--primary-color); border-radius: 50%; width: 18px; height: 18px; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .typing-indicator { display: flex; align-items: center; gap: 0.25rem; } .typing-dot { width: 6px; height: 6px; border-radius: 50%; background-color: var(--text-muted); animation: blink 1.4s infinite both; } .typing-dot:nth-child(2) { animation-delay: 0.2s; } .typing-dot:nth-child(3) { animation-delay: 0.4s; } @keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } } /* Welcome message styling */ .WelcomeMessage { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; margin: auto; max-width: 600px; padding: 2rem; background-color: var(--background-medium); border-radius: var(--border-radius); box-shadow: var(--shadow-lg); animation: fadeIn 0.4s ease-out; border-top: 4px solid var(--primary-color); } .WelcomeMessage h1 { color: var(--text-primary); font-size: 1.75rem; margin-bottom: 1rem; font-weight: 700; } .WelcomeMessage p { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.6; margin-bottom: 1.5rem; } .feature-list { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; justify-content: center; } .feature-item { background-color: var(--background-light); padding: 1rem; border-radius: 8px; display: flex; align-items: center; gap: 0.75rem; width: 180px; } .feature-icon { color: var(--primary-color); font-size: 1.25rem; } .feature-text { font-size: 0.9rem; color: var(--text-secondary); } /* Responsive Adjustments */ @media (max-width: 768px) { .Sidebar { width: 200px; } .MessagesContainer { margin-left: 200px; padding: 1.5rem; } .InputForm { left: 200px; padding: 0.75rem 1.5rem; } .MessageBubble { max-width: 90%; } } @media (max-width: 576px) { .Sidebar:not(.collapsed) { width: 100%; } .MessagesContainer:not(.shifted) { display: none; } .InputForm:not(.shifted) { display: none; } .MessagesContainer.shifted { margin-left: 60px; padding: 1rem; } .InputForm.shifted { left: 60px; padding: 0.75rem 1rem; } .Button { padding: 0.75rem 1rem; min-width: auto; } }