Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b2691a0196
Fetching contributors…

Cannot retrieve contributors at this time

106 lines (85 sloc) 3.246 kb
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="author" content="Eric Hynds" />
<title>YQL Image Search</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!-- templates -->
<script id="tmplResults" type="text/x-jquery-tmpl">
<a href="${url}" title="${title}">
<img src="${thumbnail_url}" alt="${title}" />
</a>
</script>
<script id="tmplNoResults" type="text/x-jquery-tmpl">
<p>No results found!</p>
</script>
<script id="tmplNoSources" type="text/x-jquery-tmpl">
<p>Please choose at least one source!</p>
</script>
<script id="tmplEnterKeyword" type="text/x-jquery-tmpl">
<p>Enter a keyword!</p>
</script>
<script id="tmplSuggestion" type="text/x-jquery-tmpl">
<li>
<a href="#${suggestion}" title="${suggestion}">
{{html $item.highlight(suggestion) }}
</a>
</li>
</script>
<script id="tmplSuggestionLoading" type="text/x-jquery-tmpl">
<p><img src="images/spinner.gif" alt="Loading..." /></p>
<p>Loading suggestions</p>
</script>
<script id="tmplSuggestionError" type="text/x-jquery-tmpl">
<p>An error occurred trying to retrieve suggestions!</p>
</script>
<script id="tmplBreadcrumb" type="text/x-jquery-tmpl">
<li><a href="#${term}" title="${term}">${term}</a></li>
</script>
<script id="tmplSources" type="text/x-jquery-tmpl">
<label for="${name}">
<input type="checkbox" id="${name}" name="source" checked="checked" /> ${name}
</label>
</script>
</head>
<body>
<div id="container">
<h1>Searchr</h1>
<p>This is a basic image search engine built in JavaScript inspired by Rebecca Murphey's <a href="https://github.com/rmurphey/srchr">Srchr</a> exercise. I created this to become more familiar with YQL, pub/sub &amp; module patterns, hash change events, jQuery's templating plugin, and RequireJS. View the source code on <a href="https://github.com/ehynds/searchr">GitHub</a>.</p>
<form action="#" method="post">
<label for="keyword">Keyword:</label>
<input type="search" name="keyword" id="keyword" placeholder="Begin typing..." autocomplete="off" />
<input type="button" id="reset" value="Clear" />
<img id="spinner" src="images/spinner.gif" alt="Loading..." />
<div id="sources"></div>
</form>
<ul id="breadcrumb"></ul>
<div id="results">
<div id="resultsHeader">
<h3><span>0</span> images found for the term <em></em></h3><hr />
</div>
<div id="target"></div>
<div id="suggestions">
<h2>Suggestions</h2>
<ul></ul>
</div>
</div>
</div>
<div id="footer">created by <a href="http://erichynds.com">eric hynds</a>, 2010</div>
<div id="modal"></div>
<img id="modal-spinner" src="images/spinner-bar.gif" alt="Loading..." />
<script type="text/javascript" src="scripts/require.js" data-main="boot"></script>
<script type="text/javascript">
var _gaq = [['_setAccount', 'UA-17093650-2'], ['_trackPageview']];
(function(d, t){
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.