diff options
author | Michael Weimann <mail@michael-weimann.eu> | 2019-12-14 10:35:42 +0100 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2019-12-19 19:33:52 +0100 |
commit | ea034ecec665aff04fd74c81e11c34000a9b9492 (patch) | |
tree | 9484cab331663e5eab9de0559cf77bdcf0145b22 /includes/sys_template.php | |
parent | 3f135497711ca316a6f02d1f19aa2211ace9691d (diff) |
Add the container class to some views
Diffstat (limited to 'includes/sys_template.php')
-rw-r--r-- | includes/sys_template.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/sys_template.php b/includes/sys_template.php index cf4c64aa..33044fad 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -251,11 +251,17 @@ function page($elements) * * @param string $title * @param string[] $elements + * @param bool $container * @return string */ -function page_with_title($title, $elements) +function page_with_title($title, $elements, bool $container = false) { - return '<div class="col-md-12"><h1>' . $title . '</h1>' . join($elements) . '</div>'; + if ($container) { + $html = '<div class="container">'; + } else { + $html = '<div class="col-md-12">'; + } + return $html . '<h1>' . $title . '</h1>' . join($elements) . '</div>'; } /** |