Skip to content

Add an incomplete warning to the top page #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ title = "The Rustonomicon"
description = "The Dark Arts of Advanced and Unsafe Rust Programming"

[output.html]
additional-css = ["theme/nomicon.css"]
git-repository-url = "https://github.com/rust-lang/nomicon"

[output.html.redirect]
11 changes: 11 additions & 0 deletions src/intro.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# 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 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.
40 changes: 40 additions & 0 deletions theme/nomicon.css
Original file line number Diff line number Diff line change
@@ -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
}