-
Notifications
You must be signed in to change notification settings - Fork 36
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
Source code language next to code boxes #147
Comments
oh no! I forgot an important component, which is the JavaScript in this file that moves the source code class from the child Hope this helps! |
Thank you! I managed to add the const langSpecial = ['r', 'stan', 'js', 'yaml', 'json', 'bash'] However, every time I change the ...
pre.stan {
border-color: var(--blue);
}
pre.stan::after {
content: 'stan';
color: var(--blue);
}
...
pre.r,
pre.stan,
pre.js,
pre.md,
pre.markdown,
pre.yaml,
pre.json,
pre.bash,
pre.html,
pre.css {
background: none;
}
pre.r::after,
pre.stan::after,
pre.js::after,
pre.md::after,
pre.markdown::after,
pre.yaml::after,
pre.json::after,
pre.bash::after,
pre.html::after,
pre.css::after {
text-transform: uppercase;
font-family: var(--font-header);
left: -1.35em;
bottom: -1.1em;
transform-origin: top left;
transform: rotate(-90deg);
} But the result is the same: By the way, the file Any idea of what's happening? Thanks. PS: I copied your repo I just tried to add some |
Dear @gadenbuie, did you have to opportunity to see what is happening? Thank you for your time. |
As I mentioned before the sudo chattr +i /aaa/assets/libs/js4shiny/css/code.css In other words I just forced Linux to prevent the file to be overwritten. I hope that this helps someone. |
For js4shiny, I built CSS styles that add the language name next to the code box. They're included in the (somewhat hidden) xaringan template in the js4shiny R package but the CSS for the code boxes specifically comes from https://github.com/gadenbuie/js4shiny/blob/main/inst/template-html/css/code.css
These styles (or something similar) could be moved in to xaringanExtra.
Screenshots
The text was updated successfully, but these errors were encountered: