plugin
upstream
Templates in the website are disabled now. Editing them will not have any effect on the live website.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
$def with (q, results, nums, timings, errortext=None) $ _ = i18n.get_namespace('/search') <style type="text/css"> <!-- h2.Match { font-size: 1.25em; font-weight: bold; color: #000; margin-bottom: 20px;} h5 { font-size: 13px; font-variant: small-caps; margin-top: 10px; margin-bottom: 5px;} .SearchBox { margin-top: 10px; margin-bottom: 30px;} .ErrorMsg { background-color: #fc0; padding: 5px; font-family: Verdana, Arial; font-size: 11px; } .FacetList { background-color: #f5f5f5; padding-top: 0px; padding-right: 20px; padding-bottom: 10px; padding-left: 10px; line-height: 18px; } .FacetResultCount {color: #666; font-family: Verdana, Arial; font-size: 9px;} .Switch {color: #666; font-family: Verdana, Arial; font-size: 11px; font-weight: normal;} .Chosen { font-size: 1.1em; } .Chosen a { color: #333; text-decoration: none; } .ClearX {font-family: Verdana, Arial; font-size: 12px; color: #f33; font-weight: bold; } .SRPCover { margin-top: 10px; margin-right: 0px; margin-bottom: 20px; margin-left: 40px; float:left; height: 255px; vertical-align: middle; } .SRPCover img { border-right: 1px solid #666; border-bottom: 1px solid #666; } .SRPCoverBlank { width: 170px; height: 255px; margin-top: 10px; margin-right: 0px; margin-bottom: 20px; margin-left: 40px; float:left; vertical-align: middle; text-align: center; float:left; background: transparent url("/static/images/blank.book.new.png") 0px 3px no-repeat;} .BookTitle { color: #f9f8d0; width: 180px; height: 250px; vertical-align: middle; display: table-cell; padding-left: 8px; } .Author { color: #fff; font-style: italic; font-size: 12px; line-height: 15px; padding-right: 4px; padding-left: 4px; } .ReadNow { font-variant: small-caps; color: #3333ff; text-decoration: underline; } .Pages {padding: 20px; font-family: Verdana, Arial; font-size: 11px; } .Pages .YouAreHere { border: 1px solid #ddd; padding: 5px; } .Pages .ChoosePage { border: 1px solid #ddd; padding: 5px; } .AddBook { font-size: 14px; color: #666; padding: 10px; text-align: center; font-style: italic; margin-top: 20px;} .SearchTime { margin-top: 20px; color: #666; font-family: Verdana, Arial; font-size: 9px; font-weight: normal; } --> </style> $add_stylesheet("/css/search.css?format=raw") $ total_nbr = nums.total_nbr $ offset = nums.offset $ rows = nums.rows $ npages = ((total_nbr + rows - 1) / rows) $ this_page = (offset / rows) + 1 $var title: Searching Available Full Text <!-- Timings: ($timings) --> <!-- <table><tr bgcolor=yellow><td>nbr: $total_nbr <br> offset: $offset <br> rows: $rows <br> this_page: $this_page </td></tr></table> --> <div id="header-fullpage"> <span id="title">Full Text Search Results</span> <form method="get" action="/fullsearch"> <div class="SearchBox"><input style="background-color: #f8f8f8; font-family: georgia; font-size: 18px; color: #6F320D; border: 1px solid #ccc; padding-left: 4px;" type="text" name="q" value="$q" size="40" /> <button class="go" type="submit">go</button> <span class="Switch"> <a href="/advanced">More search options</a></span> </div> </form> $if errortext: <div id="error">Error: $errortext</div> $if not errortext: <h2 class="Match">There are $total_nbr matching records. $if query_param('view')=='covers': <span class="Switch">Show: <a href="$changequery(view='list')">List</a> / <b>Covers</b></span> $else: <span class="Switch">Show: <b>List</b> / <a href="$changequery(view='covers')">Covers</a></span> </h2> </div> <!-- BEGIN SEARCH --> $if query_param('view')=='covers': $:macros.SearchResultsCovers(results, fulltext=True) <br clear="all"> $else: $:macros.SearchResults(results, fulltext=True) </div></div><br clear="all"> $if npages > 1: $:macros.SearchPagination(q, 1, npages, this_page, rows) |