feat: add Settings and Media contexts with theme settings schema
- Create settings table for site-wide key-value configuration - Create images table for BLOB storage of logo/header images - Add Setting schema with JSON/string/integer/boolean support - Add ThemeSettings embedded schema with all theme options - Add Settings context with get/put/update operations - Add Media context for image uploads and retrieval - Add Image schema with SVG detection and storage - Add 9 curated theme presets (gallery, studio, boutique, etc.) - Add comprehensive tests for Settings and Media contexts - Add seeds with default Studio preset - All tests passing (29 tests, 0 failures)
This commit is contained in:
@@ -9,3 +9,12 @@
|
||||
#
|
||||
# We recommend using the bang functions (`insert!`, `update!`
|
||||
# and so on) as they will fail if something goes wrong.
|
||||
|
||||
alias SimpleshopTheme.Settings
|
||||
|
||||
# Set default theme settings (Studio preset)
|
||||
IO.puts("Setting up default theme settings...")
|
||||
|
||||
{:ok, _theme} = Settings.apply_preset(:studio)
|
||||
|
||||
IO.puts("✓ Default theme settings applied (Studio preset)")
|
||||
|
||||
Reference in New Issue
Block a user