@@ -20,6 +20,63 @@ class FastForwardView
20
20
)
21
21
@element .appendChild (@button )
22
22
23
+ # Create style
24
+ style = document .createElement (' style' )
25
+ style .textContent += ' #fast-forward {
26
+ width: 300px;
27
+ height: 800px;
28
+ padding-left: 1em;
29
+ padding-right: 1em; }'
30
+ style .textContent += ' .codeSnippet {
31
+ font-family: Consolas;
32
+ color: black;
33
+ border-style: solid;
34
+ border-width: thin;
35
+ border-radius: 5px;
36
+ background-color: darkgray;
37
+ padding: 5px;
38
+ margin: 5px 5px 5px; }'
39
+ style .textContent += ' code {
40
+ color: black;
41
+ background-color: darkgray;
42
+ padding: 0px 3px 0px 3px; }'
43
+ style .textContent += ' #next { }'
44
+ @element .appendChild (style)
45
+
46
+ # Create heading (title)
47
+ heading = document .createElement (' h1' )
48
+ heading .textContent = " Page Title"
49
+ @element .appendChild (heading)
50
+
51
+ # Create main body section
52
+ message = document .createElement (' div' )
53
+ message .id = " mainbody"
54
+ message .classList .add (' message' )
55
+ @element .appendChild (message)
56
+
57
+ intro = document .createElement (' p' )
58
+ intro .textContent = " Main Body section"
59
+ message .appendChild (intro)
60
+
61
+ # Create sample code section
62
+ code = document .createElement (' pre' )
63
+ message .classList .add (' codeSnippet' )
64
+ message .textContent = ' console.log("This is code");'
65
+ @element .appendChild (message)
66
+
67
+ # Create sample hint section
68
+ hint = document .createElement (' div' )
69
+ hint .id = " hint"
70
+ hint .textContent = " Hint section (default hidden)"
71
+ @element .appendChild (hint)
72
+
73
+ # Create next button
74
+ @next = document .createElement (' button' )
75
+ @next .classList .add (' btn' )
76
+ @next .classList .add (' btn-primary' )
77
+ @next .textContent = " Next"
78
+ @element .appendChild (@next )
79
+
23
80
# Returns an object that can be retrieved when package is activated
24
81
serialize : ->
25
82
0 commit comments