Skip to content

Commit

Permalink
Add a notice about the latest book
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuya6502 committed Oct 12, 2020
1 parent 0bde97a commit 769819f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions second-edition/book.toml
@@ -1,3 +1,6 @@
[book]
title = "The Rust Programming Language"
author = "Steve Klabnik and Carol Nichols, with Contributions from the Rust Community"

[output.html]
additional-css = ["theme/notice.css"]
5 changes: 5 additions & 0 deletions second-edition/theme/header.hbs
@@ -0,0 +1,5 @@
<blockquote class="header-notice">
<p>
<strong>注意: <a href="https://doc.rust-jp.rs/book-ja/">最新版のドキュメントをご覧ください。</a></strong>この第2版ドキュメントは古くなっており、最新情報が反映されていません。リンク先のドキュメントが現在の Rust の最新のドキュメントです。
</p>
</blockquote>
29 changes: 29 additions & 0 deletions second-edition/theme/notice.css
@@ -0,0 +1,29 @@
.ayu .header-notice {
border-top: 1px solid #492b2d;
border-bottom: 1px solid #492b2d;
background-color: #492b2d;
}

.coal .header-notice {
border-top: 1px solid #552e28;
border-bottom: 1px solid #552e28;
background-color: #552e28;
}

.light .header-notice {
border-top: 1px solid #f0e1e1;
border-bottom: 1px solid #f0e1e1;
background-color: #f0e1e1;
}

.navy .header-notice {
border-top: 1px solid #492b2d;
border-bottom: 1px solid #492b2d;
background-color: #492b2d;
}

.rust .header-notice {
border-top: 1px solid #b9897f;
border-bottom: 1px solid #b9897f;
background-color: #b9897f;
}

0 comments on commit 769819f

Please sign in to comment.