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/roboto/roboto_100_300_400_500.css" rel="stylesheet">
  38. <link href="/assets/css/core/figtree/figtree.css" rel="stylesheet">
  39. {%- if gamify -%}
  40. <link href="/assets/css/core/figtree/figtree.css" rel="stylesheet">
  41. <link rel="stylesheet" href="https://use.typekit.net/jtf4zwy.css">
  42. {%- endif -%}
  43. {% block stylesheets -%}
  44. {%- endblock -%}
  45. {#- MathJax config -#}
  46. <script type="text/x-mathjax-config">
  47. MathJax.Hub.Config({
  48. skipStartupTypeset: true,
  49. tex2jax: {
  50. inlineMath: [ ['$','$'], ['\\(','\\)'] ],
  51. processEscapes: true,
  52. preview: "none"
  53. },
  54. showMathMenu: false,
  55. showMathMenuMSIE: false,
  56. menuSettings: {
  57. inTabOrder: false
  58. },
  59. messageStyle: "none",
  60. TeX: {
  61. extensions: ["cancel.js", "color.js", "mhchem.js"]
  62. },
  63. "HTML-CSS" : {
  64. availableFonts : [],
  65. preferredFont : null,
  66. webFont : "STIX-Web",
  67. imageFont : null,
  68. scale: 92
  69. }
  70. });
  71. </script>
  72. {%- block mathjax -%}
  73. {%- if __USE_MATHJAX__ -%}
  74. <script src="{{ asset('build/load_math_jax.js') }}"></script>
  75. {%- endif -%}
  76. {%- endblock -%}
  77. {{- include("Core/hotjar.html.twig") -}}
  78. </head>
  79. <body class="{{ bodyClass }} {{ scope }}" style="{{ bodyStyle }}" data-event-logger-route="{{ path('log_event') }}">
  80. {% block header %}{% endblock %}
  81. {% block dialogs %}{% endblock %}
  82. {% block navigation %}{% endblock %}
  83. <main class="{{ bodyClass }}">
  84. {% block content %}{% endblock %}
  85. {% block snackbar %}{% endblock %}
  86. </main>
  87. <script> window.system_topic = "{{ system_topic }}" </script>
  88. {% block javascripts %}{% endblock %}
  89. <script>
  90. // Helper function
  91. let domReady = (cb) => {
  92. document.readyState === 'interactive' || document.readyState === 'complete'
  93. ? cb()
  94. : document.addEventListener('DOMContentLoaded', cb);
  95. };
  96. domReady(() => {
  97. // Display body when DOM is loaded. Prevents flash of non-gamified content
  98. document.body.style.visibility = 'visible';
  99. });
  100. </script>
  101. </body>
  102. </html>