Skip to content
Open
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: 0 additions & 1 deletion webapp/templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<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>
{% include 'partials/mathjaxhead.html.twig' %}

<script src="{{ asset("js/domjudge.js") }}"></script>
{% for file in customAssetFiles('js') %}
Expand Down
2 changes: 2 additions & 0 deletions webapp/templates/jury/clarification.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "jury/base.html.twig" %}
{% import 'macros.html.twig' as base_macros %}

{% set origclar = list | first %}
{% set claimed = not origclar.answered and origclar.from_jurymember is defined %}
Expand All @@ -7,6 +8,7 @@

{% block extrahead %}
{{ parent() }}
{{ base_macros.mathjax_head() }}
{% endblock %}

{% block content %}
Expand Down
2 changes: 2 additions & 0 deletions webapp/templates/jury/clarification_new.html.twig
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{% extends "jury/base.html.twig" %}
{% import 'macros.html.twig' as base_macros %}

{% block title %}Send clarification - {{ parent() }}{% endblock %}

{% block extrahead %}
{{ parent() }}
{{ base_macros.mathjax_head() }}
{% endblock %}

{% block content %}
Expand Down
2 changes: 2 additions & 0 deletions webapp/templates/jury/clarifications.html.twig
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{% extends "jury/base.html.twig" %}
{% import "jury/jury_macros.twig" as macros %}
{% import 'macros.html.twig' as base_macros %}

{% block title %}Clarifications - {{ parent() }}{% endblock %}

{% block extrahead %}
{{ parent() }}
{{ macros.table_extrahead() }}
{{ base_macros.mathjax_head() }}
<style>
.data-table td a, .data-table td a:hover {
display: inline;
Expand Down
3 changes: 2 additions & 1 deletion webapp/templates/jury/export/layout.html.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% import 'macros.html.twig' as macros %}
<!DOCTYPE html>
<html lang="en" xml:lang="en">
<head>
Expand Down Expand Up @@ -108,7 +109,7 @@
color: darkgrey;
}
</style>
{% include 'partials/mathjaxhead.html.twig' %}
{{ macros.mathjax_head() }}
</head>
<body>
<main role="main" class="">
Expand Down
25 changes: 25 additions & 0 deletions webapp/templates/macros.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% macro mathjax_head() %}
<script>
window.MathJax = {
tex: {
inlineMath: [['$', '$']]
},
chtml: {
fontURL: '{{ app.request.basePath }}/mathjaxfonts',
scale: 1.0
},
loader: {
paths: {
mathjax: '{{ app.request.basePath }}/mathjax',
'@mathjax': '{{ app.request.basePath }}/mathjax'
},
// Optional: reinforce that @mathjax modules resolve under the same base
source: {
'@mathjax': '[mathjax]'
},
load: ['input/tex', 'output/chtml']
}
};
</script>
<script src="{{ app.request.basePath }}/mathjax/tex-chtml.js"></script>
{% endmacro %}
23 changes: 0 additions & 23 deletions webapp/templates/partials/mathjaxhead.html.twig

This file was deleted.

6 changes: 6 additions & 0 deletions webapp/templates/team/clarification.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{% extends 'team/base.html.twig' %}
{% import 'macros.html.twig' as macros %}

{% block title %}View clarification - {{ parent() }}{% endblock %}

{% block extrahead %}
{{ parent() }}
{{ macros.mathjax_head() }}
{% endblock %}

{% block content %}
<h1 class="text-center mt-4">Clarification
{% if clarification.sender and clarification.sender.teamid == team.teamid %}Request{% endif%}</h1>
Expand Down
6 changes: 6 additions & 0 deletions webapp/templates/team/clarification_add.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{% extends 'team/base.html.twig' %}
{% import 'macros.html.twig' as macros %}

{% block title %}Send clarification request - {{ parent() }}{% endblock %}

{% block extrahead %}
{{ parent() }}
{{ macros.mathjax_head() }}
{% endblock %}

{% block content %}
<div class="mt-3 container">
<div class="card card-body clarificationform">
Expand Down
6 changes: 6 additions & 0 deletions webapp/templates/team/clarifications_by_problem.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{% extends 'team/base.html.twig' %}
{% import 'macros.html.twig' as macros %}

{% block title %}View clarifications for problem {{ problem.name }}{% endblock %}

{% block extrahead %}
{{ parent() }}
{{ macros.mathjax_head() }}
{% endblock %}

{% block extrahead %}
{{ parent() }}
<style>
Expand Down
2 changes: 2 additions & 0 deletions webapp/templates/team/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{% extends 'team/base.html.twig' %}
{% import 'macros.html.twig' as macros %}

{% block title %}{{ team.effectiveName }} - {{ parent() }}{% endblock %}

{% block extrahead %}
{{ parent() }}
{{ macros.mathjax_head() }}
<style>
.data-table td a, .data-table td a:hover {
display: block;
Expand Down