Skip to content
Closed
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
9 changes: 6 additions & 3 deletions src/librustdoc/html/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ pub fn render<T: fmt::Show, S: fmt::Show>(
<html lang=\"en\">
<head>
<meta charset=\"utf-8\" />
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />
<meta name=\"description\" content=\"The {krate} library documentation.\">

<title>{title}</title>

<link href='http://fonts.googleapis.com/css?family=Oswald:700|Inconsolata:400,700'
<link href='http://fonts.googleapis.com/css?family=Inconsolata:400,700'
rel='stylesheet' type='text/css'>
<link rel=\"stylesheet\" type=\"text/css\" href=\"{root_path}{krate}/main.css\">

Expand All @@ -51,20 +54,20 @@ pub fn render<T: fmt::Show, S: fmt::Show>(

<section class=\"sidebar\">
{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='' width='100' /></a>
}}

{sidebar}
</section>

<nav class=\"sub\">
<form class=\"search-form js-only\">
<button class=\"do-search\">Search</button>
<div class=\"search-container\">
<input class=\"search-input\" name=\"search\"
autocomplete=\"off\"
placeholder=\"Search documentation...\"
type=\"search\" />
<button class=\"search\">Search</button>
</div>
</form>
</nav>
Expand Down
7 changes: 4 additions & 3 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,9 @@ impl<'a> fmt::Show for Item<'a> {
None => {}
}

// Write the breadcrumb trail header for the top
try!(write!(fmt.buf, "<h1 class='fqn'>"));

if self.cx.include_sources {
let mut path = ~[];
clean_srcpath(self.item.source.filename.as_bytes(), |component| {
Expand All @@ -898,15 +901,13 @@ impl<'a> fmt::Show for Item<'a> {
try!(write!(fmt.buf,
"<a class='source'
href='{root}src/{krate}/{path}.html\\#{href}'>\
[src]</a>",
view source</a>",
root = self.cx.root_path,
krate = self.cx.layout.krate,
path = path.connect("/"),
href = href));
}

// Write the breadcrumb trail header for the top
try!(write!(fmt.buf, "<h1 class='fqn'>"));
match self.item.inner {
clean::ModuleItem(ref m) => if m.is_crate {
try!(write!(fmt.buf, "Crate "));
Expand Down
Loading