Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/_header.xnode
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
?><a href="#{link.href}" class="#{active ? 'active' : nil}" aria-current="#{active ? 'page' : 'false'}">#{link.title}</a><?r
end ?>
<?r if github_url = base.source_code_uri ?>
<a href="#{github_url}" class="github" target="_blank" rel="noopener noreferrer" aria-label="View source on GitHub">GitHub <span aria-hidden="true">↗</span></a>
<a href="#{github_url}" class="github" target="_blank" rel="noopener noreferrer" aria-label="View source on GitHub">GitHub</a>
<?r end ?>
</div>
<div class="header-actions">
Expand Down
3 changes: 2 additions & 1 deletion pages/reference/_declaration.xnode
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
base = self[:base]
symbol = self[:symbol]
link = self[:link]
inheritance = self[:inheritance] != false

if symbol.respond_to?(:super_class)
if inheritance && symbol.respond_to?(:super_class)
super_class = symbol.super_class
end

Expand Down
4 changes: 2 additions & 2 deletions pages/reference/show.xnode
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
if nested.any?
?>
<section>
<h2>Classes and Modules</h2>
<h2>Nested Classes and Modules</h2>

<dl class="nested-definitions">
<?r nested.each do |symbol|
Expand All @@ -40,7 +40,7 @@
end
?>
<div>
<dt>#{partial 'content:declaration', symbol: symbol, link: true}</dt>
<dt>#{partial 'content:declaration', symbol: symbol, link: true, inheritance: false}</dt>
<dd><?r unless description&.empty? ?>#{base.format(description, symbol)}<?r end ?></dd>
</div>
<?r end ?>
Expand Down
4 changes: 0 additions & 4 deletions public/_static/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ header .sections .github {
opacity: 0.7;
}

header .sections .github span {
font-size: 0.85em;
}

header .sections .github:hover {
opacity: 1;
}
Expand Down
10 changes: 8 additions & 2 deletions test/utopia/project/serve.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@

expect(body).to be(:include?, "Project")
expect(body).to be(:include?, '<a href="/reference/index" class="" aria-current="false">Reference</a>')
expect(body).to be(:include?, 'aria-label="View source on GitHub">GitHub</a>')
expect(body).not.to be(:include?, "↗")
end

it "generates URL-like import map values" do
Expand Down Expand Up @@ -92,9 +94,13 @@
it "summarizes nested definitions" do
body = client.get("/reference/Utopia/Project/index").read

expect(body).to be(:include?, "Classes and Modules")
expect(body).to be(:include?, "Nested Classes and Modules")
expect(body).to be(:include?, '<dl class="nested-definitions">')
expect(body).to be(:include?, '<a href="/reference/Utopia/Project/Document/index">class Document</a>')

nested_definitions = body[/<dl class="nested-definitions">.*?<\/dl>/m]
expect(nested_definitions).to be(:include?, '<a href="/reference/Utopia/Project/Document/index">class Document</a>')
expect(nested_definitions).to be(:include?, '<a href="/reference/Utopia/Project/ReleasesDocument/index">class ReleasesDocument</a>')
expect(nested_definitions).not.to be(:include?, " &lt; ")
expect(body).to be(:include?, "Represents a Markdown document with optional source code cross-references.")
end
end
Loading