Skip to content
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

How do I create customized new admonitions, like for questions and answers? #7

Open
furnstahl opened this issue Jul 22, 2021 · 3 comments
Assignees

Comments

@furnstahl
Copy link
Owner

This is addressed in jupyter-book/jupyter-book#1345:

In the Jupyter notebook:

:::{admonition} Extra credit
An "extra credit" exercise is presented here.
:::

Then, in format.css:

.admonition-extra-credit {
    border-left-color: rgba(var(--pst-color-success), 1);
}
.admonition-extra-credit .admonition-title {
    background-color: rgba(var(--pst-color-success), .1)
}
.admonition-extra-credit .admonition-title:before {
    color: rgba(var(--pst-color-success), 1);
    content: '\f19d';
}
@furnstahl furnstahl self-assigned this Jul 22, 2021
@furnstahl
Copy link
Owner Author

To find free icons like the graduation-hat used over, see https://fontawesome.com/v6.0/icons?d=gallery&p=1&s=solid&m=free.

@furnstahl furnstahl reopened this Jul 23, 2021
@furnstahl
Copy link
Owner Author

The local format.css file (or whatever you call it) should be put in _static, which is in (or needs to be created in) the jupyter book root directory.

@furnstahl
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant