Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duckduckgo added #431

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions New_APIs/DuckDuckGo_API/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# DuckDuckGo-like App

This is a simple web application that mimics the basic functionality of DuckDuckGo, including search capabilities and a minimalist design.

## Files

- `index.html`: The main HTML file that structures the app.
- `index.js`: The JavaScript file that handles the search functionality.
- `styles.css`: The CSS file for styling the app.
- `manifest.json`: Configuration for Progressive Web App (PWA) features.
- `package.json`: Contains metadata about the project and its dependencies.

## Setup

1. Clone the repository.
2. Open `index.html` in a web browser to view the app.

## License

This project is licensed under the MIT License.
22 changes: 22 additions & 0 deletions New_APIs/DuckDuckGo_API/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DuckDuckGo-like App</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>DuckDuckGo-like App</h1>
</header>
<main>
<form id="search-form">
<input type="text" id="search-input" placeholder="Search...">
<button type="submit">Search</button>
</form>
<div id="results"></div>
</main>
<script src="index.js"></script>
</body>
</html>
7 changes: 7 additions & 0 deletions New_APIs/DuckDuckGo_API/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
document.getElementById('search-form').addEventListener('submit', function(event) {
event.preventDefault();
const query = document.getElementById('search-input').value;
if (query) {
window.location.href = `https://duckduckgo.com/?q=${encodeURIComponent(query)}`;
}
});
20 changes: 20 additions & 0 deletions New_APIs/DuckDuckGo_API/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "DuckDuckGo-like App",
"short_name": "DuckDuckGo App",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#000000",
"icons": [
{
"src": "icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
13 changes: 13 additions & 0 deletions New_APIs/DuckDuckGo_API/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions New_APIs/DuckDuckGo_API/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "duckduckgo-like-app",
"version": "1.0.0",
"description": "A simple web app that mimics DuckDuckGo search functionality.",
"main": "index.js",
"scripts": {
"start": "echo 'No start script defined'"
},
"keywords": [
"search",
"duckduckgo",
"web"
],
"author": "Amrutha",
"license": "MIT"
}
47 changes: 47 additions & 0 deletions New_APIs/DuckDuckGo_API/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
}

header {
background-color: #000;
color: #fff;
width: 100%;
text-align: center;
padding: 10px;
}

main {
margin-top: 20px;
}

#search-form {
display: flex;
justify-content: center;
}

#search-input {
width: 300px;
padding: 10px;
margin-right: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}

button {
padding: 10px 20px;
border: none;
background-color: #007bff;
color: #fff;
border-radius: 4px;
cursor: pointer;
}

button:hover {
background-color: #0056b3;
}
Loading