Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

83 lines (80 sloc) 2.637 kB
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$("#main_search").autocomplete({
source: function(req, add) {
$.getJSON("/search_autocomplete", req, function(data) {
var out = []
$.each(data, function(i, v) {
var lbl = "<div class=\"ac_search_result\">"
lbl += "<span class='name'>" + v.name + "</span>"
lbl += "<span class='ns'>" + v.ns + "</span>"
lbl += "<br />"
lbl += "<span class='shortdoc'>" + v.shortdoc + "</span>"
lbl += "</div>"
out.push({label: lbl, value: v.name, href: v.href})
})
add(out)
})
},
focus: function(event, ui) {
return false
},
select: function(event, ui) {
window.location.href = ui.item.href
return false
},
dataType: "json"
})
})
</script>
<div class="header">
<div class="container_16">
<div class="header_content">
<div class="user_area">
<div class="grid_16">
<span class="main_nav">
<a href="http://api.clojuredocs.org">api</a>
&nbsp;
<a href="http://clojuredocs.wordpress.com">blog</a>
&nbsp;
<a href="http://github.com/zkim/clojuredocs">github</a>
</span>
&nbsp;
&nbsp;
<span class="user_area_content">
<% if current_user_session %>
<%= image_tag(grav_url_for(current_user.email, 16), :class => 'user_area_gravatar') %>
Logged in as <%= link_to current_user.login, :controller => 'user', :action => 'profile', :login => current_user.login %>
|
<a href="/logout">logout</a>
<% else %>
<a href="/login" id="login">login / sign up</a>
<% end%>
</span>
</div>
<div class="clear"></div>
</div>
<div class="grid_1">
<%= image_tag "cd_logo.png", :class => 'cd_logo', :width => 52, :height => 33 %>
</div>
<div class="grid_7">
<h1><a href="/">ClojureDocs</a><span class="version">(beta)</span></h1>
</div>
<div class="grid_8">
<div class="search">
<% form_tag '/search', :method => "GET" do %>
<%= image_submit_tag 'magnifying_glass_alt_24x24.png', :class => 'submit_image', :height => '20px', :width => '20px' %>
<input id="main_search" class="text_field" name="q" type="text" <%= (params[:q] ? "value=\"#{params[:q]}\"" : "")%> />
<% if params[:lib] %>
<input type="hidden" name="lib" value="<%= params[:lib] %>" />
<% end %>
<% end %>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</div>
<div class="header_filler"></div>
<div class="clear"></div>
Jump to Line
Something went wrong with that request. Please try again.