-
Notifications
You must be signed in to change notification settings - Fork 5
js calc prt 1 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <link rel = "stylesheet" href = "styles.css"> | ||
| <h1><a href = standard.html>Standard</a> | Scientific</h1> | ||
| <div class = "calculator"> | ||
| <div class = "calculator_display">0</div> | ||
| <div class = "calculator_keys_scientific"> | ||
| <button style = "background-color: gainsboro">Rad | Deg</button> | ||
| <button style = "background-color: gainsboro">x!</button> | ||
| <button style = "background-color: gainsboro">(</button> | ||
| <button style = "background-color: gainsboro">)</button> | ||
| <button style = "background-color: gainsboro">%</button> | ||
| <button style = "background-color: gainsboro">AC</button> | ||
| <button>Inv</button> | ||
| <button>Sin</button> | ||
| <button>In</button> | ||
| <button>7</button> | ||
| <button>8</button> | ||
| <button>9</button> | ||
| <button style = "background-color: gainsboro">/</button> | ||
| <button>π</button> | ||
| <button>Cos</button> | ||
| <button>log</button> | ||
| <button>4</button> | ||
| <button>5</button> | ||
| <button>6</button> | ||
| <button style = "background-color: gainsboro">*</button> | ||
| <button>e</button> | ||
| <button>Tan</button> | ||
| <button>√</button> | ||
| <button>1</button> | ||
| <button>2</button> | ||
| <button>3</button> | ||
| <button style = "background-color: gainsboro">-</button> | ||
| <button>Ans</button> | ||
| <button>EXP</button> | ||
| <button>x<sup>y</sup></button> | ||
| <button>0</button> | ||
| <button>.</button> | ||
| <button style = "background-color: dodgerblue">=</button> | ||
| <button style = "background-color: gainsboro">+</button> | ||
| </div> | ||
| </div> | ||
|
|
||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <link rel = "stylesheet" href = "styles.css"> | ||
| <h1>Standard | <a href = scientific.html>Scientific</a></h1> | ||
| <div class = "calculator"> | ||
| <div class = "calculator_display">0</div> | ||
| <div class = "calculator_keys_standard"> | ||
| <button style = "background-color: gainsboro">(</button> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inline styling is ok, just use it sparingly |
||
| <button style = "background-color: gainsboro">)</button> | ||
| <button style = "background-color: gainsboro">%</button> | ||
| <button style = "background-color: gainsboro">AC</button> | ||
| <button>7</button> | ||
| <button>8</button> | ||
| <button>9</button> | ||
| <button style = "background-color: gainsboro">/</button> | ||
| <button>4</button> | ||
| <button>5</button> | ||
| <button>6</button> | ||
| <button style = "background-color: gainsboro">*</button> | ||
| <button>1</button> | ||
| <button>2</button> | ||
| <button>3</button> | ||
| <button style = "background-color: gainsboro">-</button> | ||
| <button>0</button> | ||
| <button>.</button> | ||
| <button style = "background-color: dodgerblue">=</button> | ||
| <button style = "background-color: gainsboro">+</button> | ||
| </div> | ||
| </div> | ||
|
|
||
| </html> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| .calculator_keys_standard { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Awesome use of css grid!!! |
||
| display: grid; | ||
| grid-template-columns: auto auto auto auto; | ||
| grid-template-rows: auto auto auto auto auto; | ||
|
|
||
| } | ||
|
|
||
| .calculator_keys_scientific { | ||
| display: grid; | ||
| grid-template-columns: auto auto auto auto auto auto auto; | ||
| grid-template-rows: auto auto auto auto auto; | ||
| grid: float; | ||
| } | ||
|
|
||
| .calculator { | ||
| border-style: solid; | ||
|
|
||
| } | ||
|
|
||
| .calculator_display { | ||
| position: right; | ||
| } | ||
|
|
||
| html { | ||
| max-width: 500px; | ||
| max-height: 500px; | ||
| } | ||
|
|
||
| h1 { | ||
| font-size: 20px; | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Buttons should have margin (-1) Great work! 93/100 |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on your html, we will have to implement this button functionally as a toggle. More on that when we get back into JS