-
Notifications
You must be signed in to change notification settings - Fork 0
/
storyinclude_headerfooter.tw
65 lines (56 loc) · 2.11 KB
/
storyinclude_headerfooter.tw
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
::PassageReady [nobr]
<<print Story.get($lang + "_common_phrases").processText();>>
::PassageHeader [header nobr]
<header>
<<if passage() is "Start" || tags().includes("avatar_placard")>><<audio "placard_chime" play>><</if>>
<<AnswersToGrade $cnt_answer_correct $cnt_answer_incorrect $cnt_answer_fixed>>
<div class="greeting">
<<include StoryBanner>>
<<include StoryCaption>>
</div>
<<if passage() is not "Start">>
<div class="progress-grid-container">
<div class="progress-grid-item reaction" id="avatar">
<<GenerateAvatar>>
</div>
<<script>>
var k, part_k_class, markup = "";
for(k = 1; k <= 6; k++) {
if(tags().includes('part_' + k)) {
part_k_class = "active";
}
else if(visitedTags('part_' + k) || (k == 6 && tags().includes("part_99"))) {
part_k_class = "visited";
}
else {
part_k_class = "unvisited";
}
markup = markup + '<div class="progress-grid-item part_' + k + ' ' + part_k_class + '"><span>' + k + '</span>';
markup = markup + '<div class="progress-line';
if(k == 1) { markup = markup + ' start'; } else if(k == 6) { markup = markup + ' end '; }
markup = markup + '"></div>';
markup = markup + '</div>';
}
jQuery(this.output).wiki(markup);
<</script>>
</div>
<</if>>
</header>
::PassageFooter [footer nobr]
<footer>
<div class="fineprint">
<span class="nowrap"><<print $common_phrases["label_" + $style]>> / </span>
<span class="nowrap"><<link $common_phrases["linktext_restart"]>><<script>>Engine.restart();<</script>><</link>> / </span>
<span class="nowrap">[[$common_phrases["linktext_license"]|$lang + "_license"]] / </span>
<span class="nowrap">[[$common_phrases["linktext_feedback"]|https://library.acadiau.ca/research/tutorials/feedback.html]]</span>
</div>
<<if $debug>>
<<include debug_controls>>
<<include debug_variables_list>>
<<include debug_passages_list>>
<<include debug_avatar_reactions>>
<</if>>
</footer>
<<addclass "body" $font_family>>
<<addclass "body" $font_size>>
<<MemorizeSettings>>