Skip to content

Commit

Permalink
Merge pull request #6 from condef5/master
Browse files Browse the repository at this point in the history
Improve the website UI
  • Loading branch information
r-arvind authored Oct 6, 2018
2 parents 0001386 + 56321f6 commit 7b792f4
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 46 deletions.
108 changes: 66 additions & 42 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@

body{
margin:0;
padding:0;
overflow: hidden;
font-family: 'Dosis', sans-serif;
font-family: 'Poppins', sans-serif;
}

.body{
height: 100vh;
width:100vw;
/* width: 100vw; */
padding:0;
margin:0;
}


.header{
background: rgb(255, 29, 96);
box-shadow: 0 4px 8px 0 rgba(0,0,0,.12), 0 2px 4px 0 rgba(0,0,0,.08);
color: white;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
text-align: center;
position: absolute;
top:0;
Expand All @@ -36,17 +37,11 @@ body{
}
}

h2{
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

hr{
color: rgba(80, 80, 80, 0.336);
border: 1px solid #dae1e7;
}

p{
font-family: 'Roboto';
}
.block{
margin-bottom: 0.5rem;
padding-bottom: 0.5rem;
Expand All @@ -59,46 +54,75 @@ p{
/* align-items: center; */
}

.go{
padding:0.75rem 0.55rem;
font-family: Arial, Helvetica, sans-serif;
font-size: 1.2rem;
background-color: rgb(156, 156, 156);
-moz-appearance: none;
-webkit-appearance: none;
box-shadow: none;
.go {
padding: 0.5rem 1.25rem;
font-size: 1rem;
border: 1px solid rgb(228, 228, 228);
color: rgb(0, 0, 0);
cursor: pointer;
border-color: #dae1e7;
border-radius: 5px;
transition: 0.2s;
/* position: relative; */
max-height: 50px;
margin:0;
margin: 0;
background: #fff;
font-weight: 600;
color: #3d4852;
box-shadow: 0 2px 4px 0 rgba(0,0,0,.1);
}

.go:hover{
box-shadow: 1px 1px 1px rgba(155, 155, 155, 0.733);
transform: scale(1.1);
transform: translateY(-1px);
background-color: #f8fafc;
}

p {
font-weight: 300;
}

.wrap-actions {
justify-content: center;
display: flex;
align-items: center;
flex-wrap: wrap;
}

#input{
max-height: 50px;
margin: 0;
padding: 0.5rem 0.1rem;
font-size: 1.4rem;
border-radius: 0;
box-shadow: none;
border: 1px solid rgb(131, 131, 131);
}
.box{
width: 100%;
font-family: Arial, Helvetica, sans-serif;
@media only screen and (max-width : 500px){
.wrap-actions a{
display: inline-block;
margin-top: 1em;
}
}

#input {
padding: 0.4rem 0.75rem;
font-size: 1.15rem;
outline: none;
border-radius: 5px;
transition: all .3s;
margin-right: 0.5rem;
/* margin-bottom: 1em; */
background-color: #f1f5f8;
border-bottom-width: 1px;
border-color: transparent;
color: #40383a;
}

#input::placeholder {
color: rgba(64, 56, 58, 0.40);
letter-spacing: .25px;
}

#input:focus, #input:active {
border-bottom: 1px solid #ddd;
}

.box {
text-align: center;
padding-top: 0.2rem;
padding-bottom:1rem;
border: 1px solid rgb(134, 134, 134);
margin-bottom: 4rem;
padding: 1rem;
border: 1px solid #dae1e7;
margin: 2.5rem 0;
border-radius: 4px;
box-shadow: 0 2px 4px 0 rgba(0,0,0,.1);
}

.box h2{
margin: 0;
}
Binary file added favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 22 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Opamp Designer</title>
<link rel="stylesheet" href="css/style.css">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link href="https://fonts.googleapis.com/css?family=Dosis:400,700|Poppins" rel="stylesheet">
</head>

<body style="overflow: scroll">
<body>
<div class="body">
<div class="header">
<h1>Opamp Designer</h1>
Expand All @@ -18,8 +20,8 @@ <h1>Opamp Designer</h1>
<div class="box">
<h2>Try it Out</h2>
<p>Write the coefficients of all the terms in the equation with a space</p>
<div>
<input type="text" id="input">
<div class="wrap-actions">
<input type="text" onkeypress='validate(event)' placeholder="Write coefficient" id="input">
<a href="./designer.html">
<button class="go" onclick="localStorage.setItem('query',document.getElementById('input').value);">
Generate Circuit
Expand Down Expand Up @@ -64,4 +66,21 @@ <h2>What does this Opamp designer do?
<!-- <script src="js/canvasApi.js"></script>
<script src="js/renderer.js"></script> -->
<!-- <script src="js/renderer.js"></script> -->
<script>
function validate(evt) {
const theEvent = evt || window.event;

if (theEvent.type === 'paste') {
key = event.clipboardData.getData('text/plain');
} else {
var key = theEvent.keyCode || theEvent.which;
key = String.fromCharCode(key);
}
var regex = /[0-9]|\./;
if( !regex.test(key) ) {
theEvent.returnValue = false;
if(theEvent.preventDefault) theEvent.preventDefault();
}
}
</script>
</html>
2 changes: 1 addition & 1 deletion js/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ var canvas = document.getElementById("mycanvas");
var ctx = canvas.getContext('2d');

canvas.width = window.innerWidth;
canvas.style.width = '100%'
canvas.height = window.innerHeight;


var circuit = {

grid_x : window.innerWidth/64,
Expand Down

0 comments on commit 7b792f4

Please sign in to comment.