$def with (query, web_results, code_projects, code_files, books)
$var breadcrumbs = ("search", "Search")
$var title: Results for
Web
$if web_results:
$else:
0 results
Code
$if code_projects.most_common()[0][0]:
$for project, file_count in code_projects.most_common():
- $project
$ files = code_files[project]
\
$for code_file in sorted(files)[:3]:
$code_file\
$if not loop.last:
, \
$if len(files) > 3:
and $(file_count - 3) more
$else:
0 results
Books
found $books.pop("found") document out of $books.pop("out_of"),
search took $books.pop("search_time_ms")ms
$for book in books.pop("hits"):
$book.pop("document")
$book.pop("highlights")
$pformat(book)
$# XXX $pformat(books)