-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from AK-007/master
Task1 solution
- Loading branch information
Showing
3 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
}); | ||
} |