-
Notifications
You must be signed in to change notification settings - Fork 2
/
tbpackage.php
202 lines (164 loc) · 6.94 KB
/
tbpackage.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
195
196
197
198
199
200
201
202
<?php
declare(strict_types=1);
/**
* This file is part of the VitexSoftware package
*
* https://vitexsoftware.com/
*
* (c) Vítězslav Dvořák <http://vitexsoftware.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
require_once 'includes/VSInit.php';
$dwDir = '/var/www/html/download/';
$d = dir($dwDir);
$downloads = [];
while (false !== ($entry = $d->read())) {
if ($entry[0] === '.') {
continue;
}
$downloads[$entry] = VSCZ\ui\WebPage::_format_bytes(filesize($dwDir.$entry));
}
$d->close();
ksort($downloads);
$tbPackage = [];
$fuelUXPackage = [];
$tbSwPackage = [];
$jqueryPackage = [];
foreach ($downloads as $file => $size) {
if (strstr($file, 'libjs-twitter-bootstrap_')) {
$tbPackage = [$file => $size];
}
if (strstr($file, 'libjs-fuelux_')) {
$fuelUXPackage = [$file => $size];
}
if (strstr($file, 'libjs-twitter-bootstrap-switch_')) {
$tbSwPackage = [$file => $size];
}
if (strstr($file, 'libjs-jquery_')) {
$jqueryPackage = [$file => $size];
}
}
// $oPage->head->addItem('<link rel="alternate" type="application/rss+xml" title="Ease Framework SVN" href="/websvn/rss.php?repname=Ease+Framework" />');
$oPage->addItem(new \VSCZ\ui\PageTop(_('unofficial Twitter Bootstrap Debian/Ubuntu packages')));
$container = $oPage->addItem(new \Ease\TWB5\Container());
$packTabs = new \Ease\TWB5\Tabs('PackTabs');
$bootStrapTab = $packTabs->addTab('Twitter Bootstrap');
$bootStrapTab->addItem(new \Ease\Html\DivTag(
new VSCZ\ui\DownloadButton($tbPackage),
['style' => 'float:left;'],
));
$bootStrapTab->addItem(new \Ease\Html\DivTag(new \Ease\Html\ATag(
'http://twitter.github.com/bootstrap/',
'<img style="height: 32px;" src="img/twitter-bootstrap.png"> Official project homepage',
['class' => 'btn btn-info'],
), ['style' => 'float:right;']));
$bootStrapTab->addItem('is a free collection of tools for creating websites and web applications. It contains HTML and CSS-based design templates for typography, forms, buttons, charts, navigation and other interface components, as well as optional JavaScript extensions.');
$fuelUXTab = $packTabs->addTab('Fuel UX');
$fuelUXTab->addItem(new \Ease\Html\DivTag(
new VSCZ\ui\DownloadButton($fuelUXPackage),
['style' => 'float:left;'],
));
$fuelUXTab->addItem(new \Ease\Html\DivTag(
new \Ease\Html\ATag(
'http://getfuelux.com/',
'<img style="height: 32px;" src="img/fuelux.png">',
['class' => 'btn btn-info', 'style' => 'margin-left: 5px;'],
),
['style' => 'float:right;'],
));
$fuelUXTab->addItem('extends Twitter Bootstrap with additional lightweight JavaScript controls. Other benefits include easy installation into web projects, integrated scripts for customizing Bootstrap and Fuel UX, simple updates, and solid optimization for deployment. All functionality is covered by live documentation and unit tests.');
$bsSwitchTab = $packTabs->addTab('Bootstrap Switch');
$bsSwitchTab->addItem(new \Ease\Html\DivTag(
new VSCZ\ui\DownloadButton($tbSwPackage),
['style' => 'float:left;'],
));
$bsSwitchTab->addItem(new \Ease\Html\DivTag(
new \Ease\Html\ATag(
'http://www.bootstrap-switch.org/',
'Project Homepage',
['class' => 'btn btn-info'],
),
['style' => 'float:right;'],
));
$bsSwitchTab->addItem('extends Twitter Bootstrap with switch widget.');
$jqueryTab = $packTabs->addTab('jQuery');
$jqueryTab->addItem(new \Ease\Html\DivTag(
new VSCZ\ui\DownloadButton($jqueryPackage),
['style' => 'float:left;'],
));
$jqueryTab->addItem(new \Ease\Html\DivTag(
new \Ease\Html\ATag(
'http://jquery.com/',
'<img style="height: 32px;" src="img/logo-jquery.png">',
['class' => 'btn btn-info', 'style' => 'margin-left: 5px;'],
),
['style' => 'float:right;'],
));
$jqueryTab->addItem('jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.');
$container->addItem($packTabs);
$container2 = $oPage->addItem(new \Ease\TWB5\Container('<p><br></p>'));
$tabs = new \Ease\TWB5\Tabs('infotabs');
$steps = new \Ease\Html\UlTag(null, ['class' => 'list-group']);
$steps->addItemSmart(
'wget -O - http://v.s.cz/[email protected] | sudo apt-key add -',
['class' => 'list-group-item'],
);
$steps->addItemSmart(
'echo deb http://v.s.cz/ stable main | sudo tee /etc/apt/sources.list.d/vitexsoftware.list ',
['class' => 'list-group-item'],
);
$steps->addItemSmart('sudo aptitude update', ['class' => 'list-group-item']);
$steps->addItemSmart(
'aptitude install libjs-twitter-bootstrap',
['class' => 'list-group-item'],
);
$steps->addItemSmart(
'aptitude install libjs-fuelux',
['class' => 'list-group-item'],
);
$steps->addItemSmart(
'aptitude install libjs-twitter-bootstrap-switch',
['class' => 'list-group-item'],
);
$tabs->addTab(_('Debian installation'), $steps);
$tabs->addTab(
_('Usage'),
<<<'EOD'
In order to make use of twitter bootstrap in your html, include the following lines in
your html header:
<br/>
<code>
<link type="text/css" href="/javascript/twitter-bootstrap/css/twitter-bootstrap.css" rel="stylesheet" />
<br/>
<script language="javascript" type="text/javascript" src="/javascript/jquery/jquery.js"></script>
<br/>
<script language="javascript" type="text/javascript" src="/javascript/twitter-bootstrap/bootstrap.js"></script>
</code>
<h5>for FuelUX support add:</h5>
<code>
<link type="text/css" href="/javascript/twitter-bootstrap/css/fuelux.css" rel="stylesheet" />
<br/>
<script language="javascript" type="text/javascript" src="/javascript/twitter-bootstrap/fuelux.js"></script>
</code>
<h5>for boostrstrap-switch add:</h5>
<code>
<link type="text/css" href="/javascript/twitter-bootstrap/css/boostrstrap-switch.css" rel="stylesheet" />
<br/>
<script language="javascript" type="text/javascript" src="/javascript/twitter-bootstrap/js/boostrstrap-switch.js"></script>
</code>
EOD
);
$container2->addItem($tabs);
$container2->addItem('<hr>');
$container2->addItem('<h5>Compatible with</h5>');
$container2->addItem('<a href="http://debian.org/"><img style="width: 60px;" title="Debian Linux" src="img/debian.png"></a>');
$container2->addItem('<a href="http://ubuntu.com/"><img style="width: 60px;" title="Ubuntu Linux" src="img/ubuntulogo.png"></a>');
$container2->addItem(new \Ease\Html\ATag(
'http://bootsnipp.com/',
'<img style="height: 32px;" src="img/bootsnip.png"> Design elements and code snippets',
['class' => 'btn btn-info'],
));
$oPage->addItem(new \VSCZ\ui\PageBottom());
$oPage->draw();