forked from zk/clojuredocs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clojure_core_shortdesc.html.erb
98 lines (91 loc) · 2.94 KB
/
clojure_core_shortdesc.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('.toc').makeTOCSideBar()
$("tr.var").mouseover(function() {
$(this).addClass("hover")
})
$("tr.var").mouseout(function() {
$(this).removeClass("hover")
})
})
</script>
<div class="container_16">
<div class="quick_ref">
<div class="grid_3">
<%= render :partial => 'lib_nav', :locals => {:lib => @library} %>
<div class="clear"></div>
<div class="toc">
<h2>Table of Contents</h2>
<div class="toc_controls">
<input type="checkbox" id="floating_toc" name="floating_toc" checked="checked" />
<label for="floating_toc">Float TOC</label>
</div>
<% @spheres.each do |s| %>
<div class="sphere">
<h3><a class="scroll" href="#<%= CGI::escape(s[:name].gsub(/\//, "-")) %>"><%= s[:name] %></a></h3>
<ul>
<% s[:categories].each do |c| %>
<li><a class="scroll" href="#<%= CGI::escape((s[:name] + c[:name]).gsub(/\//, "-")) %>"><%= c[:name] %></a></li>
<% end %>
</ul>
</div>
<% end %>
</div>
<div class="clear"></div>
</div>
<div class="grid_12">
<h2>Quick Ref for Clojure Core</h2>
<p>Adapted from Johannes Friestad's excellent <a href="http://faustus.webatu.com/clj-quick-ref.html">quick ref</a>.</p>
<% @spheres.each do |s| %>
<div class="sphere">
<div class="sphere_header">
<h3><a name="<%= CGI::escape(s[:name].gsub(/\//, "-")) %>"><%= s[:name] %></a></h3>
</div>
<% s[:categories].each do |c| %>
<div class="category">
<div class="category_header">
<h4><a name="<%= CGI::escape((s[:name] + c[:name]).gsub(/\//, "-")) %>"><%= c[:name] %></a></h4>
<div class="signpost">
<%= s[:name] %>
</div>
<div class="clear"></div>
</div>
<% c[:groups].each do |g| %>
<div class="group">
<div class="group_header">
<h5><%= g[:name] %></h5>
<div class="signpost">
<%= "#{s[:name]} > #{c[:name]}"%>
</div>
<div class="clear"></div>
</div>
<ul>
<% g[:symbols].each do |sym| %>
<li>
<table>
<tr class="var">
<td class="var">
<% if sym[:link] and sym[:link] != "" %>
<a href="/clojure_core/<%= sym[:ns]%>/<%= make_url_friendly(sym[:name])%>"><%= sym[:name]%></a>
<% else %>
<%= sym[:name] %>
<% end %>
</td>
<td class="shortdesc"><%= Function.find(:first, :conditions => {:id => sym[:id]}, :select => 'shortdoc').shortdoc rescue "" %></td>
<td class="examples_count"><%= Example.find(:all, :conditions => {:function_id => sym[:id]}).size %> ex.</td>
</table>
</li>
<% end %>
</ul>
</div>
<% end %>
</div>
<% end %>
</div>
<% end %>
</div>
<!-- <div class="grid_3">
<%= render :partial => '/lib_namespaces' %>
</div> -->
</div>
<div class="container_16">