forked from SpinaCMS/Spina
-
Notifications
You must be signed in to change notification settings - Fork 3
/
demo.rb
85 lines (77 loc) · 2.02 KB
/
demo.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
::Spina::Theme.register do |theme|
theme.name = 'demo'
theme.title = 'Demo theme'
theme.page_parts = [{
name: 'line',
title: 'Line',
partable_type: 'Spina::Line'
}, {
name: 'text',
title: 'Text',
partable_type: 'Spina::Text'
}, {
name: 'image',
title: 'Image',
partable_type: 'Spina::Image'
}, {
name: 'image_collection',
title: 'Image collection',
partable_type: 'Spina::ImageCollection'
}, {
name: 'attachment',
title: 'Attachment',
partable_type: 'Spina::Attachment'
}, {
name: 'attachment_collection',
title: 'Attachment collection',
partable_type: 'Spina::AttachmentCollection'
}, {
name: 'structure',
title: 'Structure',
partable_type: 'Spina::Structure'
}]
theme.structures = [{
name: 'structure',
structure_parts: [{
name: 'title',
title: 'Title',
partable_type: 'Spina::Line'
}, {
name: 'description',
title: 'Description',
partable_type: 'Spina::Text'
}]
}]
theme.layout_parts = [{
name: 'line',
title: 'Line',
partable_type: 'Spina::Line'
}]
theme.view_templates = [{
name: 'homepage',
title: 'Homepage',
page_parts: ['text'],
}, {
name: 'show',
title: 'Default',
usage: 'Use for your content',
page_parts: ['text']
}, {
name: 'demo',
title: 'Demo',
description: 'Contains examples of every page part',
page_parts: ['line', 'text', 'image', 'image_collection', 'attachment', 'attachment_collection', 'structure']
}]
theme.custom_pages = [{
name: 'homepage',
title: 'Homepage',
deletable: false,
view_template: 'homepage'
}, {
name: 'demo',
title: 'Demo',
deletable: true,
view_template: 'demo'
}]
theme.plugins = ['reviews']
end