templates/Core/base_ultra_lite.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="da">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. {{- include("Core/favicons.html.twig", { dir: __PUBLISHER__ == "systime" ? "abacus" : scope }) -}}
  8. {%- set brand = 'brand'|trans -%}
  9. {% set bodyStyle = '' %}
  10. {% set gamify = false %}
  11. {% if __USE_GAMIFICATION__ %}
  12. {% set studentClassLevel = null %}
  13. {% if classLevel is defined and classLevel is not null %}
  14. {% set studentClassLevel = classLevel %}
  15. {% endif %}
  16. {% if studentClassLevel is empty and student is defined and student is not null %}
  17. {% set studentClassLevel = student.classLevel %}
  18. {% endif %}
  19. {% set bodyStyle = 'visibility:hidden' %}
  20. {% set gamify = true %}
  21. {% endif %}
  22. {% set bodyClass = '' %}
  23. {%- if gamify and studentClassLevel is not null -%}
  24. {%- set bodyClass = 'gamify' -%}
  25. {%- if studentClassLevel <= 3 -%}
  26. {%- set bodyClass = bodyClass ~ ' indskoling' -%}
  27. {%- elseif studentClassLevel > 3 and studentClassLevel <= 6 -%}
  28. {%- set bodyClass = bodyClass ~ ' mellemtrin gamify--light' -%}
  29. {%- elseif studentClassLevel > 6 -%}
  30. {%- set bodyClass = bodyClass ~ ' udskoling gamify--light' -%}
  31. {%- endif -%}
  32. {% endif %}
  33. <title>{{ brand }}</title>
  34. {# Material Design Lite #}
  35. <link rel="stylesheet" href="/assets/css/core/materialicons/materialicons.css">
  36. <link rel="stylesheet" href="/assets/css/core/material.indigo-pink_1_3_0.min.css">
  37. <link href="/assets/css/core/figtree/figtree.css" rel="stylesheet">
  38. {%- if gamify -%}
  39. <link href="/assets/css/core/fredoka/fredoka.css" rel="stylesheet">
  40. {%- endif -%}
  41. {% block stylesheets -%}
  42. {%- endblock -%}
  43. {#- MathJax config -#}
  44. <script type="text/x-mathjax-config">
  45. MathJax.Hub.Config({
  46. skipStartupTypeset: true,
  47. tex2jax: {
  48. inlineMath: [ ['$','$'], ['\\(','\\)'] ],
  49. processEscapes: true,
  50. preview: "none"
  51. },
  52. showMathMenu: false,
  53. showMathMenuMSIE: false,
  54. menuSettings: {
  55. inTabOrder: false
  56. },
  57. messageStyle: "none",
  58. TeX: {
  59. extensions: ["cancel.js", "color.js", "mhchem.js"]
  60. },
  61. "HTML-CSS" : {
  62. availableFonts : [],
  63. preferredFont : null,
  64. webFont : "STIX-Web",
  65. imageFont : null,
  66. scale: 92
  67. }
  68. });
  69. </script>
  70. {%- block mathjax -%}
  71. {%- if __USE_MATHJAX__ -%}
  72. <script src="{{ asset('build/load_math_jax.js') }}"></script>
  73. {%- endif -%}
  74. {%- endblock -%}
  75. {{- include("Core/hotjar.html.twig") -}}
  76. </head>
  77. <body class="{{ bodyClass }} {{ scope }}" style="{{ bodyStyle }}" data-event-logger-route="{{ path('log_event') }}">
  78. {% block header %}{% endblock %}
  79. {% block dialogs %}{% endblock %}
  80. {% block navigation %}{% endblock %}
  81. <main class="{{ bodyClass }}">
  82. {% block content %}{% endblock %}
  83. {% block snackbar %}{% endblock %}
  84. </main>
  85. <script> window.system_topic = "{{ system_topic }}" </script>
  86. {% block javascripts %}{% endblock %}
  87. <script>
  88. // Helper function
  89. let domReady = (cb) => {
  90. document.readyState === 'interactive' || document.readyState === 'complete'
  91. ? cb()
  92. : document.addEventListener('DOMContentLoaded', cb);
  93. };
  94. domReady(() => {
  95. // Display body when DOM is loaded. Prevents flash of non-gamified content
  96. document.body.style.visibility = 'visible';
  97. });
  98. </script>
  99. </body>
  100. </html>