Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a basic example of a search page
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bypass_cache: true | ||
title: Search Results | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | ||
"http://www.w3.org/TR/html4/strict.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | ||
<title>{{ page.title }}, {{ page.name }}'s Portfolio </title> | ||
<link rel="alternate" type="application/atom+xml" href="{{ page.root_path }}/?/feed/"> | ||
<link rel="stylesheet" href="{{ page.root_path }}/public/docs/css/screen.css" type="text/css" media="screen"> | ||
</head> | ||
<body> | ||
<div id="container" class="{{ page.id }}"> | ||
<h1 class="col three"> | ||
<a href="{{ page.root_path }}">{{ page.name }}</a> | ||
<strong>{{ page.profession }}</strong> | ||
</h1> | ||
<em class="col three">{{ page.email }}</em> | ||
<hr> | ||
{% include 'partials/navigation/navigation.html' %} | ||
<div id="content" class="col eight"> | ||
<p class="date col one">¶</p> | ||
<div class="description col six"> | ||
<h2 class="col six"><a href="{{ page.root_path }}">{{ page.title }}</a></h2> | ||
<form class="logo-bottom three" action="/search"> | ||
<input type="text" value="{{ page.query.q }}" name="q" id="search-field" autocomplete="off" spellcheck="false" /> | ||
</form> | ||
{% set results = search(page.query.q) %} | ||
{% for result in results %} | ||
<a href="{{ result.url }}"> | ||
<h2>{{ result.title }}</h2> | ||
<p>{{ result.search_match }}</p> | ||
</a> | ||
<hr> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
<hr> | ||
<p id="footer" class="col six">© Copyright {{ page.name }} {{ page.current_year }} <a class="atom-rss" href="{{ page.root_path }}/?/feed/">RSS</a><br> | ||
<em>Content managed by <a href="http://www.staceyapp.com">stacey</a></em></p> | ||
</div> | ||
<script src="{{ page.root_path }}/public/docs/js/jquery-1.3.2.js" type="text/javascript" charset="utf-8"></script> | ||
</body> | ||
</html> |