forked from hedyorg/hedy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout.html
120 lines (119 loc) · 8.93 KB
/
layout.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!doctype html>
<html lang="{{ g.lang }}" class="notranslate" translate="no">
<head>
<title>{% if page_title %}{{page_title}}{% else %}Hedy{% endif %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Balsamiq+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap">
<link rel="stylesheet" href="{{static('/css/generated.css')}}">
<link rel="stylesheet" href="{{static('/css/additional.css')}}">
<link rel="icon" type="image/png" href="{{static('/images/Hedy-logo-96x96.png')}}"/>
<link rel="stylesheet" href="{{static('/fontawesome/css/all.min.css')}}"/>
</head>
<body id="main_container" dir="{{ g.dir }}" class="bg-gray-100">
{% if intro_tutorial or tutorial %}
<div id="tutorial-mask" class="hidden fixed bg-black z-30 w-full h-full opacity-50"></div>
{% endif %}
<noscript>Hedy requires Javascript to be enabled in your browser.</noscript>
<div id="modal-mask" class="hidden fixed bg-black z-50 w-full h-full opacity-75"></div>
<div id="modal-content" class="hidden fixed z-50 p-12 px-16 bg-blue-400 border-2 border-gray-400 rounded-lg text-lg text-center" style="top: 40%; left: 50%; transform: translate(-50%, -50%);">
<div id="modal-confirm" class="hidden">
<div id="modal-confirm-text" class="text-white mb-8 text-xl"></div>
<div class="ltr:ml-auto rtl:mr-auto ltr:mr-auto rtl:ml-auto mt-4 flex flex-row justify-center">
<button id="modal-yes-button" data-cy="modal_yes_button" class="green-btn block m-4 w-40 pb-4 pt-4">{{_('yes')}}</button>
<button id="modal-no-button" class="red-btn block m-4 w-40 pb-4 pt-4">{{_('no')}}</button>
</div>
</div>
<div id="modal-prompt" class="hidden">
<div id="modal-prompt-text" class="text-white mb-8 text-xl"></div>
<div class="xm-auto">
<input id="modal-prompt-input" type="text" class="border border-green-400 rounded p-2 px-3 w-4/5 mt-1">
<div class="mt-4 flex flex-row justify-center">
<button id="modal-ok-button" class="green-btn block m-4 w-40 pb-4 pt-4">{{_('ok')}}</button>
<button id="modal-cancel-button" class="red-btn block m-4 w-40 pb-4 pt-4">{{_('cancel')}}</button>
</div>
</div>
</div>
<div id="modal-copy" class="hidden">
<div class="absolute top-2 right-2">
<svg class="fill-current h-12 w-12 ml-auto text-white cursor-pointer" id="modal-copy-close-button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<title>Close</title>
<path d="M14.348 14.849a1.2 1.2 0 0 1-1.697 0L10 11.819l-2.651 3.029a1.2 1.2 0 1 1-1.697-1.697l2.758-3.15-2.759-3.152a1.2 1.2 0 1 1 1.697-1.697L10 8.183l2.651-3.031a1.2 1.2 0 1 1 1.697 1.697l-2.758 3.152 2.758 3.15a1.2 1.2 0 0 1 0 1.698z"/>
</svg></div>
<div id="modal-copy-title" class="text-white mb-8 text-xl hidden"></div>
<div id="modal-copy-text" class="text-white mb-8 text-xl"></div>
<div id="modal-copy-buttons" class="ltr:ml-auto rtl:mr-auto ltr:mr-auto rtl:ml-auto mt-4 flex flex-row justify-center">
<button id="modal-copy-button" class="green-btn block m-4 w-40 pb-4 pt-4">{{_('copy_link_to_share')}}</button>
</div>
</div>
<div id="modal-repair" class="hidden">
<div class="absolute top-2 right-2">
<svg class="fill-current h-12 w-12 ml-auto text-white cursor-pointer" id="modal-repair-button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<title>Close</title>
<path d="M14.348 14.849a1.2 1.2 0 0 1-1.697 0L10 11.819l-2.651 3.029a1.2 1.2 0 1 1-1.697-1.697l2.758-3.15-2.759-3.152a1.2 1.2 0 1 1 1.697-1.697L10 8.183l2.651-3.031a1.2 1.2 0 1 1 1.697 1.697l-2.758 3.152 2.758 3.15a1.2 1.2 0 0 1 0 1.698z"/>
</svg></div>
<div id="modal-repair-title" class="text-white mb-8 text-xl hidden"></div>
<div id="modal-repair-text" class="text-white mb-8 text-xl"></div>
</div>
<div id="modal-preview" class="hidden">
<div class="absolute top-2 right-2">
<svg class="fill-current h-8 w-8 text-white cursor-pointer" id="modal-preview-button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<title>Close</title>
<path d="M14.348 14.849a1.2 1.2 0 0 1-1.697 0L10 11.819l-2.651 3.029a1.2 1.2 0 1 1-1.697-1.697l2.758-3.15-2.759-3.152a1.2 1.2 0 1 1 1.697-1.697L10 8.183l2.651-3.031a1.2 1.2 0 1 1 1.697 1.697l-2.758 3.152 2.758 3.15a1.2 1.2 0 0 1 0 1.698z"/>
</svg></div>
<div id="modal-preview-title" class="text-black mb-4 text-2xl"></div>
<div id="modal-preview-content"></div>
</div>
</div>
<div id="modal-alert" class="z-50 fixed hidden" role="alert" style="top: 10%; left: 50%; transform: translate(-50%, -50%);">
<div id="modal_alert_container" class="mx-auto text-center bg-green-100 border-green-400 text-green-700 border rounded px-4 py-3">
<span id="modal_alert_title" class="block sm:inline"></span>
<span id="modal_alert_text" data-cy="modal_alert_text" class="block sm:inline"></span>
<svg class="fill-current h-6 w-6 text-green-500 block sm:inline" id="modal-alert-button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><title>Close</title><path d="M14.348 14.849a1.2 1.2 0 0 1-1.697 0L10 11.819l-2.651 3.029a1.2 1.2 0 1 1-1.697-1.697l2.758-3.15-2.759-3.152a1.2 1.2 0 1 1 1.697-1.697L10 8.183l2.651-3.031a1.2 1.2 0 1 1 1.697 1.697l-2.758 3.152 2.758 3.15a1.2 1.2 0 0 1 0 1.698z"/></svg>
</div>
</div>
<div class="min-h-screen">
{% if menu != False %}
{% include "incl/menubar.html" %}
{% endif %}
{# Can't reindent this as it may contain preformatted code blocks whose indentation is important. #}
{% block full_width_content %}{% endblock %}
<canvas id="confetti" style="width: 60vw;" class="hidden"></canvas>
</div>
<div id="achievement_pop-up" class="z-30 fixed hidden" style="width: 500px; top: 40%; left: 50%; transform: translate(-50%, -50%);">
<div class="absolute top-2 right-2 cursor-pointer" onclick="hedyApp.closeAchievement();">
<svg class="fill-current h-8 w-8 text-blue-600" id="modal-repair-button" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<title>{{_('close')}}</title>
<path d="M14.348 14.849a1.2 1.2 0 0 1-1.697 0L10 11.819l-2.651 3.029a1.2 1.2 0 1 1-1.697-1.697l2.758-3.15-2.759-3.152a1.2 1.2 0 1 1 1.697-1.697L10 8.183l2.651-3.031a1.2 1.2 0 1 1 1.697 1.697l-2.758 3.152 2.758 3.15a1.2 1.2 0 0 1 0 1.698z"/>
</svg>
</div>
<div class="border-blue-600 border-8 bg-white border-black rounded-lg p-8 text-center text-black shadow-2xl">
<div>{{_('achievement_earned')}}</div>
<h3 class="text-pink-500 text-2xl mb-4" id="achievement_reached_title"><achievement_reached_title></h3>
<img id="achievement_reached_image" src="{{static('/images/achievement-320x320.png')}}" loading="lazy" class="h-32 my-8 mx-auto" alt="{{_('achievements_logo_alt')}}">
<div id="achievement_reached_text" class="text-xl my-4"><achievement_reached_text></div>
<div id="achievement_reached_statics" class="text-sm text-gray-500" class="italic"><achievement_reached_statics></div>
</div>
</div>
{% block scripts %}
<script src="{{static('/vendor/jquery.min.js')}}" type="text/javascript" crossorigin="anonymous"></script>
<script src="{{static('/vendor/js-confetti.browser.js')}}" type="text/javascript" crossorigin="anonymous"></script>
<script src="{{static('/vendor/skulpt.min.js')}}" type="text/javascript" crossorigin="anonymous"></script>
<script src="{{static('/vendor/skulpt-stdlib.js')}}" type="text/javascript" crossorigin="anonymous"></script>
<script src="{{static('/vendor/ace.js')}}" type="text/javascript" charset="utf-8" crossorigin="anonymous"></script>
<script src="{{static('/vendor/ext-whitespace.js')}}" type="text/javascript" charset="utf-8" crossorigin="anonymous"></script>
<script src="{{static('/vendor/ext-rtl.js')}}" type="text/javascript" charset="utf-8" crossorigin="anonymous"></script>
<script src="{{static('/js/appbundle.js')}}" type="text/javascript" crossorigin="anonymous"></script>
{% block additional_scripts %}{% endblock %}
{# We must mark the JSON safe -- in script tags HTML entities are not allowed #}
<script>hedyApp.initialize({
lang: {{ g.lang|tojson|safe }},
level: {{ level|tojson|safe }},
keyword_language: {{ g.keyword_lang|tojson|safe }},
{% if initialize_logs %}logs: true,{% endif %}
javascriptPageOptions: {{ javascript_page_options|tojson|safe }},
});</script>
{% endblock %}
</body>
</html>