Add an incomplete warning to the top page (#274)

pull/286/head
Yuki Okushi 3 years ago committed by GitHub
parent b9ca313e68
commit 3bdccf4402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,6 +4,7 @@ title = "The Rustonomicon"
description = "The Dark Arts of Advanced and Unsafe Rust Programming" description = "The Dark Arts of Advanced and Unsafe Rust Programming"
[output.html] [output.html]
additional-css = ["theme/nomicon.css"]
git-repository-url = "https://github.com/rust-lang/nomicon" git-repository-url = "https://github.com/rust-lang/nomicon"
[output.html.redirect] [output.html.redirect]

@ -1,5 +1,16 @@
# The Rustonomicon # The Rustonomicon
<div class="warning">
Warning:
This book is incomplete.
Documenting everything and rewriting outdated parts take a while.
See the [issue tracker] to check what's missing/outdated, and if there are any mistakes or ideas that haven't been reported, feel free to open a new issue there.
</div>
[issue tracker]: https://github.com/rust-lang/nomicon/issues
## The Dark Arts of Unsafe Rust ## The Dark Arts of Unsafe Rust
> THE KNOWLEDGE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF UNLEASHING INDESCRIBABLE HORRORS THAT SHATTER YOUR PSYCHE AND SET YOUR MIND ADRIFT IN THE UNKNOWABLY INFINITE COSMOS. > THE KNOWLEDGE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF UNLEASHING INDESCRIBABLE HORRORS THAT SHATTER YOUR PSYCHE AND SET YOUR MIND ADRIFT IN THE UNKNOWABLY INFINITE COSMOS.

@ -0,0 +1,40 @@
/*
Taken from the reference.
Warnings and notes:
Write the <div>s on their own line. E.g.
<div class="warning">
Warning: This is bad!
</div>
*/
main .warning p {
padding: 10px 20px;
margin: 20px 0;
}
main .warning p::before {
content: "⚠️ ";
}
.light main .warning p,
.rust main .warning p {
border: 2px solid red;
background: #ffcece;
}
.rust main .warning p {
/* overrides previous declaration */
border-color: #961717;
}
.coal main .warning p,
.navy main .warning p,
.ayu main .warning p {
background: #542626
}
/* Make the links higher contrast on dark themes */
.coal main .warning p a,
.navy main .warning p a,
.ayu main .warning p a {
color: #80d0d0
}
Loading…
Cancel
Save