From: bors Date: Sat, 26 Apr 2014 03:06:32 +0000 (-0700) Subject: auto merge of #13748 : hjr3/rust/guide-container-update, r=alexcrichton X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=35f3f7a74b6cbe75196ad4edc80f31876d0d56ba;hp=87f2e21e183e1d888d2781a127e654a379be472b;p=rust.git auto merge of #13748 : hjr3/rust/guide-container-update, r=alexcrichton --- diff --git a/mk/docs.mk b/mk/docs.mk index 9c79e1e8642..3e032d59728 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -141,6 +141,26 @@ doc/footer.inc: $(D)/footer.inc | doc/ @$(call E, cp: $@) $(Q)cp -a $< $@ 2> /dev/null +doc/FiraSans-Regular.woff: $(D)/FiraSans-Regular.woff | doc/ + @$(call E, cp: $@) + $(Q)cp -a $< $@ 2> /dev/null + +doc/FiraSans-Medium.woff: $(D)/FiraSans-Medium.woff | doc/ + @$(call E, cp: $@) + $(Q)cp -a $< $@ 2> /dev/null + +doc/Heuristica-Regular.woff: $(D)/Heuristica-Regular.woff | doc/ + @$(call E, cp: $@) + $(Q)cp -a $< $@ 2> /dev/null + +doc/Heuristica-Italic.woff: $(D)/Heuristica-Italic.woff | doc/ + @$(call E, cp: $@) + $(Q)cp -a $< $@ 2> /dev/null + +doc/Heuristica-Bold.woff: $(D)/Heuristica-Bold.woff | doc/ + @$(call E, cp: $@) + $(Q)cp -a $< $@ 2> /dev/null + # The (english) documentation for each doc item. define DEF_SHOULD_BUILD_PDF_DOC diff --git a/src/doc/FiraSans-Medium.woff b/src/doc/FiraSans-Medium.woff new file mode 100644 index 00000000000..5627227744a Binary files /dev/null and b/src/doc/FiraSans-Medium.woff differ diff --git a/src/doc/FiraSans-Regular.woff b/src/doc/FiraSans-Regular.woff new file mode 100644 index 00000000000..9ff40445bf4 Binary files /dev/null and b/src/doc/FiraSans-Regular.woff differ diff --git a/src/doc/Heuristica-Bold.woff b/src/doc/Heuristica-Bold.woff new file mode 100644 index 00000000000..1c952d10e96 Binary files /dev/null and b/src/doc/Heuristica-Bold.woff differ diff --git a/src/doc/Heuristica-Italic.woff b/src/doc/Heuristica-Italic.woff new file mode 100644 index 00000000000..b0cebf01de4 Binary files /dev/null and b/src/doc/Heuristica-Italic.woff differ diff --git a/src/doc/Heuristica-Regular.woff b/src/doc/Heuristica-Regular.woff new file mode 100644 index 00000000000..8d824e6f547 Binary files /dev/null and b/src/doc/Heuristica-Regular.woff differ diff --git a/src/doc/favicon.inc b/src/doc/favicon.inc index b68c58c9b61..a11e5cc9568 100644 --- a/src/doc/favicon.inc +++ b/src/doc/favicon.inc @@ -1 +1,3 @@ - + + \ No newline at end of file diff --git a/src/doc/intro.md b/src/doc/intro.md index 513f4ab22e3..5b36856660d 100644 --- a/src/doc/intro.md +++ b/src/doc/intro.md @@ -217,7 +217,7 @@ a `Sender` and `Receiver` (commonly abbreviated `tx` and `rx`). The `spawn` function spins up a new task, given a *heap allocated closure* to run. As you can see in the code, -we call `chan.send()` from the original task, +we call `tx.send()` from the original task, passing in our boxed array, and we call `rx.recv()` (short for 'receive') inside of the new task: values given to the `Sender` via the `send` method come out the other end via the `recv` method on the `Receiver`. diff --git a/src/doc/rust.css b/src/doc/rust.css index b581dc2cce8..d60dd54a67d 100644 --- a/src/doc/rust.css +++ b/src/doc/rust.css @@ -14,34 +14,41 @@ font-family: 'Fira Sans'; font-style: normal; font-weight: 400; - src: local('Fira Sans'), url("http://www.rust-lang.org/fonts/FiraSans-Regular.woff") format('woff'); + src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff'); } @font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 500; - src: local('Fira Sans Medium'), url("http://www.rust-lang.org/fonts/FiraSans-Medium.woff") format('woff'); + src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff'); } @font-face { font-family: 'Heuristica'; font-style: normal; font-weight: 400; - src: local('Heuristica Regular'), url("http://www.rust-lang.org/fonts/Heuristica-Regular.woff") format('woff'); + src: local('Heuristica Regular'), url("Heuristica-Regular.woff") format('woff'); } @font-face { font-family: 'Heuristica'; font-style: italic; font-weight: 400; - src: local('Heuristica Italic'), url("http://www.rust-lang.org/fonts/Heuristica-Italic.woff") format('woff'); + src: local('Heuristica Italic'), url("Heuristica-Italic.woff") format('woff'); } @font-face { font-family: 'Heuristica'; font-style: normal; font-weight: 700; - src: local('Heuristica Bold'), url("http://www.rust-lang.org/fonts/Heuristica-Bold.woff") format('woff'); + src: local('Heuristica Bold'), url("Heuristica-Bold.woff") format('woff'); } -/* Global page semantics - ========================================================================== */ + +*:not(body) { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/* General structure */ + body { margin: 0 auto; padding: 0 15px; @@ -71,16 +78,6 @@ h1, h2, h3 { h1 { margin-bottom: 20px; } -@media (min-width: 1170px) { - h1 { - margin-top: 40px; - margin-bottom: 30px; - } - h1, h2, h3 { - margin-top: 30px; - margin-bottom: 15px; - } -} h4, h5, h6 { margin-top: 12px; margin-bottom: 10px; @@ -157,8 +154,8 @@ footer { margin-bottom: 1em; } -/* Links layout - ========================================================================== */ +/* Links layout */ + a { text-decoration: none; color: #428BCA; @@ -183,18 +180,16 @@ h5 a:link, h5 a:visited {color: black;} h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover {text-decoration: none;} -/* Code - ========================================================================== */ +/* Code */ + pre, code { - font-family: Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; - border-radius: 4px; + font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace; } pre { - background-color: #FDFDFD; - border: 1px solid #CCC; - border-radius: 0.5em; + border-left: 2px solid #eee; white-space: pre-wrap; - padding: 9.5px; + padding: 14px; + padding-right: 0; margin: 20px 0; font-size: 13px; word-break: break-all; @@ -203,15 +198,12 @@ pre { code { padding: 0 2px; color: #8D1A38; - white-space: nowrap; + white-space: pre-wrap; } pre code { padding: 0; font-size: inherit; color: inherit; - white-space: pre-wrap; - background-color: transparent; - border-radius: 0; } /* Code highlighting */ @@ -225,16 +217,16 @@ pre.rust .doccomment { color: #4D4D4C; } pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; } pre.rust .lifetime { color: #B76514; } +/* The rest */ -/* The rest - ========================================================================== */ #versioninfo { text-align: center; margin: 0.5em; font-size: 1.1em; } -@media only screen and (min-width: 768px) { +@media (min-width: 992px) { #versioninfo { + font-size: 0.8em; position: fixed; bottom: 0px; right: 0px; @@ -243,7 +235,7 @@ pre.rust .lifetime { color: #B76514; } background-color: #fff; margin: 2px; padding: 0 2px; - border-radius: .3em; + border-radius: .2em; } } #versioninfo a.hash { @@ -252,10 +244,12 @@ pre.rust .lifetime { color: #B76514; } } blockquote { - color: black; - border-left: 5px solid #eee; - margin: 0 0 20px; - padding: 10px 20px; + color: #000; + margin: 20px 0; + padding: 15px 20px; + background-color: #f2f7f9; + border-top: .1em solid #e5eef2; + border-bottom: .1em solid #e5eef2; } blockquote p { font-size: 17px; @@ -319,6 +313,12 @@ table th { padding: 5px; } +@media (min-width: 1170px) { + pre { + font-size: 15px; + } +} + @media print { * { text-shadow: none !important; diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs index d0cfabc8c11..7cfc307debe 100644 --- a/src/librustdoc/html/layout.rs +++ b/src/librustdoc/html/layout.rs @@ -38,11 +38,11 @@ pub fn render( {title} - - {favicon, select, none{} other{}} + {favicon, select, none{} other{}}