Created
June 18, 2015 09:06
-
-
Save Bramjetten/902c6328b0d1430ce236 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Restaurant | |
include ActiveSupport::Configurable | |
config_accessor :title, :page_parts, :view_templates, :layout_parts, :custom_pages, :plugins, :structures | |
self.title = "Restaurant thema" | |
self.page_parts = [ | |
{ name: 'header_photo', title: 'Header', page_partable_type: "Spina::Photo" }, | |
{ name: 'background_photo', title: 'Achtergrond', page_partable_type: "Spina::Photo" }, | |
{ name: 'description', title: 'Omschrijving', page_partable_type: "Spina::Line" }, | |
{ name: 'content', title: 'Inhoud', page_partable_type: "Spina::Text" }, | |
{ name: 'menu', title: 'Menukaart', page_partable_type: "Spina::RestaurantMenuCollection" } | |
] | |
self.view_templates = { | |
'show' => { | |
title: 'Tekstpagina', | |
page_parts: ['header_photo', 'background_photo', 'content'] | |
}, | |
'homepage' => { | |
title: 'Homepage', | |
page_parts: ['header_photo', 'background_photo', 'content'] | |
}, | |
'contact' => { | |
title: 'Contactpagina', | |
page_parts: ['header_photo', 'background_photo', 'content'] | |
}, | |
'reservation' => { | |
title: 'Reserveren', | |
page_parts: ['header_photo', 'background_photo', 'content'] | |
}, | |
'menu' => { | |
title: 'Menukaart', | |
page_parts: ['header_photo', 'background_photo', 'menu'] | |
}, | |
'reviews' => { | |
title: 'Beoordelingen', | |
page_parts: ['header_photo', 'background_photo'] | |
}, | |
'team' => { | |
title: 'Teampagina', | |
page_parts: ['header_photo', 'background_photo', 'content'] | |
} | |
} | |
self.structures = {} | |
self.layout_parts = [ | |
{ name: 'primary_color', title: 'Primaire kleur', layout_partable_type: "Spina::Line" }, | |
{ name: 'secondary_color', title: 'Ondersteunende kleur', layout_partable_type: "Spina::Line" } | |
] | |
self.custom_pages = [ | |
{ name: 'homepage', title: 'Homepage', deletable: false, view_template: 'homepage' }, | |
{ name: 'reviews', title: 'Beoordelingen', deletable: false, view_template: 'reviews' }, | |
{ name: 'reservations', title: 'Reserveren', deletable: false, view_template: 'reservation' }, | |
{ name: 'contact', title: 'Contactpagina', deletable: false, view_template: 'contact' } | |
] | |
# Define plugins | |
self.plugins = ['reviews', 'restaurantmenus', 'openinghours', 'reservations'] | |
end | |
theme = Spina::Theme.new | |
theme.name = "Restaurant" | |
theme.config = Restaurant.config | |
theme.public_theme = true | |
Spina.register_theme(theme) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment