diff --git a/frontend/src/app.css b/frontend/src/app.css index e69de29..1435e65 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -0,0 +1,188 @@ +/* Reset and base styles */ +:root { + --primary-color: #4a90e2; + --secondary-color: #f5f5f5; + --border-color: #ddd; + --text-color: #333; + --error-color: #e74c3c; + --success-color: #2ecc71; + --shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, + sans-serif; + line-height: 1.6; + color: var(--text-color); + background-color: #fff; + padding: 2rem; +} + +/* Typography */ +h1 { + font-size: 2rem; + margin-bottom: 1.5rem; + color: var(--text-color); +} + +h2 { + font-size: 1.5rem; + margin: 1.5rem 0 1rem; +} + +/* Links */ +a { + color: var(--primary-color); + text-decoration: none; + transition: color 0.2s; +} + +a:hover { + color: #357abd; + text-decoration: underline; +} + +/* Lists */ +ul { + list-style: none; + margin: 1rem 0; +} + +li { + padding: 0.75rem; + border-bottom: 1px solid var(--border-color); +} + +li:last-child { + border-bottom: none; +} + +/* Forms */ +form { + max-width: 800px; + margin: 2rem 0; +} + +.form-group { + margin-bottom: 1.5rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 500; +} + +input[type='text'], +input[type='number'], +input[type='date'], +select, +textarea { + width: 100%; + padding: 0.75rem; + border: 1px solid var(--border-color); + border-radius: 4px; + font-size: 1rem; + margin-bottom: 1rem; + transition: border-color 0.2s; +} + +input:focus, +select:focus, +textarea:focus { + outline: none; + border-color: var(--primary-color); + box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2); +} + +textarea { + min-height: 100px; + resize: vertical; +} + +/* Buttons */ +button { + background-color: var(--primary-color); + color: white; + border: none; + padding: 0.75rem 1.5rem; + border-radius: 4px; + cursor: pointer; + font-size: 1rem; + transition: background-color 0.2s; +} + +button:hover:not(:disabled) { + background-color: #357abd; +} + +button:disabled { + background-color: #ccc; + cursor: not-allowed; +} + +button.secondary { + background-color: var(--secondary-color); + color: var(--text-color); + border: 1px solid var(--border-color); +} + +button.secondary:hover:not(:disabled) { + background-color: #e8e8e8; +} + +button + button { + margin-left: 1rem; +} + +/* Field management */ +.field-container { + background-color: var(--secondary-color); + padding: 1rem; + border-radius: 4px; + margin-bottom: 1rem; +} + +/* Submissions */ +.submissions-list { + background-color: var(--secondary-color); + padding: 1rem; + border-radius: 4px; +} + +.submission-item { + background-color: white; + padding: 1rem; + margin-bottom: 0.5rem; + border-radius: 4px; + box-shadow: var(--shadow); +} + +/* Utility classes */ +.container { + max-width: 1200px; + margin: 0 auto; + padding: 0 1rem; +} + +.loading { + text-align: center; + padding: 2rem; + color: #666; +} + +.error { + color: var(--error-color); + margin: 1rem 0; +} + +.success { + color: var(--success-color); + margin: 1rem 0; +} diff --git a/frontend/src/routes/(auth)/create/+page.svelte b/frontend/src/routes/(auth)/create/+page.svelte index 0a260d0..89f713d 100644 --- a/frontend/src/routes/(auth)/create/+page.svelte +++ b/frontend/src/routes/(auth)/create/+page.svelte @@ -6,12 +6,10 @@ let fields: FormField[] = []; function addField() { - // Use a new array assignment to trigger reactivity fields = [...fields, { label: '', name: '', field_type: 'text' }]; } function removeField(index: number) { - // Reassign to trigger reactivity fields = fields.filter((_, i) => i !== index); } @@ -27,36 +25,38 @@ } -
Loading...
-{/if} +Loading...
+ {/if} +