-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
193 lines (168 loc) · 6.3 KB
/
index.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
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
<html>
<head>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/night.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/atom-one-dark.css">
<!-- Style overrides for this presentation -->
<link rel="stylesheet" href="css/presentation.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>Intro to Electron</h1>
<img src="img/electron-logo-dark.png" />
<div class="social-media">
<a href="http://www.twitter.com/chriskwan">
<img src="img/Twitter_Social_Icon_Circle_White.png" class="social-media-icon"/>
</a>
<a href="http://www.github.com/chriskwan">
<img src="img/GitHub-Mark-Light-120px-plus.png" class="social-media-icon"/>
</a>
<span class="social-media-handle">@chriskwan</span>
</div>
</section>
<section>
<h2>Raise your hand if you use...</h2>
<div class="app-icons">
<img src="img/vscode.png" class="fragment" />
<img src="img/atom-mac.png" class="fragment" />
<img src="img/slack.png" class="fragment" />
</div>
</section>
<section>
<h2>You've used</h2>
<img src="img/electron-banner.svg"/>
</section>
<section>
<h2>What is Electron?</h2>
<div class="app-icons">
<img src="img/octocat.png" />
<img src="img/atom.png" />
</div>
</section>
<section>
<h2>Why desktop apps?</h2>
<div class="app-icons">
<img src="img/windows.png" />
<img src="img/osx.png" />
<img src="img/linux.png" />
</div>
</section>
<section>
<h2>Why Electron?</h2>
<div class="app-icons">
<img src="img/chromium.png" class="fragment" />
<img src="img/nodejs-white.png" class="fragment" />
<img src="img/npm.png" class="fragment" />
</div>
</section>
<section>
<h2>Anatomy of an Electron app</h2>
<ol>
<li>
package.json
</li>
<li>
index.js (Main Process)
</li>
<li>
index.html (Renderer Process)
</li>
</ol>
</section>
<section>
<h2>package.json</h2>
<pre>
<code class="json" data-trim>
{
"name": "electron-bare-bones",
"version": "0.1.0",
"main": "index.js"
}
</code>
</pre>
</section>
<section>
<h2>index.js (Main Process)</h2>
<pre>
<code class="javascript" data-trim>
const electron = require('electron')
let win // global ref so window is not closed with JS is garbage collected
electron.app.on('ready', () => {
win = new electron.BrowserWindow({ width: 800, height: 600 })
win.loadURL(`file://${__dirname}/index.html`)
})
</code>
</pre>
</section>
<section>
<h2>index.html (Renderer Process)</h2>
<pre>
<code class="html" data-trim>
<!DOCTYPE html>
<html>
<head>
<title>Electron Bare Bones App</title>
</head>
<body>
<h1>Hello World</h1>
<script>
alert('Hi!')
</script>
</body>
</html>
</code>
</pre>
</section>
<section>
<h2>Demo</h2>
</section>
<section>
<h2>Learn More</h2>
<ul>
<li>
Electron website (docs and tutorials):
<a href="http://electron.atom.io/">
electron.atom.io
</a>
</li>
<li>
This talk (and code):
<a href="https://github.com/chriskwan/electron-lightning-talk">
github.com/chriskwan/electron-lightning-talk
</a>
</li>
</ul>
<div class="social-media">
<a href="http://www.twitter.com/chriskwan">
<img src="img/Twitter_Social_Icon_Circle_White.png" class="social-media-icon social-media-icon-small"/>
</a>
<a href="http://www.github.com/chriskwan">
<img src="img/GitHub-Mark-Light-120px-plus.png" class="social-media-icon social-media-icon-small"/>
</a>
<span class="social-media-handle social-media-handle-small">@chriskwan</span>
</div>
</section>
</div>
</div>
<!-- Script loader for dependencies -->
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'convex', // none/fade/slide/convex/concave/zoom
transitionSpeed: 'slow',
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } } ]
});
</script>
</body>
</html>