<!doctype html>
<html>
    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>$model.weblog.name: Search Results for '$model.term'</title>
    #includeTemplate($model.weblog "standard_head")
    #if ($model.hits > 0)
    <style>
    span.searchword { background-color:yellow; }
    </style>
    <script>
    //<![CDATA[
        searchhi_config = {ignore_site : '$url.absoluteSite'};
    //]]>
    </script>
    <script type="application/x-javascript" src="$url.page('searchhi.js')"></script>
    <script>
    //<![CDATA[
    function loadSearchHighlight() {
        searchhi.highlightWord(document.getElementById("search_results"), '$model.term');
    }
    //]]>
    </script>
    #end
    <link rel="stylesheet" href='$url.page("custom.css")' />
</head>
<body onload="loadSearchHighlight()">

<!-- *************************************************** -->
<!-- HEADER -->
<!-- *************************************************** -->
<div id="header_content">
#includeTemplate($model.weblog "standard_header")
</div>


<!-- *************************************************** -->
<!-- BODY -->
<!-- *************************************************** -->
<div class="yui3-g">


<!-- *************************************************** -->
<!-- BODY - MAIN -->
<!-- *************************************************** -->
<div class="yui3-u-2-3">
<div id="main_content">

<h2>Search Results for '$model.term'</h2>
        $text.get( "macro.weblog.searchhits", [$model.term, $model.hits])
        <br />
        <br />
        <p>You can refine your search and/or search within one weblog category</p>
        <form method="get" action="$url.search">
            <input type="text" id="q" name="q" size="10"
                maxlength="255" value="$model.term"
                style="padding-left: 1px" />
            #set( $cats = $model.weblog.getWeblogCategories() )
            #if(!$site && $cats && $cats.size() > 1)
              <select name="cat">
                <option value="">$text.get( "macro.searchresults.incategory" )</option>
                #foreach( $cat in $cats )
                  <option #if($cat.name == $model.weblogCategory.name)selected="selected"#end>$cat.name</option>
                #end
             </select>
            #end
           <input type="submit" value="$text.get( "macro.weblog.searchbutton" )" />
        </form>
        $text.get( "macro.weblog.searchgoogle", [$model.term, $url.absoluteSite, $url.site, ${model.weblog.handle}] )

#if ($model.hits > 0)
   <div id="search_results">
       #showNextPrevSearchControl($pager)
       #set($pager = $model.getWeblogEntriesPager())
       #showWeblogEntriesPager($pager)
       <div id="nextprev">
           #showNextPrevEntriesControl($pager)
       </div>
   </div>
#else
   <br />
   <br />
   <br />
   <h3>Sorry, your search returned no results</h3>
   <br />
   <br />
   <br />
#end

</div>
</div>

<!-- *************************************************** -->
<!-- BODY - SIDEBAR -->
<!-- *************************************************** -->
<div class="yui3-u-1-3">
<div id="sidebar_content">

    <h3>Welcome</h3>

    <p class="details">
    You're viewing search results for '<b>$model.term</b>' in the weblog <b>$model.weblog.name</b>.</p>

    <p class="details">
    From here you can search again using the form on the left or
    <a href="$url.home">visit the main page</a> of the weblog.</p>

</div> <!-- close sidebar_content -->
</div> <!-- close yui3-u-1-3 -->
</div> <!-- close yui3-g -->

<!-- *************************************************** -->
<!-- FOOTER -->
<!-- *************************************************** -->
<div id="footer_content">
#includeTemplate($model.weblog "standard_footer")
</div>

</body>
</html>

