From b7f8847dde4fa17bdf28702ee6cfcf2a160b69a6 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Wed, 21 Feb 2018 12:09:58 -0500 Subject: [PATCH 1/2] Second edition is now the definitive edition * Remove warning about draft from second edition * Add warning about first edition draft being older * Change overview page to better state today's situation --- first-edition/book.toml | 3 + first-edition/src/theme/first-edition.css | 56 +++++ first-edition/src/theme/header.hbs | 27 +++ index.md | 30 ++- second-edition/theme/index.hbs | 276 ---------------------- 5 files changed, 108 insertions(+), 284 deletions(-) create mode 100644 first-edition/src/theme/first-edition.css create mode 100644 first-edition/src/theme/header.hbs delete mode 100644 second-edition/theme/index.hbs diff --git a/first-edition/book.toml b/first-edition/book.toml index 3a3189c4d7..d365a01cfb 100644 --- a/first-edition/book.toml +++ b/first-edition/book.toml @@ -1,3 +1,6 @@ [book] title = "The Rust Programming Language" author = "The Rust Project Developers" + +[output.html] +additional-css = ["src/theme/first-edition.css"] diff --git a/first-edition/src/theme/first-edition.css b/first-edition/src/theme/first-edition.css new file mode 100644 index 0000000000..6ff716b48d --- /dev/null +++ b/first-edition/src/theme/first-edition.css @@ -0,0 +1,56 @@ +.warning { + display: flex; + justify-content: space-between; + align-items: center; + background-color: rgb(242, 222, 222); + border-bottom-color: rgb(238, 211, 215); + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom-style: solid; + border-bottom-width: 0.666667px; + border-image-outset: 0 0 0 0; + border-image-repeat: stretch stretch; + border-image-slice: 100% 100% 100% 100%; + border-image-source: none; + border-image-width: 1 1 1 1; + border-left-color: rgb(238, 211, 215); + border-left-style: solid; + border-left-width: 0.666667px; + border-right-color: rgb(238, 211, 215); + border-right-style: solid; + border-right-width: 0.666667px; + border-top-color: rgb(238, 211, 215); + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-top-style: solid; + border-top-width: 0.666667px; + color: rgb(185, 74, 72); + margin-bottom: 0px; + margin-left: 0px; + margin-right: 0px; + margin-top: 30px; + padding-bottom: 8px; + padding-left: 14px; + padding-right: 35px; + padding-right: 14px; + padding-top: 8px; +} +.warning strong { + color: rgb(185, 74, 72) +} +.warning a { + color: rgb(0, 136, 204) +} +.warning .message { + margin-right: 14px; +} +.warning .message:last-child { + margin-right: 21px; +} +.warning .button { + border: none; + background: none; + color: inherit; + cursor: pointer; + font-size: 14px; +} diff --git a/first-edition/src/theme/header.hbs b/first-edition/src/theme/header.hbs new file mode 100644 index 0000000000..77a747868a --- /dev/null +++ b/first-edition/src/theme/header.hbs @@ -0,0 +1,27 @@ +
+ You are reading an outdated edition of TRPL. For more, go here. + +
+ + diff --git a/index.md b/index.md index 634f78c758..a06b837a3a 100644 --- a/index.md +++ b/index.md @@ -1,11 +1,25 @@ -% The Rust Programming Language +# The Rust Programming Language -There are two editions of "The Rust Programming Language": +The current edition of "The Rust Programming Language" is the second +edition, which you can [read here](second-edition/index.html). -* [First edition](first-edition/index.html) -* [Second edition](second-edition/index.html) +The source for all editions lives [on GitHub](https://github.com/rust-lang/book). +Please open issues with any questions, concerns, or tweaks. -The second edition is a complete re-write. It is still under construction, -though it is far enough along to learn most of Rust. We suggest reading the -second edition and then checking out the first edition later to pick up some of -the more esoteric parts of the language. +## Notes + +The second edition is still receiving some minor edits, but is effectively +complete. It will be [available in dead-tree form through NoStarch +Press](https://nostarch.com/Rust) once these final edits are complete. + +The second edition is a complete re-write of TRPL, from the ground up, +and is therefore very different from the first edition. + +## Other editions + +We keep older editions of TRPL online for history's sake. + +### First Edition + +YOu can [read the first edition of "The Rust Programming Language" +here](first-edition/index.html). diff --git a/second-edition/theme/index.hbs b/second-edition/theme/index.hbs deleted file mode 100644 index bb06bf7476..0000000000 --- a/second-edition/theme/index.hbs +++ /dev/null @@ -1,276 +0,0 @@ - - - - - {{ title }} - - - - - - - - - - - - - - - - - - - - - {{#each additional_css}} - - {{/each}} - - - - {{#if mathjax_support}} - - - {{/if}} - - - - - - - - - - - - - - {{#each additional_js}} - - {{/each}} - - - - - - - - - - - -
- -
-
-
- You are reading a draft of the next edition of TRPL. For more, go here. - -
- - -
- - -
- {{{ content }}} -
- - - {{#previous}} - - {{/previous}} - - {{#next}} - - {{/next}} - -
- - {{#previous}} - - {{/previous}} - - {{#next}} - - {{/next}} - -
- - - - - - - {{{livereload}}} - - {{#if google_analytics}} - - {{/if}} - - {{#if playpens_editable}} - - - - - - {{/if}} - - {{#if is_print}} - - {{/if}} - - - - - From ccf4bfe87c8d2f73985d902e11b8abe28003eefd Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Wed, 21 Feb 2018 13:02:26 -0500 Subject: [PATCH 2/2] Fix typo --- index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.md b/index.md index a06b837a3a..359267d84b 100644 --- a/index.md +++ b/index.md @@ -17,9 +17,9 @@ and is therefore very different from the first edition. ## Other editions -We keep older editions of TRPL online for history's sake. +We keep older editions of TRPL online for history's sake. ### First Edition -YOu can [read the first edition of "The Rust Programming Language" +You can [read the first edition of "The Rust Programming Language" here](first-edition/index.html).