Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

106 lines (85 sloc) 3.246 kb
<!DOCTYPE html>
<html lang="en">
<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}" />
<script id="tmplNoResults" type="text/x-jquery-tmpl">
<p>No results found!</p>
<script id="tmplNoSources" type="text/x-jquery-tmpl">
<p>Please choose at least one source!</p>
<script id="tmplEnterKeyword" type="text/x-jquery-tmpl">
<p>Enter a keyword!</p>
<script id="tmplSuggestion" type="text/x-jquery-tmpl">
<a href="#${suggestion}" title="${suggestion}">
{{html $item.highlight(suggestion) }}
<script id="tmplSuggestionLoading" type="text/x-jquery-tmpl">
<p><img src="images/spinner.gif" alt="Loading..." /></p>
<p>Loading suggestions</p>
<script id="tmplSuggestionError" type="text/x-jquery-tmpl">
<p>An error occurred trying to retrieve suggestions!</p>
<script id="tmplBreadcrumb" type="text/x-jquery-tmpl">
<li><a href="#${term}" title="${term}">${term}</a></li>
<script id="tmplSources" type="text/x-jquery-tmpl">
<label for="${name}">
<input type="checkbox" id="${name}" name="source" checked="checked" /> ${name}
<div id="container">
<p>This is a basic image search engine built in JavaScript inspired by Rebecca Murphey's <a href="">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="">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>
<ul id="breadcrumb"></ul>
<div id="results">
<div id="resultsHeader">
<h3><span>0</span> images found for the term <em></em></h3><hr />
<div id="target"></div>
<div id="suggestions">
<div id="footer">created by <a href="">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') + '';
s.parentNode.insertBefore(g, s);
})(document, 'script');
Jump to Line
Something went wrong with that request. Please try again.