-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Ferris Technology #1505
Ferris Technology #1505
Conversation
@carols10cents ^ any thoughts? @aldeka Is there any chance we can get a white outline on the |
This is amazing, thank you so much! I'm sorry it's taken so long to get back to you; I had rustconf and then a vacation. Carol's been on vacation too. Let's try to fix up these issues and ship this! I'm so excited!
I think leaving it purely as the status at that point is the right call.
Yeah, that's tough. Is there an easy way to maybe, just hide ferris in that case?
I'm happy with whatever you decide looks best.
Ah, that's true. Hm. We already have some issues with this kind of thing and other images, so I don't consider it a blocker. |
Thanks for your reply! I think I've fixed the second issue, Ferris shouldn't appear on code blocks with <= 4 lines of code anymore. So if I understand you correctly, we are ready to merge right? |
Yup! This looks fantastic! Thank you so much! |
Let's check out rust-lang/book#1505 on nightly
Update The Book to latest Let's check out rust-lang/book#1505 on nightly.
Hello everyone, Should I change anything in these files? |
@adjoli You need to just add the correct attributes to the code blocks (see the OP of this PR under "Screenshots" for available attributes). You can see how this is done in the English version, or in the changes of this PR. Regarding the files: looking at your repository (https://github.com/adjoli/rust-book-pt-br), which I assume is the one you're talking about, it looks like you're missing the part of You should add this to [output.html]
additional-css = ["ferris.css"]
additional-js = ["ferris.js"] |
Thanks a lot, @u32i64. It works! |
This fixes #55 🎉
Screenshots
does_not_compile
panics
Note: this is different from the already existing
should_panic
attribute which is used for testing the code in CI - since some code blocks should panic in CI, but don't always do that when testing locally, and thus they do not need a panicking Ferris.unsafe
Note: unsafe code is not tinted red, according to the book:
not_desired_behavior
Progress
Unresolved questions/issues
1. Do code blocks which are there to show the behavior that will be implemented later in the chapter need to be annotated as not compiling (e.g. in chapters 05, 12, 17, 20)?
2. Ferris positioning when there is less than 4 lines of code (sometimes it's ok, but if there is a lot of text below the code block, Ferris is covering part of it):
Screenshot of the issue
3. Background colors for each theme. Current:
#fff1f1
#fff1f1
#501f21
#501f21
#501f21
4. In dark themes,
does_not_compile
Ferris' question mark is hard to distinguish from the background.