From 7e65063b3c13d15113d6f087df40706e93a68482 Mon Sep 17 00:00:00 2001 From: AmruthaPariprolu Date: Sat, 10 Aug 2024 03:01:12 +0530 Subject: [PATCH] added --- New_APIs/DuckDuckGo_API/README.md | 20 ++++++++++ New_APIs/DuckDuckGo_API/index.html | 22 +++++++++++ New_APIs/DuckDuckGo_API/index.js | 7 ++++ New_APIs/DuckDuckGo_API/manifest.json | 20 ++++++++++ New_APIs/DuckDuckGo_API/package-lock.json | 13 +++++++ New_APIs/DuckDuckGo_API/package.json | 16 ++++++++ New_APIs/DuckDuckGo_API/styles.css | 47 +++++++++++++++++++++++ 7 files changed, 145 insertions(+) create mode 100644 New_APIs/DuckDuckGo_API/README.md create mode 100644 New_APIs/DuckDuckGo_API/index.html create mode 100644 New_APIs/DuckDuckGo_API/index.js create mode 100644 New_APIs/DuckDuckGo_API/manifest.json create mode 100644 New_APIs/DuckDuckGo_API/package-lock.json create mode 100644 New_APIs/DuckDuckGo_API/package.json create mode 100644 New_APIs/DuckDuckGo_API/styles.css diff --git a/New_APIs/DuckDuckGo_API/README.md b/New_APIs/DuckDuckGo_API/README.md new file mode 100644 index 0000000..51ee22e --- /dev/null +++ b/New_APIs/DuckDuckGo_API/README.md @@ -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. diff --git a/New_APIs/DuckDuckGo_API/index.html b/New_APIs/DuckDuckGo_API/index.html new file mode 100644 index 0000000..9cc96e7 --- /dev/null +++ b/New_APIs/DuckDuckGo_API/index.html @@ -0,0 +1,22 @@ + + + + + + DuckDuckGo-like App + + + +
+

DuckDuckGo-like App

+
+
+
+ + +
+
+
+ + + diff --git a/New_APIs/DuckDuckGo_API/index.js b/New_APIs/DuckDuckGo_API/index.js new file mode 100644 index 0000000..b6db2a6 --- /dev/null +++ b/New_APIs/DuckDuckGo_API/index.js @@ -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)}`; + } +}); diff --git a/New_APIs/DuckDuckGo_API/manifest.json b/New_APIs/DuckDuckGo_API/manifest.json new file mode 100644 index 0000000..51c5d77 --- /dev/null +++ b/New_APIs/DuckDuckGo_API/manifest.json @@ -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" + } + ] +} diff --git a/New_APIs/DuckDuckGo_API/package-lock.json b/New_APIs/DuckDuckGo_API/package-lock.json new file mode 100644 index 0000000..c5dff5b --- /dev/null +++ b/New_APIs/DuckDuckGo_API/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "duckduckgo-like-app", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "duckduckgo-like-app", + "version": "1.0.0", + "license": "MIT" + } + } +} diff --git a/New_APIs/DuckDuckGo_API/package.json b/New_APIs/DuckDuckGo_API/package.json new file mode 100644 index 0000000..74bdbea --- /dev/null +++ b/New_APIs/DuckDuckGo_API/package.json @@ -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" +} diff --git a/New_APIs/DuckDuckGo_API/styles.css b/New_APIs/DuckDuckGo_API/styles.css new file mode 100644 index 0000000..dd9637e --- /dev/null +++ b/New_APIs/DuckDuckGo_API/styles.css @@ -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; +}