Skip to content

Commit

Permalink
Merge pull request #42 from AK-007/master
Browse files Browse the repository at this point in the history
Task1 solution
  • Loading branch information
mubaris authored Jan 17, 2018
2 parents 903bcba + cec588f commit 6a136cf
Show file tree
Hide file tree
Showing 3 changed files with 156 additions and 0 deletions.
81 changes: 81 additions & 0 deletions Solutions/AK-007/Task1/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
@import url("https://fonts.googleapis.com/css?family=Audiowide");
@import url("https://fonts.googleapis.com/css?family=Roboto");
html {
background-color: #252627;
text-align: center;
color: white;
font-family: "Roboto", sans-serif;
}
h1 {
color: #197278;
font-family: "Audiowide", cursive;
font-weight: 800;
font-size: 50px;
}
input {
border-radius: 50px;
outline: none;
border: none;
background-color: #edddd4;
padding: 15px;
width: 300px;
font-family: "Roboto", sans-serif;
font-size: 15px;
margin: 10px;
}
form {
position: relative;
text-align: center;
}
.foot {
color: white;
font-size: 20px;
position: relative;
margin-top: 400px;
}
button {
border-radius: 50px;
border: none;
outline: none;
padding: 10px;
width: 100px;
cursor: pointer;
background-color: #c44536;
color: white;
font-family: "Roboto", sans-serif;
font-size: 15px;
margin-left: 1px;
margin-top: 30px;
}
.set {
padding: 5px;
margin: 10px;
background-color: #eceeed;
border: none;
outline: none;
border-radius: 10px;
}
.result {
position: relative;
}
.title {
color: #383a39;
}
.company {
color: #0b3c49;
}
.desc {
color: #6987c9;
}
a:link {
color: #bf211e;
}
a:link,
a:hover,
a:visited,
a:active {
text-decoration: none;
}
a:hover {
color: #9d44b5;
}
40 changes: 40 additions & 0 deletions Solutions/AK-007/Task1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Job Hunt</title>
<meta name="viewport" content="width=device-width, initial-scale=1">


<link rel="stylesheet" href="css/style.css">


</head>

<body>

<h1>JOB HUNT</h1>
<div class="input">
<form id="value">
<input type="text" placeholder="Enter expertise">
<input type="text" placeholder="Enter location">
<button type="button" onclick="myFunction()" value="Submit">Submit</button>
</form>
</div>
<div class="result"></div>
<div class="foot">Developed by Ayush Gupta</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/js/bootstrap.min.js'></script>



<script src="js/index.js"></script>




</body>

</html>
35 changes: 35 additions & 0 deletions Solutions/AK-007/Task1/js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
function myFunction() {
$('.result').empty();
var x = document.getElementById("value");
var desc = x.elements[0].value;
var loc = x.elements[1].value;
var link =
"https://jobs.github.com/positions.json?description=" +
desc +
"&location=" +
loc;
$.ajax({
url: link,
dataType: "jsonp",
success: function(data) {
for (var i = 0; i < data.length; i++) {
var title = data[i].title;
var company = data[i].company;
var link = data[i].url;
var description = data[i].description;
var string =
"<div class='set'><h3 class='title'>" +
title +
"</h3><h4 class='company'>Company : " +
company +
"</h4><div class='desc'>" +
description +
"</div><div class='url'><a href='" +
link +
"' target='_blank'>Link</a></div></div>";
$(".result").append(string);
}
$(".foot").css("margin-top", "20px");
}
});
}

0 comments on commit 6a136cf

Please sign in to comment.