add hello-word demo (#6)

This commit is contained in:
mmouterde 2017-06-27 22:38:44 +02:00
parent 879c3367b0
commit 1523a8d7c2
2 changed files with 52 additions and 0 deletions

16
demo/app.js Normal file
View file

@ -0,0 +1,16 @@
const electron = require('electron');
const app = electron.app;
app.setName('electron-tabs-demo');
app.on('ready', function () {
const mainWindow = new electron.BrowserWindow();
mainWindow.loadURL('file://' + __dirname + '/electron-tabs.html');
mainWindow.on('ready-to-show', function () {
mainWindow.show();
mainWindow.focus();
});
});

36
demo/electron-tabs.html Normal file
View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../electron-tabs.css">
</head>
<body style="margin:0">
<div class="etabs-tabgroup">
<div class="etabs-tabs"></div>
<div class="etabs-buttons"></div>
</div>
<div class="etabs-views"></div>
<script>
//const TabGroup = require('electron-tabs') normally but for demo :
const TabGroup = require("../index");
let tabGroup = new TabGroup();
tabGroup.addTab({
title: 'Google',
src: 'http://google.com',
});
tabGroup.addTab({
title: "Electron",
src: "http://electron.atom.io",
visible: true,
active: true
});
</script>
</body>
</html>