profice a general content wrapper template.

This commit is contained in:
rabuzarus 2016-06-07 16:32:02 +02:00
parent 3a368214c0
commit 71b30e0651
4 changed files with 37 additions and 8 deletions

View file

@ -132,9 +132,6 @@ function search_content(&$a) {
nav_set_selected('search'); nav_set_selected('search');
$o = '<h3>' . t('Search') . '</h3>';
if(x($a->data,'search')) if(x($a->data,'search'))
$search = notags(trim($a->data['search'])); $search = notags(trim($a->data['search']));
else else
@ -146,8 +143,13 @@ function search_content(&$a) {
$search = ((x($_GET,'tag')) ? notags(trim(rawurldecode($_GET['tag']))) : ''); $search = ((x($_GET,'tag')) ? notags(trim(rawurldecode($_GET['tag']))) : '');
} }
// contruct a wrapper for the search header
$o .= search($search,'search-box','search',((local_user()) ? true : false), false); $o .= replace_macros(get_markup_template("content_wrapper.tpl"),array(
'name' => "search-header",
'$title' => t("Search"),
'$title_size' => 3,
'$content' => search($search,'search-box','search',((local_user()) ? true : false), false)
));
if(strpos($search,'#') === 0) { if(strpos($search,'#') === 0) {
$tag = true; $tag = true;
@ -160,7 +162,7 @@ function search_content(&$a) {
return dirfind_content($a); return dirfind_content($a);
} }
if(x($_GET,'search-option')) if(x($_GET,'search-option'))
switch($_GET['search-option']) { switch($_GET['search-option']) {
case 'fulltext': case 'fulltext':
break; break;

View file

@ -0,0 +1,12 @@
<div {{if $name}}id="{{$name}}-wrapper"{{/if}} class="general-content-wrapper">
{{* give different possibilities for the size of the heading *}}
{{if $title_size}}
<h{{$title_size}} {{if $name}}id="{{$name}}-heading"{{/if}}>{{$title}}</h{{$title_size}}>
{{else}}
{{include file="section_title.tpl"}}
{{/if}}
{{* output the content *}}
{{$content}}
</div>

View file

@ -1655,7 +1655,22 @@ ul.dropdown-menu li:hover {
color: $link_color; color: $link_color;
font-size: 20px; font-size: 20px;
} }
/* Section-Content-Wrapper */
#search-header-wrapper {
padding: 15px;
padding-bottom: 20px;
margin-bottom: 20px;
border: none;
/*background-color: #fff;*/
background-color: rgba(255,255,255,$contentbg_transp);
border-radius: 4px;
position: relative;
/*overflow: hidden;*/
color: #555;
box-shadow: 0 0 3px #dadada;
-webkit-box-shadow: 0 0 3px #dadada;
-moz-box-shadow: 0 0 3px #dadada;
}
/* PAGES */ /* PAGES */