-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy pathapp-help.riot
52 lines (50 loc) · 986 Bytes
/
app-help.riot
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
<app-help>
<route path="#/:id/(.*)?">
<h2>Help</h2>
<p>
{ getHelpText(route) }
</p>
</route>
<script>
export default {
state: {
data: {
first: "This is the help for the first page.",
second: "This is the help for the second page."
}
},
getHelpText(route) {
const {id} = route.params
return this.state.data[id] || 'Help not found.'
}
}
</script>
<style>
:host {
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) {
:host {
top: 0;
right: 0;
bottom: auto;
left: auto;
width: 200px;
height: 100%;
}
}
</style>
</app-help>