Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* docs: base tutorial update * more docs * zzz * remove unused images Co-authored-by: Erick Zhao <erick@hotmail.ca>
- Loading branch information
1 parent
0b26e76
commit f49f748
Showing
23 changed files
with
2,009 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
http-equiv="Content-Security-Policy" | ||
content="default-src 'self'; script-src 'self'" | ||
/> | ||
<meta | ||
http-equiv="X-Content-Security-Policy" | ||
content="default-src 'self'; script-src 'self'" | ||
/> | ||
<title>Hello from Electron renderer!</title> | ||
</head> | ||
<body> | ||
<h1>Hello from Electron renderer!</h1> | ||
<p>👋</p> | ||
<p id="info"></p> | ||
</body> | ||
<script src="./renderer.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const { app, BrowserWindow } = require('electron'); | ||
|
||
const createWindow = () => { | ||
const win = new BrowserWindow({ | ||
width: 800, | ||
height: 600, | ||
}); | ||
|
||
win.loadFile('index.html'); | ||
}; | ||
|
||
app.whenReady().then(() => { | ||
createWindow(); | ||
|
||
app.on('activate', () => { | ||
if (BrowserWindow.getAllWindows().length === 0) { | ||
createWindow(); | ||
} | ||
}); | ||
}); | ||
|
||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit(); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta | ||
http-equiv="Content-Security-Policy" | ||
content="default-src 'self'; script-src 'self'" | ||
/> | ||
<meta | ||
http-equiv="X-Content-Security-Policy" | ||
content="default-src 'self'; script-src 'self'" | ||
/> | ||
<title>Hello from Electron renderer!</title> | ||
</head> | ||
<body> | ||
<h1>Hello from Electron renderer!</h1> | ||
<p>👋</p> | ||
<p id="info"></p> | ||
</body> | ||
<script src="./renderer.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const { app, BrowserWindow } = require('electron'); | ||
const path = require('path'); | ||
|
||
const createWindow = () => { | ||
const win = new BrowserWindow({ | ||
width: 800, | ||
height: 600, | ||
webPreferences: { | ||
preload: path.join(__dirname, 'preload.js'), | ||
}, | ||
}); | ||
|
||
win.loadFile('index.html'); | ||
}; | ||
|
||
app.whenReady().then(() => { | ||
createWindow(); | ||
|
||
app.on('activate', () => { | ||
if (BrowserWindow.getAllWindows().length === 0) { | ||
createWindow(); | ||
} | ||
}); | ||
}); | ||
|
||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit(); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { contextBridge } = require('electron'); | ||
|
||
contextBridge.exposeInMainWorld('versions', { | ||
node: () => process.versions.node, | ||
chrome: () => process.versions.chrome, | ||
electron: () => process.versions.electron, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const information = document.getElementById('info'); | ||
information.innerText = `This app is using Chrome (v${versions.chrome()}), Node.js (v${versions.node()}), and Electron (v${versions.electron()})`; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.