auto merge of #9422 : alexcrichton/rust/fix-link, r=thestinger

This makes clicking on the logo do what you'd expect.
This commit is contained in:
bors 2013-09-23 00:20:51 -07:00
commit 80e096830d
3 changed files with 13 additions and 17 deletions

View File

@ -21,7 +21,8 @@ RUSTPKG_INPUTS := $(wildcard $(S)src/librustpkg/*.rs)
# Rustdoc, the documentation tool
RUSTDOC_LIB := $(S)src/librustdoc/rustdoc.rs
RUSTDOC_INPUTS := $(wildcard $(S)src/librustdoc/*.rs)
RUSTDOC_INPUTS := $(wildcard $(addprefix $(S)src/librustdoc/, \
*.rs */*.rs */*/*.rs))
# Rusti, the JIT REPL
RUSTI_LIB := $(S)src/librusti/rusti.rs

View File

@ -36,7 +36,7 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
<link href='http://fonts.googleapis.com/css?family=Oswald:700|Inconsolata:400'
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}{crate}/main.css\">
{favicon, select, none{} other{
<link rel=\"icon\" href=\"#\" sizes=\"16x16\"
@ -52,7 +52,7 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
<section class=\"sidebar\">
{logo, select, none{} other{
<a href='{root_path}index.html'><img src='#' alt=''/></a>
<a href='{root_path}{crate}/index.html'><img src='#' alt=''/></a>
}}
{sidebar}
@ -73,9 +73,9 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
<script>
var rootPath = \"{root_path}\";
</script>
<script src=\"{root_path}jquery.js\"></script>
<script src=\"{root_path}{crate}/jquery.js\"></script>
<script src=\"{root_path}{crate}/search-index.js\"></script>
<script src=\"{root_path}main.js\"></script>
<script src=\"{root_path}{crate}/main.js\"></script>
<div id=\"help\" class=\"hidden\">
<div class=\"shortcuts\">

View File

@ -128,20 +128,15 @@ pub fn run(mut crate: clean::Crate, dst: Path) {
crate = cache.fold_crate(crate);
// Add all the static files
write(cx.dst.push("jquery.js"), include_str!("static/jquery-2.0.3.min.js"));
write(cx.dst.push("main.js"), include_str!("static/main.js"));
write(cx.dst.push("main.css"), include_str!("static/main.css"));
write(cx.dst.push("normalize.css"), include_str!("static/normalize.css"));
write(cx.dst.push("index.html"), format!("
<DOCTYPE html><html><head>
<meta http-equiv='refresh'
content=\"0; url={}/index.html\">
</head><body></body></html>
", crate.name));
let dst = cx.dst.push(crate.name);
mkdir(&dst);
write(dst.push("jquery.js"), include_str!("static/jquery-2.0.3.min.js"));
write(dst.push("main.js"), include_str!("static/main.js"));
write(dst.push("main.css"), include_str!("static/main.css"));
write(dst.push("normalize.css"), include_str!("static/normalize.css"));
{
mkdir(&cx.dst.push(crate.name));
let dst = cx.dst.push(crate.name).push("search-index.js");
let dst = dst.push("search-index.js");
let mut w = BufferedWriter::new(dst.open_writer(io::CreateOrTruncate));
let w = &mut w as &mut io::Writer;
write!(w, "var searchIndex = [");