UNPKG

@liascript/exporter

Version:
712 lines (615 loc) 12 kB
:root { /* LiaScript Brand Colors */ --turquoise-darker: rgb(15, 54, 69); --turquoise-dark: rgb(16, 116, 117); --turquoise: rgb(20, 115, 117); /* Theme Colors */ --primary: var(--turquoise); --primary-light: rgba(20, 115, 117, 0.1); --secondary: #64748b; --success: #22c55e; --error: #ef4444; --bg: #f8fafc; --card-bg: #ffffff; --border: #e2e8f0; --text: #1e293b; --text-muted: #64748b; --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); --transition: all 0.2s ease; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; } /* Navbar */ .navbar { background: var(--card-bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; } .navbar-container { max-width: 800px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; justify-content: space-between; height: 60px; } .navbar-brand { display: flex; align-items: center; text-decoration: none; transition: var(--transition); } .navbar-brand img { height: 36px; width: 36px; } .navbar-brand:hover { opacity: 0.8; } .navbar-menu { display: flex; align-items: center; gap: 1rem; list-style: none; margin: 0; padding: 0; } .navbar-link { text-decoration: none; color: var(--turquoise-darker); padding: 0.5rem 1rem; border-radius: 6px; transition: var(--transition); font-weight: 700; } .navbar-link:hover { color: var(--turquoise); background: var(--primary-light); } .navbar-link.active { color: var(--turquoise); background: var(--primary-light); } /* Language Selector */ .language-selector-container { display: flex; align-items: center; } .language-selector { background: var(--card-bg); border: 2px solid var(--border); border-radius: 6px; padding: 0.3rem; font-size: 0.8rem; font-weight: 600; color: var(--turquoise-darker); cursor: pointer; transition: var(--transition); } .language-selector:hover { border-color: var(--turquoise); background-color: var(--primary-light); } .language-selector:focus { outline: none; border-color: var(--turquoise); box-shadow: 0 0 0 3px var(--primary-light); } .language-selector option { background: var(--card-bg); color: var(--turquoise-darker); font-weight: 600; } .container { max-width: 800px; margin: 0 auto; padding: 2rem 1rem; } /* Header */ header { text-align: center; margin-bottom: 3rem; padding: 2rem 1rem; background: var(--turquoise); border-radius: 12px; color: white; box-shadow: var(--shadow); } header h1 { font-size: 2rem; margin-bottom: 0.5rem; color: white; font-weight: 600; } .subtitle { color: rgba(255, 255, 255, 0.9); font-size: 1rem; } /* Card */ .card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); transition: var(--transition); } .card:hover { box-shadow: var(--shadow-lg); } .card h2 { font-size: 1.25rem; margin-bottom: 1.5rem; color: var(--turquoise-darker); font-weight: 700; } /* Tabs */ .source-tabs, .export-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); } .tab-button, .export-tab-button { background: none; border: none; padding: 0.75rem 1.5rem; cursor: pointer; font-size: 0.95rem; color: var(--text-muted); border-bottom: 2px solid transparent; transition: all 0.2s; } .tab-button:hover, .export-tab-button:hover { color: var(--text); } .tab-button.active, .export-tab-button.active { color: var(--primary); border-bottom-color: var(--primary); } .tab-panel, .export-tab-panel { display: none; } .tab-panel.active, .export-tab-panel.active { display: block; } /* Upload Area */ .upload-area { border: 2px dashed var(--border); border-radius: 12px; padding: 3rem 2rem; text-align: center; cursor: pointer; transition: var(--transition); background: var(--bg); } .upload-area:hover { border-color: var(--turquoise); background: var(--primary-light); } .upload-area.drag-over { border-color: var(--turquoise); background: var(--primary-light); border-style: solid; } .upload-area svg { color: var(--turquoise); margin-bottom: 1rem; } .upload-area p { color: var(--text); margin-bottom: 0.5rem; font-weight: 500; } .upload-area .hint { color: var(--text-muted); font-size: 0.875rem; } .upload-area input[type='file'] { display: none; } /* File List */ .file-list { margin-top: 1rem; } .file-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 0.5rem; transition: var(--transition); } .file-item:hover { border-color: var(--turquoise); background: var(--primary-light); } .file-name { flex: 1; font-size: 0.95rem; } .file-size { color: var(--text-muted); font-size: 0.875rem; } .remove-file { background: none; border: none; color: var(--error); font-size: 1.5rem; cursor: pointer; padding: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: background 0.2s; } .remove-file:hover { background: #fee; } /* Form Elements */ .form-group { margin-bottom: 1.5rem; } .form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--text); } .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; transition: border-color 0.2s; font-family: inherit; } .form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--turquoise); box-shadow: 0 0 0 3px var(--primary-light); } .form-group textarea { resize: vertical; min-height: 80px; font-family: 'Monaco', 'Courier New', monospace; font-size: 0.875rem; } .form-group input[readonly] { background: var(--bg); color: var(--text-muted); } .form-group .hint { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: var(--text-muted); } .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } /* Preset Grid */ .preset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; } .preset-tile { position: relative; cursor: pointer; } .preset-tile input[type='radio'] { position: absolute; opacity: 0; } .preset-content { border: 2px solid var(--border); border-radius: 12px; padding: 1.5rem 1rem; text-align: center; transition: var(--transition); background: white; } .preset-tile:hover .preset-content { border-color: var(--turquoise); background: var(--primary-light); } .preset-tile input:checked + .preset-content { border-color: var(--turquoise); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(20, 115, 117, 0.1); } .preset-content h3 { font-size: 1rem; margin-bottom: 0.25rem; color: var(--turquoise-darker); font-weight: 600; } .preset-content p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.5rem; } .format-icon { font-size: 2rem; margin-bottom: 0.5rem; } /* Collapsible */ .collapsible-toggle { background: none; border: none; cursor: pointer; font-size: 1.25rem; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 0.5rem; padding: 0; width: 100%; text-align: left; } .toggle-icon { font-size: 0.875rem; transition: transform 0.2s; } .collapsible-content { margin-top: 1.5rem; } .hidden { display: none; } /* Settings Groups */ .settings-group { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); } .settings-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; } .settings-heading { font-size: 1rem; font-weight: 600; color: var(--turquoise-darker); margin-bottom: 1rem; } .settings-group .form-group { margin-bottom: 1rem; } .settings-group .form-group:last-child { margin-bottom: 0; } .settings-group.no-settings { border-bottom: none; text-align: center; padding: 2rem 0; } .form-group label input[type='checkbox'] { width: auto; margin-right: 0.5rem; cursor: pointer; } /* Buttons */ .btn-primary { background: var(--turquoise); color: white; border: none; padding: 0.875rem 2rem; font-size: 1rem; font-weight: 500; border-radius: 8px; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; } .btn-primary:hover { background: var(--turquoise-dark); } .btn-primary:disabled { background: var(--secondary); cursor: not-allowed; } .btn-secondary { background: var(--secondary); color: white; border: none; padding: 0.875rem 2rem; font-size: 1rem; font-weight: 500; border-radius: 6px; cursor: pointer; transition: background 0.2s; } .btn-secondary:hover { background: #475569; } /* Submit Section */ .submit-section { text-align: center; } .submit-section .btn-primary { margin-bottom: 1rem; } .info-text { color: var(--text-muted); font-size: 0.875rem; line-height: 1.5; } /* Modal */ .modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; } .modal.hidden { display: none; } .modal-content { background: var(--card-bg); border-radius: 12px; padding: 2rem; max-width: 500px; width: 100%; box-shadow: var(--shadow-lg); animation: modalSlideIn 0.3s ease; } @keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } .modal-content h2 { margin-bottom: 1.5rem; color: var(--turquoise-darker); font-weight: 600; } .modal-content p { margin-bottom: 0.75rem; } .success-message { color: var(--success); font-weight: 500; margin-top: 1rem; } .modal-actions { display: flex; gap: 1rem; margin-top: 2rem; } .modal-actions .btn-primary, .modal-actions .btn-secondary { flex: 1; justify-content: center; } /* Footer */ footer { text-align: center; margin-top: 4rem; padding: 2rem 0; color: var(--text-muted); font-size: 0.875rem; } /* Responsive */ @media (max-width: 640px) { .navbar-container { flex-direction: column; height: auto; padding: 1rem; gap: 1rem; } .navbar-brand { font-size: 1rem; } .navbar-menu { width: 100%; justify-content: center; } .preset-grid { grid-template-columns: 1fr 1fr; } .form-row { grid-template-columns: 1fr; } .modal-actions { flex-direction: column; } } /* Status Page */ .status-badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 4px; font-size: 0.875rem; font-weight: 500; } .status-queued { background: #dbeafe; color: #1e40af; } .status-processing { background: #fef3c7; color: #92400e; } .status-completed { background: #d1fae5; color: #065f46; } .status-failed { background: #fee2e2; color: #991b1b; } .progress-bar { width: 100%; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin: 1rem 0; } .progress-fill { height: 100%; background: var(--primary); transition: width 0.3s; } .refresh-info { text-align: center; color: var(--text-muted); font-size: 0.875rem; margin-top: 1rem; }