Skip to content

Commit

Permalink
Merge pull request #11 from fukajun/menu-bar
Browse files Browse the repository at this point in the history
Add heaeer and quit button
  • Loading branch information
fukajun committed Mar 26, 2016
2 parents bf968a5 + 88842fc commit 467e857
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
<script src='index.js'></script>

</head>
<body>
<body class='245app'>
<div class='header'><i class='js-quit-icon flaticon-powerbuttons'></i></div>
<webview id='webview' src='http://245cloud.com/' preload='./preload.js'></webview>
</body>
</html>
9 changes: 8 additions & 1 deletion source/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { ipcRenderer } from 'electron';
//
// Renderer

document.addEventListener("DOMContentLoaded", ()=> {
var quitIcon = document.querySelector('.js-quit-icon')
quitIcon.addEventListener('click', ()=> {
if(!confirm('終了しますか?')) {
return
}
ipcRenderer.send('quit')
})
console.log('init')
// Nothing to do
})
9 changes: 8 additions & 1 deletion stylesheets/app.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
body {
padding-top: 30px;
background-color: #f5f5f5;
font-family: Avenir , "Open Sans" , "Helvetica Neue" , Helvetica , Arial , Verdana , Roboto , "游ゴシック" , "Yu Gothic" , "游ゴシック体" , "YuGothic" , "ヒラギノ角ゴ Pro W3" , "Hiragino Kaku Gothic Pro" , "Meiryo UI" , "メイリオ" , Meiryo , "MS Pゴシック" , "MS PGothic" , sans-serif;
margin: 0;
}

.header {
background-color: #eadba0;
color: #337ab7;
padding: 10px;
height: 15px;
text-align: right;
}

0 comments on commit 467e857

Please sign in to comment.