src/CoreBundle/Resources/views/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("@ABaCusCore/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 = studentClassLevel <= 6 %}
  21. {% endif %}
  22. {% set bodyClass = '' %}
  23. {%- if gamify and studentClassLevel is not null -%}
  24. {%- set levelThreshold = levelThreshold | default(3) -%}
  25. {%- set bodyClass = studentClassLevel in 0..levelThreshold ? 'gamify indskoling' : 'gamify gamify--light mellemtrin' -%}
  26. {% endif %}
  27. <title>{{ brand }}</title>
  28. {# Material Design Lite #}
  29. <link rel="stylesheet" href="/bundles/abacuscore/css/materialicons/materialicons.css">
  30. <link rel="stylesheet" href="/bundles/abacuscore/css/material.indigo-pink_1_3_0.min.css">
  31. <link href="/bundles/abacuscore/css/roboto/roboto_100_300_400_500.css" rel="stylesheet">
  32. <link href="/bundles/abacuscore/css/figtree/figtree.css" rel="stylesheet">
  33. {%- if gamify -%}
  34. <link href="/bundles/abacuscore/css/figtree/figtree.css" rel="stylesheet">
  35. <link rel="stylesheet" href="https://use.typekit.net/jtf4zwy.css">
  36. {%- endif -%}
  37. {% block stylesheets -%}
  38. {%- endblock -%}
  39. {#- MathJax config -#}
  40. <script type="text/x-mathjax-config">
  41. MathJax.Hub.Config({
  42. skipStartupTypeset: true,
  43. tex2jax: {
  44. inlineMath: [ ['$','$'], ['\\(','\\)'] ],
  45. processEscapes: true,
  46. preview: "none"
  47. },
  48. showMathMenu: false,
  49. showMathMenuMSIE: false,
  50. menuSettings: {
  51. inTabOrder: false
  52. },
  53. messageStyle: "none",
  54. TeX: {
  55. extensions: ["cancel.js", "color.js", "mhchem.js"]
  56. },
  57. "HTML-CSS" : {
  58. availableFonts : [],
  59. preferredFont : null,
  60. webFont : "STIX-Web",
  61. imageFont : null,
  62. scale: 92
  63. }
  64. });
  65. </script>
  66. {%- block mathjax -%}
  67. {%- if __USE_MATHJAX__ -%}
  68. <script src="{{ asset('build/load_math_jax.js') }}"></script>
  69. {%- endif -%}
  70. {%- endblock -%}
  71. {{- include("@ABaCusCore/hotjar.html.twig") -}}
  72. </head>
  73. <body class="{{ bodyClass }} {{ scope }}" style="{{ bodyStyle }}" data-event-logger-route="{{ path('log_event') }}">
  74. {% block header %}{% endblock %}
  75. {% block dialogs %}{% endblock %}
  76. {% block navigation %}{% endblock %}
  77. <main class="{{ bodyClass }}">
  78. {% block content %}{% endblock %}
  79. {% block snackbar %}{% endblock %}
  80. </main>
  81. <script> window.system_topic = "{{ system_topic }}" </script>
  82. {%- if app.environment == "production" -%}
  83. <script> window.sentry_dsn = "{{ sentry_js_dsn }}"; </script>
  84. <script src="{{ asset('build/sentry_init.js') }}"></script>
  85. {%- endif -%}
  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>