test/dummy/config/initializers/spina.rb in spina-0.6.13 vs test/dummy/config/initializers/spina.rb in spina-0.6.14

- old
+ new

@@ -1,7 +1,58 @@ Spina::Engine.configure do + config.NEGATIVE_CAPTCHA_SECRET = 'abc' +end - config.default_theme = "Business" +module Spina + module DefaultTheme + include ActiveSupport::Configurable - config.NEGATIVE_CAPTCHA_SECRET = 'fee3b3c8b2faa53dafe0978c10c691c29f9c0fdcf12e0052d8c4f5852903707f4a1b6c14f2ac270950b06a287b0683c02a383745025ae6aa3f85091a5deccf06' + config_accessor :title, :page_parts, :view_templates, :layout_parts, :custom_pages, :plugins, :structures + self.title = "Default theme" + + self.page_parts = [{ + name: 'content', + title: 'Content', + page_partable_type: "Spina::Text" + }, { + name: 'team', + title: 'Team', + page_partable_type: "Spina::Structure" + }] + + self.structures = { + 'team' => [{ + name: 'name', + title: 'Naam', + structure_partable_type: "Spina::Line" + }, { + name: 'description', + title: 'Omschrijving', + structure_partable_type: "Spina::Text" + }, { + name: 'photo', + title: 'Foto', + structure_partable_type: "Spina::Photo" + }] + } + + self.layout_parts = [] + + self.custom_pages = [] + self.plugins = [] + + self.view_templates = { + 'show' => { + title: 'Default', + description: 'Default template', + usage: 'Default page', + page_parts: ['content', 'team'] + } + } + end end + +theme = Spina::Theme.new +theme.name = "Default theme" +theme.config = Spina::DefaultTheme.config +Spina.register_theme(theme)