-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.php
78 lines (57 loc) · 1.43 KB
/
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
<?php
if(!defined('e107_INIT'))
{
exit();
}
class theme implements e_theme_render
{
function __construct()
{
define("CORE_CSS", false);
e107::css('url', 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap');
e107::css('theme', 'assets/css/mdb.min.css');
//e107::css('theme', 'assets/css/style.css');
e107::js('theme', 'assets/js/mdb.min.js', 'jquery');
}
function tablestyle($caption, $text, $mode='', $options = array())
{
$style = varset($options['setStyle'], 'default');
// default style
// only if this always work, play with different styles
switch($style)
{
case "footer-small":
echo $text;
break;
case "footer":
if(!empty($caption))
{
echo '<h5 class="pl-3 text-uppercase font-weight-bold">' . $caption . '</h5>';
echo '<hr class="ml-3 white mb-3 mb-2 mt-0 d-inline-block" style="width: 60px;">';
}
echo $text;
break;
case "main": //for style with name main, mainly for frontpage
if(!empty($caption))
{
echo '<div class="my-4">' . $caption . '</div>';
}
echo $text;
break;
case "default": //for style with name default
if(!empty($caption))
{
echo '<div class="my-4">' . $caption . '</div>';
}
echo $text;
break;
default: //if there is no style
if(!empty($caption))
{
echo '<div class="my-4">' . $caption . '</div>';
}
echo $text;
}
return;
}
}