-
Notifications
You must be signed in to change notification settings - Fork 42
/
layout.erb
188 lines (174 loc) · 7.43 KB
/
layout.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta name="Content-Type" content="text/html; charset=UTF-8" />
<title><%= options.name %> - Library Listing</title>
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="/css/custom.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="/css/projects.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8" src="/js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/project_checkout.js"></script>
<script type="text/javascript">
function framesLinks() {
$('.framelink').toggle(function() {
$(this).text('links with frames');
$(this).parents('h2').nextAll('.libraries').first().find('li a').each(function() {
$(this).attr('href', $(this).attr('href').replace(/\/frames$/, ''));
});
}, function() {
$(this).text('links without frames');
$(this).parents('h2').nextAll('.libraries').first().find('li a').each(function() {
$(this).attr('href', $(this).attr('href') + '/frames');
});
})
}
function searchClick() {
searchPrompt = $('#docSearch').val();
$('#docSearch').focus(function() {
if ($(this).val().match(/^Search/)) {
$(this).val('');
}
});
$('#docSearch').blur(function() {
if ($(this).val() == '') {
$(this).val(searchPrompt);
}
});
}
function aboutLink() {
$('#about').click(function() {
if ($('#info').is(':hidden')) { $('#checkout').hide(); $('#tender_window').hide(); $('#info').fadeIn('fast'); }
else $('#info').fadeOut('fast');
return false;
});
}
function checkoutLink() {
$('#new_checkout').click(function() {
if ($('#checkout').is(':hidden')) { $('#info').hide(); $('#tender_window').hide(); $('#checkout').fadeIn('fast'); }
else $('#checkout').fadeOut('fast');
return false;
});
}
function helpLink() {
$('#help').click(function() {
if ($('#tender_window').is(':visible')) {
$('#tender_window').hide();
} else {
$('#help_tender').click();
$('#info').hide();
$('#checkout').hide();
}
});
}
function reloadProject() {
$('.libraries .project_reload').click(function() {
var proj = $(this).parent().find('a:first-child').text();
$('#url').val("git://github.com/" + proj);
$('#commit').val('');
$('#checkout_form').submit();
$(this).find('img').attr('src', '/images/loading.gif');
});
}
function saveIndex(url) {
var date = new Date();
date.setDate(date.getDate() + (url == '' ? -999 : 99999));
document.cookie = "defaultIndex=" + escape(url) + ";expires=" + date.toUTCString();
}
$(framesLinks);
$(searchClick);
$(aboutLink);
$(checkoutLink);
$(helpLink);
$(reloadProject);
</script>
<style type="text/css" media="screen">
</style>
</head>
<body>
<a id="learn_yard" href="http://yardoc.org" title="Learn More About YARD"><img src="/images/learn.png" /></a>
<noscript>
<style type="text/css" media="screen">
body { margin: 0; padding: 0;}
#logo, #content { padding: 0 20px; }
#notice { margin-left: 20px; }
#noscript { background: #111; color: #fff; padding: 10px 20px; }
#top_nav { top: 48px; }
</style>
<div id="noscript"><strong>It seems you've disabled Javascript.</strong>
That's okay, but you might run into some problems. We try to make things work without script support
as much as possible, but sometimes it needs to be used. We apologize for any inconvenience and hope you understand.</div>
</noscript>
<div id="logo">
<h1><a href="/"><%= options.name %></a> <small>YARD Documentation Server</small></h1>
</div>
<ul id="top_nav">
<li><a id="new_checkout" href="#">Add Project</a></li>
<li><a id="about" href="#">About</a></li>
<% if defined? options.tender %><li><a id="help" href="#">Help</a></li><% end %>
</ul>
<a id="help_tender" href="#" style="display:none;"/>
<div class="clear"></div>
<div id="info">
<p>
<strong><%= options.name %></strong> is your source for open source Ruby library documentation,
generating fresh docs for Gems and popular Git repositories.
</p>
<p>
This site uses <a href="http://yardoc.org">YARD</a> to generate docs on the fly.
To make your docs look better, you can check out some of YARD's
<a href="/gems/yard/frames/file/docs/WhatsNew.md">killer features</a>.
</p>
<p>
<strong>We have DISQUS integration!</strong> Click the <em>permalink</em>
(<a href="/gems/yard/frames/YARD/Templates/Engine.render">like this one</a>)
on a method to see user comments on a method page.
</p>
<p>
Looking for a <a href="http://github.com">GitHub</a>
<a href="http://help.github.com/post-receive-hooks/">post-receive hook</a>?
Use <tt><%= options.url %>/checkout</tt>.
</p>
<p>
<small>
<%= options.name %> was made possible by <strong>Loren Segal</strong> and <strong>Nick Plante</strong>, with help from a <a href="http://github.com/lsegal/rubydoc.info">community of friendly contributors</a>.
</small>
</p>
</div>
<%= yield %>
<div id="footer">
<a href="http://github.com/lsegal/rubydoc.info"><%= options.name %></a> is powered by <a href="http://yardoc.org/">yard</a> <%= YARD::VERSION %> (ruby-<%= RUBY_VERSION %>)
<% if defined? options.sponsor %>
<div class="sponsor">
<a href="http://<%= options.sponsor %>"><img src="/images/sponsor/<%= options.sponsor %>.png" alt="sponsored by <%= options.sponsor %>"/></a>
</div>
<% end %>
</div>
<% if defined? options.tender %>
<script type="text/javascript" charset="utf-8">
Tender = {
hideToggle: true,
widgetToggles: [document.getElementById('help_tender')]
}
</script>
<script src="https://<%= options.tender %>.tenderapp.com/tender_widget.js" type="text/javascript"></script>
<% end %>
</body>
<% if defined? options.clicky %>
<script src="http://static.getclicky.com/js" type="text/javascript"></script>
<script type="text/javascript">clicky.init(<%= options.clicky %>);</script>
<noscript><p><img alt="Clicky" width="1" height="1" src="http://static.getclicky.com/<%= options.clicky %>ns.gif" /></p></noscript>
<% end %>
<% if defined? options.google_analytics %>
<script type='text/javascript'>
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type='text/javascript'>
try {
var pageTracker = _gat._getTracker("<%= options.google_analytics %>");
pageTracker._trackPageview();
} catch(err) {}
</script>
<% end %>
</html>