Permalink
Browse files

Completion

  • Loading branch information...
lin-xin committed Aug 27, 2017
1 parent 5b38b51 commit 7f75476fe453ea8c7a3a07d9fc1734ed044d390d
Showing with 236 additions and 68 deletions.
  1. +2 −2 app.js
  2. +22 −20 index.html
  3. +197 −45 static/script/index.js
  4. +15 −1 static/style/index.css
View
4 app.js
@@ -11,9 +11,9 @@ function createWindow() {
width: 390,
height: 670,
fullscreen: false,
// resizable: false
resizable: false
});
win.webContents.openDevTools();
// win.webContents.openDevTools();
win.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file',
View
@@ -12,48 +12,50 @@
<div class="keyboard-special">
<div class="keyboard-item" onClick="main.clickSpecial('1')">x<sup>2</sup></div>
<div class="keyboard-item" onClick="main.clickSpecial('2')">x<sup>3</sup></div>
<div class="keyboard-item" onClick="main.clickSpecial('3')">x<sup>y</sup></div>
<div class="keyboard-item" onClick="main.clickSpecial('3',this)">x<sup>y</sup></div>
<div class="keyboard-item" onClick="main.clickSpecial('4')">10<sup>x</sup></div>
<div class="keyboard-item" onClick="main.clickSpecial('5')">1/x</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">
<div class="keyboard-item" onClick="main.clickSpecial('6')">
<span class="radic-span">&radic;</span><span class="radic-number radic-number-2">x</span>
</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">
<div class="keyboard-item" onClick="main.clickSpecial('7')">
<span class="radic-span">&radic;</span><span class="radic-number radic-number-3">x</span>
</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">
<div class="keyboard-item" onClick="main.clickSpecial('8',this)">
<span class="radic-span">&radic;</span><span class="radic-number radic-number-y">x</span>
</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">sin</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">cos</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">tan</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">e</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">sinh</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">cosh</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">tanh</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">π</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">x!</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">ln</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">log</div>
<div class="keyboard-item" onClick="main.clickSpecial('')">exp</div>
<div class="keyboard-item" onClick="main.clickSpecial('9')">sin</div>
<div class="keyboard-item" onClick="main.clickSpecial('10')">cos</div>
<div class="keyboard-item" onClick="main.clickSpecial('11')">tan</div>
<div class="keyboard-item" onClick="main.clickSpecial('12')">e</div>
<div class="keyboard-item" onClick="main.clickSpecial('13')">sinh</div>
<div class="keyboard-item" onClick="main.clickSpecial('14')">cosh</div>
<div class="keyboard-item" onClick="main.clickSpecial('15')">tanh</div>
<div class="keyboard-item" onClick="main.clickSpecial('16')">π</div>
<div class="keyboard-item" onClick="main.clickSpecial('17')">x!</div>
<div class="keyboard-item" onClick="main.clickSpecial('18')">ln</div>
<div class="keyboard-item" onClick="main.clickSpecial('19')">
<span class="log-span">log</span>
</div>
<div class="keyboard-item" onClick="main.clickSpecial('20')">exp</div>
</div>
<div class="keyboard-normal">
<div class="keyboard-item reg-btn" onClick="main.reset()">AC</div>
<div class="keyboard-item" onClick="main.clickOperat('+/-')">+/-</div>
<div class="keyboard-item" onClick="main.clickOperat('%')">%</div>
<div class="keyboard-item orange" onClick="main.clickOperat('/')">÷</div>
<div class="keyboard-item orange" onClick="main.clickOperat('/',this)">÷</div>
<div class="keyboard-item" onClick="main.clickNumber('7')">7</div>
<div class="keyboard-item" onClick="main.clickNumber('8')">8</div>
<div class="keyboard-item" onClick="main.clickNumber('9')">9</div>
<div class="keyboard-item orange" onClick="main.clickOperat('*')">×</div>
<div class="keyboard-item orange" onClick="main.clickOperat('*',this)">×</div>
<div class="keyboard-item" onClick="main.clickNumber('4')">4</div>
<div class="keyboard-item" onClick="main.clickNumber('5')">5</div>
<div class="keyboard-item" onClick="main.clickNumber('6')">6</div>
<div class="keyboard-item orange" onClick="main.clickOperat('-')">-</div>
<div class="keyboard-item orange" onClick="main.clickOperat('-',this)">-</div>
<div class="keyboard-item" onClick="main.clickNumber('1')">1</div>
<div class="keyboard-item" onClick="main.clickNumber('2')">2</div>
<div class="keyboard-item" onClick="main.clickNumber('3')">3</div>
<div class="keyboard-item orange" onClick="main.clickOperat('+')">+</div>
<div class="keyboard-item orange" onClick="main.clickOperat('+',this)">+</div>
<div class="keyboard-item large" onClick="main.clickNumber('0')">0</div>
<div class="keyboard-item" onClick="main.clickNumber('.')">.</div>
<div class="keyboard-item orange" onClick="main.clickEqual()">=</div>
Oops, something went wrong.

0 comments on commit 7f75476

Please sign in to comment.