From 71b30e06516b6d35817678ece1e289e02a7b7844 Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Tue, 7 Jun 2016 16:32:02 +0200
Subject: [PATCH] profice a general content wrapper template.
---
mod/search.php | 14 ++++++++------
view/templates/content_wrapper.tpl | 12 ++++++++++++
view/theme/frio/css/style.css | 17 ++++++++++++++++-
.../frio/templates/saved_searches_aside.tpl | 2 +-
4 files changed, 37 insertions(+), 8 deletions(-)
create mode 100644 view/templates/content_wrapper.tpl
diff --git a/mod/search.php b/mod/search.php
index 790f577ba..fd8a9eb64 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -132,9 +132,6 @@ function search_content(&$a) {
nav_set_selected('search');
-
- $o = '
' . t('Search') . '
';
-
if(x($a->data,'search'))
$search = notags(trim($a->data['search']));
else
@@ -146,8 +143,13 @@ function search_content(&$a) {
$search = ((x($_GET,'tag')) ? notags(trim(rawurldecode($_GET['tag']))) : '');
}
-
- $o .= search($search,'search-box','search',((local_user()) ? true : false), false);
+ // contruct a wrapper for the search header
+ $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) {
$tag = true;
@@ -160,7 +162,7 @@ function search_content(&$a) {
return dirfind_content($a);
}
- if(x($_GET,'search-option'))
+ if(x($_GET,'search-option'))
switch($_GET['search-option']) {
case 'fulltext':
break;
diff --git a/view/templates/content_wrapper.tpl b/view/templates/content_wrapper.tpl
new file mode 100644
index 000000000..b41871560
--- /dev/null
+++ b/view/templates/content_wrapper.tpl
@@ -0,0 +1,12 @@
+
+
+ {{* give different possibilities for the size of the heading *}}
+ {{if $title_size}}
+ {{$title}}
+ {{else}}
+ {{include file="section_title.tpl"}}
+ {{/if}}
+
+ {{* output the content *}}
+ {{$content}}
+
diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css
index e6b51be29..34b56efff 100644
--- a/view/theme/frio/css/style.css
+++ b/view/theme/frio/css/style.css
@@ -1655,7 +1655,22 @@ ul.dropdown-menu li:hover {
color: $link_color;
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 */
diff --git a/view/theme/frio/templates/saved_searches_aside.tpl b/view/theme/frio/templates/saved_searches_aside.tpl
index ed32c7975..da4cd1541 100644
--- a/view/theme/frio/templates/saved_searches_aside.tpl
+++ b/view/theme/frio/templates/saved_searches_aside.tpl
@@ -2,7 +2,7 @@
{{if $saved}}