Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions webapp/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"jms/serializer-bundle": "^5.2",
"knplabs/knp-paginator-bundle": "^6.6",
"league/commonmark": "^2.3",
"mathjax/mathjax": "^4.0",
"mbostock/d3": "^3.5",
"nelmio/api-doc-bundle": "^5.0",
"nelmio/cors-bundle": "^2.4",
Expand Down
52 changes: 51 additions & 1 deletion webapp/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions webapp/public/js/domjudge.js
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ function previewClarification($input, $previewDiv) {
}
}).done(function (data) {
$previewDiv.html(data.html);
MathJax.typesetPromise([document.getElementById($previewDiv[0].id)]);
});
}
}
Expand Down
1 change: 1 addition & 0 deletions webapp/public/mathjax
Binary file added webapp/public/mathjaxfonts/mjx-ncm-b.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-be.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-bi.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-brk.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-c.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-cb.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-ds.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-em.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-f.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-fb.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-i.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-lo.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-lt.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-m.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-mi.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-n.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-ob.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-os.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-rb.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-s.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-s3.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-s4.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-s5.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-s6.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-s7.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-sb.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-so.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-ss.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-ssb.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-ssbi.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-ssi.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-u.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-ue.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-v.woff2
Binary file not shown.
Binary file added webapp/public/mathjaxfonts/mjx-ncm-zero.woff2
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __invoke(ResponseEvent $event): void
// the profiler requires 'unsafe-eval' for script-src 'self'.
$response = $event->getResponse();
$cspExtra = $this->profiler ? "'unsafe-eval'" : "";
$csp = "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' $cspExtra; img-src 'self' data:; worker-src 'self' blob:";
$csp = "default-src 'self' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline'; script-src 'self' https://cdn.jsdelivr.net 'unsafe-inline' $cspExtra; img-src 'self' data:; worker-src 'self' blob:";
$response->headers->set('Content-Security-Policy', $csp);
}
}
8 changes: 8 additions & 0 deletions webapp/templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
<script src="{{ asset("js/jquery.min.js") }}"></script>
<script src="{{ asset("js/jquery.debounce.min.js") }}"></script>
<script src="{{ asset("js/bootstrap.bundle.min.js") }}"></script>
<script>
window.MathJax = {
tex: { inlineMath: [['$', '$'], ['\\(', '\\)']] },
svg: { fontCache: 'global' },
chtml: { fontURL: "{{ app.request.basePath }}/mathjaxfonts" }
};
</script>
<script src="{{ app.request.basePath }}/mathjax/tex-chtml.js"></script>

<script src="{{ asset("js/domjudge.js") }}"></script>
{% for file in customAssetFiles('js') %}
Expand Down
1 change: 1 addition & 0 deletions webapp/templates/jury/menu.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

{% set current_route = app.request.attributes.get('_route') %}

<span>Euler's identity: $( e^{i\pi} + 1 = 0 )$</span>
<div class="collapse navbar-collapse" id="menuDefault" data-update-url="{{ path('jury_ajax_updates') }}">
<ul class="navbar-nav me-auto">

Expand Down
Loading