Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Xuhao/sdoc into xuhao
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed Mar 14, 2016
2 parents e5b47fa + 9c4d067 commit 8da51d6
Show file tree
Hide file tree
Showing 19 changed files with 320 additions and 316 deletions.
6 changes: 3 additions & 3 deletions lib/rdoc/generator/template/merge/index.rhtml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<title><%= @title %></title>
<title><%= @title %></title>
</head>
<frameset cols="300,*" frameborder="1" border="1" bordercolor="#999999" framespacing="1">
<frame src="panel/index.html" title="Search" name="panel" />
Expand Down
8 changes: 4 additions & 4 deletions lib/rdoc/generator/template/rails/_context.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@
<% end %>
<a href="<%= "#{rel_prefix}/#{context.path}##{method.aref}"%>" name="<%= method.aref %>" class="permalink">Link</a>
</div>

<% if method.comment %>
<div class="description">
<%= method.description.strip %>
</div>
<% end %>
<% unless method.aliases.empty? %>
<div class="aka">
Also aliased as: <%= method.aliases.map do |aka|
Expand All @@ -180,7 +180,7 @@
Alias for: <a href="<%= context.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
</div>
<% end %>
<% if method.token_stream %>
<% markup = method.sdoc_markup_code %>
<div class="sourcecode">
Expand All @@ -197,7 +197,7 @@
end
%>
<p class="source-link">
Source:
Source:
<a href="javascript:toggleSource('<%= method.aref %>_source')" id="l_<%= method.aref %>_source">show</a>
<% if github %>
| <a href="<%= "#{github}#L#{line}" %>" target="_blank" class="github_url">on GitHub</a>
Expand Down
10 changes: 5 additions & 5 deletions lib/rdoc/generator/template/rails/class.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
<%= include_template '_head.rhtml', {:rel_prefix => rel_prefix} %>
</head>

<body>
<body>
<div class="banner">
<% if ENV['HORO_PROJECT_NAME'] %>
<span><%= ERB::Util.html_escape(ENV['HORO_PROJECT_NAME']) %> <%= ERB::Util.html_escape(ENV['HORO_PROJECT_VERSION']) %></span><br />
<% end %>
<h1>
<span class="type"><%= klass.module? ? 'Module' : 'Class' %></span>
<%= h klass.full_name %>
<span class="type"><%= klass.module? ? 'Module' : 'Class' %></span>
<%= h klass.full_name %>
<% if klass.type == 'class' %>
<span class="parent">&lt;
<span class="parent">&lt;
<% if String === klass.superclass %>
<%= klass.superclass %>
<% elsif !klass.superclass.nil? %>
Expand All @@ -36,4 +36,4 @@
<%= include_template '_context.rhtml', {:context => klass, :rel_prefix => rel_prefix} %>
</div>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions lib/rdoc/generator/template/rails/file.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<%= include_template '_head.rhtml', {:rel_prefix => rel_prefix} %>
</head>

<body>
<body>
<div class="banner">
<% if ENV['HORO_PROJECT_NAME'] %>
<span><%= ERB::Util.html_escape(ENV['HORO_PROJECT_NAME']) %> <%= ERB::Util.html_escape(ENV['HORO_PROJECT_VERSION']) %></span><br />
Expand All @@ -34,4 +34,4 @@
<%= include_template '_context.rhtml', {:context => file, :rel_prefix => rel_prefix} %>
</div>
</body>
</html>
</html>
11 changes: 5 additions & 6 deletions lib/rdoc/generator/template/rails/resources/js/main.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
function toggleSource(id)
{
function toggleSource(id) {
var src = $('#' + id).toggle();
var isVisible = src.is(':visible');
$('#l_' + id).html(isVisible ? 'hide' : 'show');
}

window.highlight = function(url) {
var hash = url.match(/#([^#]+)$/)
if(hash) {
$('a[name=' + hash[1] + ']').parent().effect('highlight', {}, 'slow')
var hash = url.match(/#([^#]+)$/);
if (hash) {
$('a[name=' + hash[1] + ']').parent().effect('highlight', {}, 'slow');
}
}
};

$(function() {
highlight('#' + location.hash);
Expand Down
Loading

0 comments on commit 8da51d6

Please sign in to comment.