forked from giansi/gravstrap-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gravstrap-theme.php
194 lines (178 loc) · 7.06 KB
/
gravstrap-theme.php
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php
namespace Grav\Theme;
use Grav\Common\Theme;
class GravstrapTheme extends Theme
{
/**
* @return array
*/
public static function getSubscribedEvents()
{
return [
'onThemeInitialized' => ['onThemeInitialized', 0],
];
}
public function onThemeInitialized()
{
if ($this->isAdmin()) {
$this->active = false;
return;
}
$this->enable([
'onTwigSiteVariables' => ['onTwigSiteVariables', 0]
]);
}
public function onTwigSiteVariables()
{
$accordion = array(
'id' => 'accordion1',
'name' => 'accordion1',
'items' => array(
array(
'id' => 'accordion_item1',
'header_id' => 'accordion_item1',
'title' => 'An awesome title',
'content' => 'Anim pariatur cliche reprehenderit enim eiusmod high life accusamus terry richardson ad squid.',
),
array(
'id' => 'accordion_item2',
'header_id' => 'accordion_item2',
'title' => 'Another awesome title',
'content' => '3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod.',
),
),
);
$this->grav['twig']->twig_vars['accordion'] = $accordion;
$alert = array(
'name' => 'alert1',
'type' => 'warning',
'attributes' => 'class:my-class,rel:my-rel',
'content' => 'Anim pariatur cliche reprehenderit enim eiusmod high life accusamus terry richardson ad squid.',
);
$this->grav['twig']->twig_vars['alert'] = $alert;
$carousel = array(
'id' => 'carousel1',
'name' => 'carousel1',
'previous_label' => 'Prev',
'next_label' => 'Next',
'items' => array(
array(
'image' => 'image1.jpg',
'caption' => 'First image caption',
),
array(
'image' => 'image2.jpg',
'caption' => 'Second image caption',
),
array(
'image' => 'image3.jpg',
'caption' => 'Third image caption',
),
),
);
$this->grav['twig']->twig_vars['carousel'] = $carousel;
$jumbotron = array(
'name' => 'jumbotron1',
'image' => 'image1.jpg',
'fullwidth' => true,
'attributes' => 'class:my-class,rel:my-rel',
'content' => 'Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid.',
);
$this->grav['twig']->twig_vars['jumbotron'] = $jumbotron;
$listGroup = array(
'name' => 'listgroup1',
'items' => array(
array(
'badge' => '12',
'active' => true,
'attributes' => 'class:my-class,rel:my-rel',
'content' => 'Cras mattis consectetur purus sit amet fermentum.',
),
array(
'badge' => '15',
'content' => 'Cras mattis consectetur purus sit amet fermentum.',
),
array(
'disabled' => true,
'content' => 'Cras mattis consectetur purus sit amet fermentum.',
),
array(
'badge' => '12',
'type' => 'success',
'content' => 'Cras mattis consectetur purus sit amet fermentum.',
),
),
);
$this->grav['twig']->twig_vars['list_group'] = $listGroup;
$pageHeader = array(
'name' => 'pageheader1',
'title' => 'Title',
'subtitle' => 'Subtitle',
'attributes' => 'class:my-class,rel:my-rel',
);
$this->grav['twig']->twig_vars['page_header'] = $pageHeader;
$panel = array(
'name' => 'panel1',
'heading_title' => 'Title',
//'footer_title' => Footer title,
'type' => 'danger',
'content' => 'Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid.',
);
$this->grav['twig']->twig_vars['panel'] = $panel;
$progressbar = array(
'name' => 'progressbar1',
'label' => 'PHP',
'type' => 'success',
//'striped' => true,
//'animated' => true,
'value' => 80,
'min' => 0,
'max' => 100,
'attributes' => 'class:my-class,rel:my-rel',
);
$this->grav['twig']->twig_vars['progressbar'] = $progressbar;
$tab = array(
'name' => 'tab1',
'items' => array(
array(
'name' => 'tab_item1',
'attributes' => 'class:my-class,rel:my-rel',
'content' => 'Cras mattis consectetur purus sit amet fermentum.',
),
array(
'name' => 'tab_item2',
'content' => 'Cras mattis consectetur purus sit amet fermentum.',
),
),
);
$this->grav['twig']->twig_vars['tab'] = $tab;
$thumbnail = array(
'name' => 'thumbnail1',
'items' => array(
array(
'image' => 'image1.jpg',
'url' => 'http://diblas.net',
//'content' => 'Cras mattis consectetur purus sit amet fermentum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.',
),
array(
'image' => 'image2.jpg',
'url' => 'http://diblas.net',
//'content' => 'Cras mattis consectetur purus sit amet fermentum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.',
),
array(
'image' => 'image3.jpg',
'url' => 'http://diblas.net',
//'content' => 'Cras mattis consectetur purus sit amet fermentum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.',
),
),
);
$this->grav['twig']->twig_vars['thumbnail'] = $thumbnail;
$well = array(
'name' => 'pageheader1',
'size' => 'large',
'attributes' => 'class:my-class,rel:my-rel',
'content' => 'Cras mattis consectetur purus sit amet fermentum.',
);
$this->grav['twig']->twig_vars['well'] = $well;
}
}