rustdoc: html: use raw strings for great justice
This commit is contained in:
@@ -29,53 +29,53 @@ pub fn render<T: fmt::Show, S: fmt::Show>(
|
|||||||
-> fmt::Result
|
-> fmt::Result
|
||||||
{
|
{
|
||||||
write!(dst,
|
write!(dst,
|
||||||
"<!DOCTYPE html>
|
r##"<!DOCTYPE html>
|
||||||
<html lang=\"en\">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset=\"utf-8\" />
|
<meta charset="utf-8" />
|
||||||
<title>{title}</title>
|
<title>{title}</title>
|
||||||
|
|
||||||
<link href='http://fonts.googleapis.com/css?family=Oswald:700|Inconsolata:400,700'
|
<link href='http://fonts.googleapis.com/css?family=Oswald:700|Inconsolata:400,700'
|
||||||
rel='stylesheet' type='text/css'>
|
rel='stylesheet' type='text/css'>
|
||||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"{root_path}main.css\">
|
<link rel="stylesheet" type="text/css" href="{root_path}main.css">
|
||||||
|
|
||||||
{favicon, select, none{} other{<link rel=\"shortcut icon\" href=\"#\" />}}
|
{favicon, select, none{} other{<link rel="shortcut icon" href="\#" />}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!--[if lte IE 8]>
|
<!--[if lte IE 8]>
|
||||||
<div class=\"warning\">
|
<div class="warning">
|
||||||
This old browser is unsupported and will most likely display funky
|
This old browser is unsupported and will most likely display funky
|
||||||
things.
|
things.
|
||||||
</div>
|
</div>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<section class=\"sidebar\">
|
<section class="sidebar">
|
||||||
{logo, select, none{} other{
|
{logo, select, none{} other{
|
||||||
<a href='{root_path}{krate}/index.html'><img src='#' alt=''/></a>
|
<a href='{root_path}{krate}/index.html'><img src='\#' alt=''/></a>
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{sidebar}
|
{sidebar}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<nav class=\"sub\">
|
<nav class="sub">
|
||||||
<form class=\"search-form js-only\">
|
<form class="search-form js-only">
|
||||||
<button class=\"do-search\">Search</button>
|
<button class="do-search">Search</button>
|
||||||
<div class=\"search-container\">
|
<div class="search-container">
|
||||||
<input class=\"search-input\" name=\"search\"
|
<input class="search-input" name="search"
|
||||||
autocomplete=\"off\"
|
autocomplete="off"
|
||||||
placeholder=\"Search documentation...\"
|
placeholder="Search documentation..."
|
||||||
type=\"search\" />
|
type="search" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<section id='main' class=\"content {ty}\">{content}</section>
|
<section id='main' class="content {ty}">{content}</section>
|
||||||
<section id='search' class=\"content hidden\"></section>
|
<section id='search' class="content hidden"></section>
|
||||||
|
|
||||||
<section class=\"footer\"></section>
|
<section class="footer"></section>
|
||||||
|
|
||||||
<div id=\"help\" class=\"hidden\">
|
<div id="help" class="hidden">
|
||||||
<div class=\"shortcuts\">
|
<div class="shortcuts">
|
||||||
<h1>Keyboard shortcuts</h1>
|
<h1>Keyboard shortcuts</h1>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>?</dt>
|
<dt>?</dt>
|
||||||
@@ -86,11 +86,11 @@ pub fn render<T: fmt::Show, S: fmt::Show>(
|
|||||||
<dd>Move up in search results</dd>
|
<dd>Move up in search results</dd>
|
||||||
<dt>↓</dt>
|
<dt>↓</dt>
|
||||||
<dd>Move down in search results</dd>
|
<dd>Move down in search results</dd>
|
||||||
<dt>&\\#9166;</dt>
|
<dt>&\#9166;</dt>
|
||||||
<dd>Go to active search result</dd>
|
<dd>Go to active search result</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class=\"infos\">
|
<div class="infos">
|
||||||
<h1>Search tricks</h1>
|
<h1>Search tricks</h1>
|
||||||
<p>
|
<p>
|
||||||
Prefix searches with a type followed by a colon (e.g.
|
Prefix searches with a type followed by a colon (e.g.
|
||||||
@@ -106,15 +106,15 @@ pub fn render<T: fmt::Show, S: fmt::Show>(
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var rootPath = \"{root_path}\";
|
var rootPath = "{root_path}";
|
||||||
var currentCrate = \"{krate}\";
|
var currentCrate = "{krate}";
|
||||||
</script>
|
</script>
|
||||||
<script src=\"{root_path}jquery.js\"></script>
|
<script src="{root_path}jquery.js"></script>
|
||||||
<script src=\"{root_path}main.js\"></script>
|
<script src="{root_path}main.js"></script>
|
||||||
<script async src=\"{root_path}search-index.js\"></script>
|
<script async src="{root_path}search-index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
",
|
"##,
|
||||||
content = *t,
|
content = *t,
|
||||||
root_path = page.root_path,
|
root_path = page.root_path,
|
||||||
ty = page.ty,
|
ty = page.ty,
|
||||||
|
|||||||
Reference in New Issue
Block a user