-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
twb4.php
93 lines (60 loc) · 2.58 KB
/
twb4.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
<?php
namespace Ease\Example;
use Ease\Html\ATag;
use Ease\Html\DivTag;
use Ease\Html\H1Tag;
use Ease\Html\H2Tag;
use Ease\Html\H3Tag;
use Ease\Html\SpanTag;
use Ease\Html\StrongTag;
use Ease\TWB4\Alert;
use Ease\TWB4\Badge;
use Ease\TWB4\DropdownButton;
use Ease\TWB4\DropdownLink;
use Ease\TWB4\Navbar;
use Ease\TWB4\Panel;
use Ease\TWB4\PillBadge;
use Ease\TWB4\WebPage;
include_once dirname(__DIR__).'/vendor/autoload.php';
new \Ease\Locale('en_US','','');
$oPage = new WebPage('Twitter Bootstrap 4 Page');
$oPage->addItem(new H1Tag('Twitter Bootstrap 4'));
$navBar = new Navbar('TWB4', 'myNavBar',
['class' => 'navbar-expand-lg navbar-light bg-light']);
$navBar->addMenuItem(new ATag('twb4.php',
['Home', new SpanTag('(current)', ['class' => 'sr-only'])]));
$navBar->addMenuItem(new ATag('#', 'Link'));
$navBar->addMenuItem(new DropdownLink('Dropdown Link', 'link',
['index.php' => _('Main Page'), 'login.php' => _('Login Page')],
['class' => 'btn-link']));
$navBar->addMenuItem(new ATag('#', 'Link'), false);
$navBar->addDropDownMenu( _('SubMenu'), ['index.php' => _('Main Page'), 'login.php' => _('Login Page')] );
$oPage->addItem($navBar);
$oPage->addItem(new DropdownButton('Dropdown button', 'link',
['index.php' => _('Main Page'), 'login.php' => _('Login Page')],
['class' => 'btn-link']));
$oPage->addItem(new H2Tag('Alerts'));
$oPage->addItem(new Alert('success',
[new StrongTag('Well done!'), 'You successfully read this important alert message.']));
$oPage->addItem(new Alert('info',
[new StrongTag('Heads up!'), 'This alert needs your attention, but it\'s not super important.']));
$oPage->addItem(new Alert('warning',
[new StrongTag('Warning!'), 'Better check yourself, you\'re not looking too good.']));
$oPage->addItem(new Alert('danger',
[new StrongTag('Oh snap!'), 'Change a few things up and try submitting again.']));
$oPage->addItem(new H2Tag('Badge'));
$types = ['default' => 'Default', 'primary' => 'Primary', 'success' => 'Success',
'info' => 'Info', 'warning' => 'Warning', 'danger' => 'Danger'];
$oPage->addItem(new H3Tag('Simple Badge'));
foreach ($types as $type => $tmsg) {
$oPage->addItem(new Badge($type, $tmsg));
}
$oPage->addItem(new H3Tag('Pill Badge'));
foreach ($types as $type => $tmsg) {
$oPage->addItem(new PillBadge($type, $tmsg));
}
$oPage->addItem(new H2Tag('Card: Panel, Well'));
$panel = new Panel( _('Panel Example'), null, _('Example panel body'), _('Example panel footer'));
$panel->addItem(new DivTag(_('Example Panel Row Added')));
$oPage->addItem($panel);
$oPage->draw();