-
Notifications
You must be signed in to change notification settings - Fork 151
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
ui: add mathjax to record details page #2538
Conversation
invenio_app_rdm/config.py
Outdated
@@ -234,6 +234,11 @@ def _(x): | |||
|
|||
THEME_JAVASCRIPT_TEMPLATE = "invenio_app_rdm/javascript.html" | |||
|
|||
THEME_MATHJAX_CDN = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was it agreed on to use the cdn in the invenioRDM core? should we use it only in zenodo? to be discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, by default this should be disabled. But I would keep the "automatic" addition in the javascript
block if the config is set.
@@ -360,6 +360,7 @@ <h4>{{ _("Request access") }}</h4> | |||
{%- endblock page_body %} | |||
|
|||
{%- block javascript %} | |||
<script type="text/javascript" src="{{ config.THEME_MATHJAX_CDN }}"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<script type="text/javascript" src="{{ config.THEME_MATHJAX_CDN }}"></script> | |
{% if config.THEME_MATHJAX_CDN %} | |
<script type="text/javascript" src="{{ config.THEME_MATHJAX_CDN }}"></script> | |
{% endif %} |
As suggested above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I think about it, shouldn't this bee already defined like this in invenio-theme
? Where did the THEME_
prefix come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no mathjax defined in invenio-theme
. Took this constant name from the legacy https://github.com/zenodo/zenodo/blob/master/zenodo/config.py#L1427
b941833
to
ff4bc0e
Compare
Landing page:
![Screenshot 2023-11-15 at 17 07 02](https://private-user-images.githubusercontent.com/61321254/283454598-f6cc8ef6-b584-4d9e-8835-c914b8394168.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNzQwMjIsIm5iZiI6MTczOTA3MzcyMiwicGF0aCI6Ii82MTMyMTI1NC8yODM0NTQ1OTgtZjZjYzhlZjYtYjU4NC00ZDllLTg4MzUtYzkxNGI4Mzk0MTY4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA0MDIwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYyODNhMWJiODFhYzU4YzNmZDk1Yzc1OGQ2YTZlOWIxNjdkY2U1MTlkZmQzZWUzYzA5ZTI4ZjEzYWY4YWMzNjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.N5Z3bPjmF5BzaTd1RCNtp6haeTtdl1feqT7rBJkTsxY)
Request page:
![Screenshot 2023-11-15 at 17 07 40](https://private-user-images.githubusercontent.com/61321254/283454646-23be1227-ce95-4f2a-972b-ee0903be4dc9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNzQwMjIsIm5iZiI6MTczOTA3MzcyMiwicGF0aCI6Ii82MTMyMTI1NC8yODM0NTQ2NDYtMjNiZTEyMjctY2U5NS00ZjJhLTk3MmItZWUwOTAzYmU0ZGM5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA0MDIwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc2ZGZhYjkyZjIzZTNkZWQyMjM5MDc2NzlkNGMzOTVjMzdkOTMzMzRjMzEzOTgwMzhhM2Q0YjE1MTcxMzc2NjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XY50T8NHCNnv9c_UJqY5fn9OwVApV6qKwmsrAVOUAV0)