forked from riot/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-help.tag
53 lines (48 loc) · 1005 Bytes
/
app-help.tag
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
<app-help>
<h2>Help</h2>
<p>{ helptext }</p>
<script>
var self = this
self.data = {
first: "This is the help for the first page.",
second: "This is the help for the second page."
}
var r = route.create()
r('*', function(id) {
self.helptext = self.data[id] || 'Help not found.'
self.update()
})
r(function() {
self.helptext = "Click the navigation on the left edge."
self.update()
})
</script>
<style>
:scope {
position: fixed;
top: auto;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 130px;
box-sizing: border-box;
font-family: sans-serif;
margin: 0;
padding: 1em;
text-align: center;
color: #666;
background: #f7f7f7;
}
@media (min-width: 480px) {
:scope {
top: 0;
right: 0;
bottom: auto;
left: auto;
width: 200px;
height: 100%;
}
}
</style>
</app-help>