Skip to content

Commit

Permalink
added site code
Browse files Browse the repository at this point in the history
  • Loading branch information
Astrosp committed Feb 6, 2023
0 parents commit 9bdea77
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 0 deletions.
Binary file added img/background.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 added img/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<head>
<title>Tools Search</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<script src="scripts.js"></script>
</head>
<body>
<form action="" class="search-bar">
<input type="text" id="keyword" placeholder="Search What you Want!">
<button type="submit" onclick="searchTools()"><img src="img/search.png"></button>
</form>
<div id="results"></div>
</body>
</html>
19 changes: 19 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
function searchTools() {
var keyword = document.getElementById("keyword").value;
var xhr = new XMLHttpRequest();
xhr.open("GET", "https://raw.githubusercontent.com/Astrosp/osint-tools/master/README.md", true);
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
var contents = xhr.responseText;
var lines = contents.split("\n");
var results = [];
for (var i = 0; i < lines.length; i++) {
if (lines[i].toLowerCase().indexOf(keyword.toLowerCase()) !== -1) {
results.push(lines[i]);
}
}
document.getElementById("results").innerHTML = results.join("<br>");
}
};
xhr.send();
}
59 changes: 59 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
body {
background-image: linear-gradient(rgba(0,8,51,0.9),rgba(0,8,51,0.9)), url(img/background.jpg);
background-position: center;
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
padding: 0;
font-family: 'Poppins', sans-serif;
}

.search-bar {
width: 100%;
max-width: 700px;
align-items: center;
background: rgba(255, 255, 255, 0.2);
padding: 10px 20px;
border-radius: 60px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
display: flex;
backdrop-filter: blur(4px) saturated(180%);
}

.search-bar input {
font-size: 20px;
padding: 24px 20px;
border: 0;
flex: 1;
background: transparent;
border-right: none;
outline: none;
color: #cac7ff;
}

::placeholder{
color: #cac7ff;
}

.search-bar button img{
width: 25px;
}

.search-bar button {
width: 60px;
padding: 18px 20px;
border-radius: 50%;
background: #58629b;
background-position: center;
border: 0;
cursor: pointer;
}

#results {
margin-top: 50px;
font-size: 18px;
text-align: left;
}

0 comments on commit 9bdea77

Please sign in to comment.