forked from tessel/t1-start
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FRE-module-individual.jade
194 lines (169 loc) · 6.14 KB
/
FRE-module-individual.jade
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
extends layout
block content
.row
.large-12.columns.fre-container
// mixin for the modular formatting of each module's FRE
mixin modulemodule(val, link)
- var imgsrc = s3url +'modules/' + val + '.png'
.row
.large-12.columns.fre-container
span
img(src=imgsrc, style="margin-top:-20px;").constrain-sm
span(style="padding-left:10px;")
if (val == 'ble' || val == 'gprs'|| val == 'gps'|| val == 'ir'|| val == 'nrf'|| val == 'rfid')
h2.leftalign.moduleTitle #{val.toUpperCase()}
else if (val == 'microsd')
h2.leftalign.moduleTitle MicroSD
else
h2.leftalign.moduleTitle #{ucfirst(val)}
span(style="padding-left:20px;")
a(href=link)
i.fa.fa-github View Source
.row(id=val)
.large-12.columns
+#{val}
mixin displayCode(number, code, module, special)
.row
+num_col(number)
.row
.large-12.columns.left
if (special)
p!=special
p Save this code in a text file called <code>#{module}.js</code>:
pre.prettyprint#exampleCode
code.
#{code}
.row
.large-12.columns
.greyBar(style="height:2px;")
// mixins for within the includes
mixin num_col(num)
.large-12.columns
p.moduleStep Step #{num}
mixin normal_row(number, imgsrc, text)
.row
+num_col(number)
.row
.large-6.columns
p !{text}
.large-6.columns
.row
.large-12.columns
- if (imgsrc instanceof Array) {
for src in imgsrc
img(src=src).constrain
- } else {
img(src=imgsrc).constrain
- }
.row
.large-12.columns
.greyBar(style="height:2px;")
mixin project(title, slug, imgUrl)
.large-3.columns
.projects-container
a(href="//www.tessel.hackster.io/" + slug)
.project-image
img(src=imgUrl)
.project-details
.project-title
h5 #{title}
mixin see_video(url)
.row
.large-12.columns
p Follow the directions below or <a href="#{url}"", target=0>view as a video</a>
.row
.large-12.columns
.greyBar(style="height:2px;")
mixin make_directory(number, thismod, special)
.row
+num_col(number)
.row
.large-12.columns
if (special)
p!=special
p
| Make a directory inside your "tessel-code" folder: enter
| <code><cli>mkdir #{thismod}</cli></code>
| into your command line, then change directory into that folder:
| <code><cli>cd #{thismod}</cli></code>
.row
.large-12.columns
.greyBar(style="height:2px;")
mixin seeForums(number, url, thismod, projects)
.row
+num_col(number)
.row
.large-12.columns
p What else can you do with a #{thismod} module? Try a <a href="//tessel.io/projects", target=0>community-created project.</a>
.row
each project in projects
.large-6.columns.left
| !{project}
.row
.large-12.columns
p <br/>What are you making? <a href="//tessel.hackster.io", target=0>Share your invention!</a>
p If you run into any issues you can check out the <a href="#{forumUrl}#{url}">#{thismod} forums</a>.
.row
.large-12.columns
.greyBar(style="height:2px;")
- var modulesPlugged_filepath = s3url+"modules_plugged/"
- var moduleCorners_filepath = s3url+"modules_corners/"
- var moduleGifs_filepath = s3url+"gifs/"
- var moduleSpecial_filepath = s3url+"modules_special/"
- var moduleDocs_filepath = "https://github.com/tessel/"
- var plugIn1 = "Plug the "
- var portA = " module into Tessel <b>port A</b> "
- var portC = " module into Tessel <b>port C</b> "
- var plugIn2End = "with the hexagon/icon side down and the electrical components on the top, then plug Tessel into your computer via USB."
- var plugIn2A = portA + plugIn2End;
- var plugIn2C = portC + plugIn2End;
- var install1 = "Install by typing <code><cli>npm install "
- var install2 = "</cli></code> into the command line."
- var push1 = "In your command line, <code><cli>tessel run "
- var push2 = ".js</cli></code><br/>"
- var moreInfo1 = "<br/><br/>To see what else you can do with the "
- var moreInfo2 = " module, see the module docs <a href='"
- var moreInfo3 = "', target=0>here</a>."
// include all the modules
//each val in moduleList
+modulemodule(displayModule, code.github)
// workaround mixins for fake dynamic includes
mixin accelerometer
include moduleFREs/_accelerometer
mixin ambient
include moduleFREs/_ambient
mixin audio
include moduleFREs/_audio
mixin ble
include moduleFREs/_ble
mixin camera
include moduleFREs/_camera
mixin climate
include moduleFREs/_climate
mixin gprs
include moduleFREs/_gprs
mixin gps
include moduleFREs/_gps
mixin ir
include moduleFREs/_ir
mixin microsd
include moduleFREs/_microsd
mixin nrf
include moduleFREs/_nrf
mixin relay
include moduleFREs/_relay
mixin rfid
include moduleFREs/_rfid
mixin servo
include moduleFREs/_servo
.row
.large-12.columns
h2 Choose another module
p Or if you're all set, move on to <a href="/wifi">Wifi.</a>
include _modulesList.jade
block bottom_nav
.row
.large-6.columns.left
a.bottomButton(href="/blinky" class="button") Prev: Blink lights
.large-6.columns.right
a.bottomButton.right(href="/wifi" class="button") Next: Connect to Wifi