Skip to content

Commit

Permalink
Initial scaffolding.
Browse files Browse the repository at this point in the history
  • Loading branch information
roncli committed Oct 31, 2016
1 parent 618e077 commit e2fc490
Show file tree
Hide file tree
Showing 8 changed files with 156 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode
node_modules
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 Ronald M. Clifford
Copyright (c) 2016 Ronald M. Clifford <roncli@roncli.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
34 changes: 34 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const {app, BrowserWindow} = require("electron");

var win,
createWindow = () => {
win = new BrowserWindow({show: false, width: 800, height: 600, minWidth: 640, minHeight: 480});
win.loadURL("file://" + __dirname + "/site/index.htm");
win.toggleDevTools();
win.setMenu(null);
win.maximize();

win.once("ready-to-show", () => {
win.show();
});

win.on("closed", () => {
win = null;
});
};

app.disableHardwareAcceleration();

app.on("ready", createWindow);

app.on("window-all-closed", () => {
if (process.platform !== "darwin") {
app.quit();
}
});

app.on("activate", () => {
if (win === null) {
createWindow();
}
});
11 changes: 11 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "ChatterGrid",
"productName": "ChatterGrid",
"author":{
"name": "Ronald M. Clifford",
"email": "roncli@roncli.com",
"url": "http://www.roncli.com"
},
"version": "0.1.0",
"description": "An application to easily create and share custom soundboards."
}
46 changes: 46 additions & 0 deletions app/site/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
*, *:before, *:after {
box-sizing: border-box;
}

html, body {
height: 100%;
margin: 0;
}

body {
display: flex;
flex-direction: column;
}

#grid {
flex: 1 100%;
background-color: grey;
}

#drop {
flex: 1 100px;
font-size: 50pt;
text-align: center;
background-color: green;
}

#bar {
flex: 1 50px;
background-color: grey;
}

#sounds {
display: flex;
flex-direction: row;
flex-wrap: wrap;
padding-right: 5px;
}

.sound {
width: 25%;
padding: 5px 0 0 5px;
}

.sound div {
background-color: yellow;
}
22 changes: 22 additions & 0 deletions app/site/index.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<html>
<head>
<link rel="stylesheet" href="index.css" />
<script src="index.js"></script>
</head>
<body onload="onLoad();">
<div id="grid">
<div id="sounds">
<div class="sound"><div>Test</div></div>
<div class="sound"><div>Test</div></div>
<div class="sound"><div>Test</div></div>
<div class="sound"><div>Test</div></div>
<div class="sound"><div>Test</div></div>
</div>
</div>
<div id="drop">
Drop audio file here to add to the grid!
</div>
<div id="bar">
</div>
</body>
</html>
14 changes: 14 additions & 0 deletions app/site/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
onLoad = () => {
window.addEventListener("dragover", (ev) => {
ev.preventDefault();
}, false);

window.addEventListener("drop", (ev) => {
var files;

ev.preventDefault();
if (ev.target.id === "drop") {
files = ev.dataTransfer.files;
}
}, false);
};
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "ChatterGrid",
"productName": "ChatterGrid",
"version": "0.1.0",
"build": {
"appId": "com.electron.chattergrid",
"productName": "ChatterGrid",
"compression": "maximum",
"win": {
"icon": "icon.ico"
}
},
"scripts": {
"pack": "node_modules/.bin/build.cmd --dir",
"dist": "node_modules/.bin/build.cmd"
},
"devDependencies": {
"electron-builder": "7.15.2",
"electron-prebuilt": "1.4.4"
},
"repository": {
"type": "git",
"url": "https://github.com/roncli/ChatterGrid"
},
"license": "MIT"
}

0 comments on commit e2fc490

Please sign in to comment.