Skip to content

Commit

Permalink
New UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
lalwanivikas committed Feb 22, 2015
1 parent 34c452b commit 5a7b308
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 126 deletions.
170 changes: 102 additions & 68 deletions css/main.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,70 @@

/* General styles for the page */
* {
margin: 0;
padding: 0;
/*
Reset CSS
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}


/*
* Page Styles
*/

body {
background-color: #D2D7D3;
font-family: monospace;
width: 960px;
max-width: 960px;
margin: 0 auto;
font-family: 'PT Sans', sans-serif;
}

h1 {
margin: 25px 0 25px 0;
font-size: 40px;
text-align: center;
.wrapper {
margin: 2.5% auto;
max-width: 960px;
min-width: 960px;
padding: 10px;
}

hr {
margin: 20px 0;
h1 {
text-align: center;
font-size: 4em;
}

form {
Expand All @@ -30,65 +74,55 @@ form {
/* Styles for URL box */

.url-box {
background-color: transparent;
display: inline-block;
height: 30px;
border: none;
border-bottom: 4px solid #b3b3b1;
padding: 0px 0px 0px 20px;
margin: 0px 0px;
width: 50%;
outline: none;
margin: 4% auto 2%;
text-align: center;
font-size: 15px;
font-family: monospace;
width: 100%;
height: 3.5rem;
font-size: 2rem;
font-weight: 100;
color: #000;
outline: none;
border: 2px solid #000;
box-sizing: border-box;
}

#go {
display: inline-block;
height: 50px;
width: 50px;
background-color: transparent;
padding: 0px;
border: 4px solid #b3b3b1;
border-radius: 50%;
box-shadow: none;
cursor: pointer;
outline: none;
text-align: center;
font-size: 20px;
font-family: monospace;
.url-box::-webkit-input-placeholder {
color: #000;
opacity: 0.5;
font-size: 1.5rem;
font-weight: 100;
padding-top: 5px;
}

.url-box::-moz-placeholder {
color: #000;
opacity: 0.5;
font-size: 0.7em;
font-weight: 100;
padding-top: 5px;
}

/* Styles for image container*/

#imageContainer {
border: 2px solid grey;
border-radius: 10px;
padding: 5px;
width: 65%;
max-width: 600px;
float: left;
margin: 20px;
border: 2px solid #000;
display: inline-block;
padding: 5px;
vertical-align: top;
margin-left: 1%;
width: 65.6%;
}

#imageContainer img {
border-radius: 10px;
width: 100%;
}

/* Styles for sliders*/

.sliders {
float: left;
border: 2px solid grey;
border-radius: 10px;
margin-top: 20px;
margin-bottom: 20px;
width: 30%;
display: inline-block;
border: 2px solid #000;
padding-left: 10px;
}

Expand All @@ -102,7 +136,7 @@ form {
display: inline-block;
margin: 10px 0 0 0;
width: 100px;
font-size: 16px;
font-size: 1.1rem;
color: #22313F;
text-align: left;
vertical-align: middle;
Expand Down Expand Up @@ -153,23 +187,23 @@ input[type=range]:hover {

#reset {
display: inline-block;
height: 40px;
width: 100px;
background-color: transparent;
padding: 0px;
border: 4px solid #b3b3b1;
border-radius: 10px;
box-shadow: none;
height: 2.5rem;
width: 95%;
background-color: #22A7F0;
border-radius: 5px;
cursor: pointer;
outline: none;
text-align: center;
font-size: 20px;
font-family: monospace;
font-weight: 100;
color: #000;
margin: 0 0 10px 0;
font-size: 1.5rem;
color: #fff;
margin: 0 10px 10px 0px;
border: 2px solid transparent;
}

#reset:hover {
color: #22A7F0;
background-color: #fff;
border: 2px solid #22A7F0;
}



Expand Down
Binary file added image/puppies.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed image/stadium.jpg
Binary file not shown.
108 changes: 54 additions & 54 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,76 @@
<head>
<meta charset="utf-8">
<title>Image Editor | Vikas Lalwani</title>
<link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>
<link href = "css/main.css" type="text/css" rel="stylesheet">
</head>

<body>
<h1>Image Editor</h1>

<!--Form for collecting image URL -->
<form id="urlBox" class = "center">
<input class="url-box" type="url" id="imgUrl" placeholder="Paste any image link and start playing.">
<input id="go" type="button" value="Go">
</form>

<hr width="100%" color="grey">
<div class="wrapper">
<h1>Image Editor</h1>

<!--Form for collecting image URL -->
<form id="urlBox" class = "center">
<input class="url-box" type="url" id="imgUrl" placeholder="Paste any image link and hit enter to start playing.">
</form>

<!--Controls for CSS filters via range input-->
<div class="sliders">
<form id="imageEditor">
<p>
<label for="gs">Grayscale</label>
<input id="gs" name="gs" type="range" min=0 max=100 value=0>
</p>
<!--Controls for CSS filters via range input-->
<div class="sliders">
<form id="imageEditor">
<p>
<label for="gs">Grayscale</label>
<input id="gs" name="gs" type="range" min=0 max=100 value=0>
</p>

<p>
<label for="blur">Blur</label>
<input id="blur" name="blur" type="range" min=0 max=10 value=0>
</p>
<p>
<label for="blur">Blur</label>
<input id="blur" name="blur" type="range" min=0 max=10 value=0>
</p>

<p>
<label for="br">Exposure</label>
<input id="br" name="br" type="range" min=0 max=200 value=100>
</p>
<p>
<label for="br">Brightness</label>
<input id="br" name="br" type="range" min=0 max=200 value=100>
</p>

<p>
<label for="ct">Contrast</label>
<input id="ct" name="ct" type="range" min=0 max=200 value=100>
</p>
<p>
<label for="ct">Contrast</label>
<input id="ct" name="ct" type="range" min=0 max=200 value=100>
</p>

<p>
<label for="huer">Hue Rotate</label>
<input id="huer" name="huer" type="range" min=0 max=360 value=0>
</p>
<p>
<label for="huer">Hue Rotate</label>
<input id="huer" name="huer" type="range" min=0 max=360 value=0>
</p>

<p>
<label for="opacity">Opacity</label>
<input id="opacity" name="opacity" type="range" min=0 max=100 value=100>
</p>
<p>
<label for="opacity">Opacity</label>
<input id="opacity" name="opacity" type="range" min=0 max=100 value=100>
</p>

<p>
<label for="invert">Invert</label>
<input id="invert" name="invert" type="range" min=0 max=100 value=0>
</p>
<p>
<label for="invert">Invert</label>
<input id="invert" name="invert" type="range" min=0 max=100 value=0>
</p>

<p>
<label for="saturate">Saturate</label>
<input id="saturate" name="saturate" type="range" min=0 max=500 value=100>
</p>
<p>
<label for="saturate">Saturate</label>
<input id="saturate" name="saturate" type="range" min=0 max=500 value=100>
</p>

<p>
<label for="sepia">Sepia</label>
<input id="sepia" name="sepia" type="range" min=0 max=100 value=0>
</p>
<p>
<label for="sepia">Sepia</label>
<input id="sepia" name="sepia" type="range" min=0 max=100 value=0>
</p>

<input type="reset" form="imageEditor" id="reset" value="Reset" />
<input type="reset" form="imageEditor" id="reset" value="Reset" />

</form>
</div>
</form>
</div>

<!--container where image will be loaded-->
<div id="imageContainer" class="center">
<img src="image/stadium.jpg"/>
<!--container where image will be loaded-->
<div id="imageContainer" class="center">
<img src="image/puppies.jpg"/>
</div>
</div>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
Expand Down
5 changes: 1 addition & 4 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ function addImage(e) {
if (imgUrl.length) {
$("#imageContainer img").attr("src", imgUrl);
}
e.preventDefault();
e.preventDefault();
}

//on click of go(submit) button, addImage() will be called
$("#go").click(addImage);

//on pressing return, addImage() will be called
$("#urlBox").submit(addImage);

Expand Down

0 comments on commit 5a7b308

Please sign in to comment.