forked from CCALI/a2jviewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.stache
76 lines (72 loc) · 2.55 KB
/
app.stache
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
<can-import from="~/src/mobile/" />
<can-import from="~/src/debug-alerts/"/>
<can-import from="~/src/debug-menu/"/>
<can-import from="~/src/slideout-content/"/>
<can-import from="~/src/debug-panel/" />
<can-import from="~/src/desktop/" />
<can-import from="~/src/modal/" />
<div style="display: none;">
{{! canjs 'value' behavior only respects the 'listenTo' stream when we are actively bound to the property in stache or route }}
{{! fixes several edge cases in author's preview where the wrong loop value answer/var is shown }}
rvv {{appState.repeatVarValue}} olvv {{appState.outerLoopVarValue}}
</div>
{{#if(isMobile)}}
<a2j-mobile-viewer
lang:from="lang"
logic:from="logic"
appState:from="appState"
pState:from="pState"
mState:from="mState"
interview:from="interview"
traceMessage:to="traceMessage"
class="bootstrap-styles" />
{{else}}
{{#if(appState.showDebugPanel)}}
<div class="slideout-content">
<slideout-content
appState:from="appState"
interview:from="interview"
traceMessage:from="appState.traceMessage" />
</div>
{{/if}}
{{#if(appState.useMobileUI)}}
<div class="prefers-minimal-interface {{#if(appState.showDebugPanel)}}with-slideout-content{{/if}}">
<a2j-mobile-viewer
lang:from="lang"
logic:from="logic"
appState:from="appState"
pState:from="pState"
mState:from="mState"
interview:from="interview"
traceMessage:to="traceMessage"
class="bootstrap-styles" />
</div>
<debug-menu appState:from="appState" />
{{else}}
<div id="viewer-app" {{#if(appState.showDebugPanel)}}class="with-slideout-content"{{/if}}>
{{ let remainingSteps = null, maxDisplayedSteps = null }}
<a2j-desktop-viewer
remainingSteps:to="remainingSteps"
maxDisplayedSteps:to="maxDisplayedSteps"
showDebugPanel:from="appState.showDebugPanel"
lang:from="lang"
logic:from="logic"
appState:from="appState"
pState:from="pState"
mState:from="mState"
interview:from="interview"
class="bootstrap-styles steps-left-{{remainingSteps}} steps-{{maxDisplayedSteps}}" />
<debug-menu appState:from="appState" />
{{#if(appState.viewerAlertMessages.length)}}
<author-debug-alerts alertMessages:from="appState.viewerAlertMessages" />
{{/if}}
</div>
{{/if}}
{{/if}}
<a2j-modal
appState:from="appState"
modalContent:from="appState.modalContent"
mState:from="mState"
logic:from="logic"
interview:from="interview"
class="bootstrap-styles" />