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

ui: add mathjax to record details page #2538

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

anikachurilova
Copy link
Member

@anikachurilova anikachurilova commented Nov 16, 2023

Landing page:
Screenshot 2023-11-15 at 17 07 02

Request page:
Screenshot 2023-11-15 at 17 07 40

@@ -234,6 +234,11 @@ def _(x):

THEME_JAVASCRIPT_TEMPLATE = "invenio_app_rdm/javascript.html"

THEME_MATHJAX_CDN = (
Copy link
Contributor

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.

Copy link
Member

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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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.

Copy link
Member

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?

Copy link
Member Author

@anikachurilova anikachurilova Nov 17, 2023

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

@slint slint merged commit 849838e into inveniosoftware:master Nov 20, 2023
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

Successfully merging this pull request may close these issues.

3 participants