From: Christian Weiske Date: Wed, 10 Feb 2016 14:14:34 +0000 (+0100) Subject: some styling, noindex for search result pages X-Git-Tag: v0.1.0~9 X-Git-Url: https://git.cweiske.de/phinde.git/commitdiff_plain/ba93b6ec0f176261ba0481f95c03f359068fa08e?hp=cd02bac646f42a0cb402ff2dc8240aa01f1f0fb8 some styling, noindex for search result pages --- diff --git a/data/templates/base.htm b/data/templates/base.htm index 72a34c1..f54cd0c 100644 --- a/data/templates/base.htm +++ b/data/templates/base.htm @@ -3,7 +3,7 @@ - {% block title %}{% endblock %} - {{title}} + {% block title %}{% endblock %}{{apptitle}} diff --git a/data/templates/search.htm b/data/templates/search.htm index d703784..c7b1bb7 100644 --- a/data/templates/search.htm +++ b/data/templates/search.htm @@ -1,6 +1,16 @@ {% extends "base.htm" %} -{%block title %}"{{query}}" search results{% endblock %} +{% block meta %} + {% if query %} + + {% endif %} +{% endblock %} + +{%block title %} + {% if query %} + "{{query}}" search results - + {% endif %} +{% endblock %} {% block maincontent %}
+ {% if query %}
{% include 'search/list.htm' %}
{% include 'search/sidebar.htm' %}
+ {% else %} +
+
+
+

Hi!

+

+ Type something in the text box above to search ⬆ +

+
+
+ {% endif %}
{% endblock %} diff --git a/data/templates/search/list.htm b/data/templates/search/list.htm index 069dcf3..c034dc2 100644 --- a/data/templates/search/list.htm +++ b/data/templates/search/list.htm @@ -1,5 +1,5 @@ {% if hitcount == 0 %} -

+

No results for "{{cleanQuery}}" {% if site %} @@ -7,7 +7,7 @@    |    Show all results {% endif %} -

+
{% else %}

{{hitcount}} diff --git a/www/www-header.php b/www/www-header.php index 2ec8c2f..da0d74c 100644 --- a/www/www-header.php +++ b/www/www-header.php @@ -27,6 +27,7 @@ function render($tplname, $vars = array(), $return = false) //$vars['htmlhelper'] = new HtmlHelper(); } $vars['apptitle'] = 'cweiske.de search'; + $vars['baseurl'] = '/'; $template = $GLOBALS['twig']->loadTemplate($tplname . '.htm'); if ($return) {