Skip to content

Commit 8c0f59c

Browse files
committed
Update templates to use HTML5
1 parent 1e6d517 commit 8c0f59c

13 files changed

Lines changed: 26 additions & 29 deletions

File tree

docs/templates/default/yard_tags/html/setup.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ def tag_signature(tag)
2222
else
2323
"description"
2424
end
25-
signature + h(extra).gsub(/\n/, "<br/>&nbsp;&nbsp;&nbsp;")
25+
signature + h(extra).gsub(/\n/, "<br>&nbsp;&nbsp;&nbsp;")
2626
end

lib/yard/server/templates/default/layout/html/breadcrumb.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<form class="search" method="get" action="<%= abs_url base_path(router.search_prefix) %>">
2-
<input name="q" type="search" placeholder="Search" id="search_box" size="30" value="<%= h @query %>" />
2+
<input name="q" type="search" placeholder="Search" id="search_box" size="30" value="<%= h @query %>">
33
</form>
44
<script type="text/javascript" charset="utf-8">
55
$(function() {

lib/yard/server/templates/doc_server/library_list/html/headers.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
1+
<meta charset="UTF-8">
22
<title>YARD Documentation Server <%= YARD::VERSION %> - Library Listing</title>
3-
<link rel="stylesheet" href="<%= abs_url('css', 'style.css') %>?<%= mtime('css/style.css') %>" type="text/css" media="screen" charset="utf-8" />
4-
<link rel="stylesheet" href="<%= abs_url('css', 'custom.css') %>?<%= mtime('css/custom.css') %>" type="text/css" media="screen" charset="utf-8" />
3+
<link rel="stylesheet" href="<%= abs_url('css', 'style.css') %>?<%= mtime('css/style.css') %>" type="text/css" media="screen" charset="utf-8">
4+
<link rel="stylesheet" href="<%= abs_url('css', 'custom.css') %>?<%= mtime('css/custom.css') %>" type="text/css" media="screen" charset="utf-8">
55
<style type="text/css" media="screen">
66
ul { list-style: circle inside none; padding: 0; }
77
li { font-size: 1.2em; line-height: 1.4em; padding: 3px 5px; }

lib/yard/server/templates/doc_server/library_list/html/library_list.erb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2-
"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3-
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1+
<!DOCTYPE html>
2+
<html lang="en">
43
<head>
54
<%= erb(:headers) %>
65
</head>

lib/yard/server/templates/doc_server/processing/html/processing.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<link rel="stylesheet" href="<%= abs_url('css', 'style.css') %>?<%= mtime('css/style.css') %>" type="text/css" media="screen" charset="utf-8" />
6-
<link rel="stylesheet" href="<%= abs_url('css', 'custom.css') %>?<%= mtime('css/custom.css') %>" type="text/css" media="screen" charset="utf-8" />
5+
<link rel="stylesheet" href="<%= abs_url('css', 'style.css') %>?<%= mtime('css/style.css') %>" type="text/css" media="screen" charset="utf-8">
6+
<link rel="stylesheet" href="<%= abs_url('css', 'custom.css') %>?<%= mtime('css/custom.css') %>" type="text/css" media="screen" charset="utf-8">
77
<script type="text/javascript" charset="utf-8" src="<%= abs_url('js', 'jquery.js') %>?<%= mtime('js/jquery.js') %>"></script>
88
<script type="text/javascript" charset="utf-8">
99
function checkPage(process) {
@@ -46,7 +46,7 @@
4646
<strong><%= @library.name %></strong> <% if @library.version %>(<%= @library.version %>)<% end %> is being processed.
4747
You'll be redirected when the pages are built, it shouldn't take much longer.
4848
</p>
49-
<img src="<%= abs_url('images', 'processing.gif') %>?<%= mtime('images/processing.gif') %>" align="center" />
49+
<img src="<%= abs_url('images', 'processing.gif') %>?<%= mtime('images/processing.gif') %>" align="center">
5050
</div>
5151
</body>
5252
</html>

lib/yard/templates/helpers/html_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def html_markup_pre(text)
156156
# @return [String] the output HTML
157157
# @since 0.6.0
158158
def html_markup_text(text)
159-
h(text).gsub(/\r?\n/, '<br/>')
159+
h(text).gsub(/\r?\n/, '<br>')
160160
end
161161

162162
# @return [String] the same text with no markup

spec/templates/helpers/html_helper_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def options
118118
end
119119

120120
it "returns regular text with :text markup" do
121-
expect(htmlify("fo\no\n\nbar<>", :text)).to eq "fo<br/>o<br/><br/>bar&lt;&gt;"
121+
expect(htmlify("fo\no\n\nbar<>", :text)).to eq "fo<br>o<br><br>bar&lt;&gt;"
122122
end
123123

124124
it "returns unmodified text with :none markup" do

templates/default/fulldoc/html/full_list.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
<html <%= "lang=\"#{html_lang}\"" unless html_lang.nil? %>>
33
<head>
44
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5-
<meta charset="<%= charset %>" />
5+
<meta charset="<%= charset %>">
66
<% stylesheets_full_list.each do |stylesheet| %>
7-
<link rel="stylesheet" href="<%= mtime_url(stylesheet) %>" type="text/css" media="screen" />
7+
<link rel="stylesheet" href="<%= mtime_url(stylesheet) %>" type="text/css" media="screen">
88
<% end %>
99

1010
<% javascripts_full_list.each do |javascript| %>
1111
<script type="text/javascript" charset="utf-8" src="<%= mtime_url(javascript) %>"></script>
1212
<% end %>
1313

1414
<title><%= @list_title %></title>
15-
<base id="base_target" target="_parent" />
15+
<base id="base_target" target="_parent">
1616
</head>
1717
<body>
1818
<div id="content">
@@ -28,7 +28,7 @@
2828

2929
<div id="search">
3030
<label for="search-class">Search:</label>
31-
<input id="search-class" type="text" />
31+
<input id="search-class" type="text">
3232
</div>
3333
</div>
3434

templates/default/layout/html/headers.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<% end %>
88
</title>
99
<% stylesheets.each do |stylesheet| %>
10-
<link rel="stylesheet" href="<%= mtime_url(stylesheet) %>" type="text/css" />
10+
<link rel="stylesheet" href="<%= mtime_url(stylesheet) %>" type="text/css">
1111
<% end %>
1212
<%= erb :script_setup %>
1313
<% javascripts.each do |javascript| %>

templates/default/method/html/header.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<dl>
44
<dt class="">Defined in:</dt>
55
<dd class="">
6-
<%= object.file %><% if object.files.size > 1 %><span class="defines">,<br />
7-
<%= object.files[1..-1].map {|f| f.first }.join(",<br /> ") %></div>
6+
<%= object.file %><% if object.files.size > 1 %><span class="defines">,<br>
7+
<%= object.files[1..-1].map {|f| f.first }.join(",<br> ") %></div>
88
<% end %>
99
</dd>
1010
</dl>

0 commit comments

Comments
 (0)