-
Notifications
You must be signed in to change notification settings - Fork 2
/
sidebar.html
69 lines (65 loc) · 2.34 KB
/
sidebar.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
<template name="bulletin_sidebar">
<div class="bb-sidebar-content">
<div class="bb-sidebar-box">
{{> whiteboard}}
</div>
<div class="bb-sidebar-box">
<h3>Puzzles for You</h3>
{{#if suggestions.length}}
{{#each suggestions}}
{{# unless solved }}
{{> bulletin_puzzle _id=_id puzzle=this}}
{{/unless}}
{{/each}}
{{else}}
No recommendations yet! Try specifying some of your favorite mechanics.
{{/if}}
</div>
</div>
</template>
<!-- Whiteboard-specific templates -->
<template name="whiteboard">
<h3>Whiteboard</h3>
{{#if whiteboardEditing}}
{{> whiteboard_textbox text=whiteboardMd}}
{{else}}
<div id="whiteboard-content" class="whiteboard-content">{{{whiteboardHtml}}}</div>
<div id="whiteboard-timestamp">{{whiteboardTimeDisplay}}</div>
{{/if}}
</template>
<!-- Needs its own onRender function -->
<template name="whiteboard_textbox">
<textarea
id="whiteboard-textbox"
class="whiteboard-textbox"
autofocus="true">{{this.text}}</textarea> <!-- No extra spaces here! -->
</template>
<!-- Puzzle-suggestion-specific templates -->
<template name="bulletin_puzzle">
<tr class="puzzle" data-puzzle-id="{{puzzle._id}}">
{{> bulletin_puzzle_content}}
</tr>
</template>
<template name="bulletin_puzzle_content">
{{link id=puzzle._id editing=canEdit}}
<div class="puzzle-and-mechanics">
{{#if puzzle.link}}<a href="{{puzzle.link}}" title="Link to hunt site" target="_blank" style="margin-left: 5px;"><i class="fas fa-puzzle-piece"></i></a>{{/if}}
{{#with puzzle}}
{{#if mechanics.length}}
{{#each mechanics}}
{{#if mechanicName}} <!-- check for mechanics that have been removed -->
<span class="mechanic-bubble {{#if yourFavoriteMechanic}}favorite-mechanic{{/if}}">{{mechanicName}}</span>
{{/if}}
{{/each}}
{{/if}}
{{/with}}
</div>
<ul>
{{#each puzzle.reasons}}
<li>{{this}}</li>
{{/each}}
</ul>
<button class="btn btn-small btn-inverse bb-later" data-id="{{puzzle._id}}">
later
</button>
</template>