HTMLify
Amar-engine.html
Views: 585 | Author: amar
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Amar's Engine</title> <style> /* thanks to beyoné */ body { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; margin: 0; background-image: url('https://www.transparenttextures.com/patterns/asfalt-dark.png'); font-family: 'Arial', sans-serif; color: #333; padding: 20px; box-sizing: border-box; } h1 { font-size: 2.5em; margin-bottom: 20px; text-align: center; color: black; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); } .engine-button { padding: 15px; margin: 15px 0; border: none; cursor: pointer; border-radius: 30px; background: transparent; outline: none; transition: transform 0.3s, background-color 0.3s; display: flex; align-items: center; justify-content: center; color: black; font-weight: bold; font-size: 1.2em; } .engine-button:hover { transform: scale(1.1); background-color: rgba(0, 0, 0, 0.1); } input[type="text"] { padding: 15px; width: 100%; max-width: 400px; margin-right: 10px; border-radius: 24px; border: 2px solid #333; outline: none; font-size: 1em; background-color: rgba(255, 255, 255, 0.8); color: black; } button { padding: 15px 10px; background-color: #4CAF50; color: black; border: none; cursor: pointer; border-radius: 24px; font-size: 1em; margin-top: 10px; width: 120px; } button:hover { background-color: #45a049; } img { width: 40px; height: 40px; vertical-align: middle; margin-left: 8px; } footer { margin-top: 40px; font-size: 0.9em; text-align: center; color: black; } footer a { color: #4CAF50; text-decoration: none; } /* Responsive Styles */ @media (max-width: 600px) { h1 { font-size: 2em; } button, .engine-button { width: 100%; font-size: 1em; } input[type="text"] { width: 90%; font-size: 0.9em; } } </style> </head> <body> <h1>Amar's Engine</h1> <button class="engine-button" id="searchButton" onclick="changeEngine()"> <span style="font-size: 1.3em;">I wanna search with</span> <img src="https://upload.wikimedia.org/wikipedia/commons/2/2f/Google_2015_logo.svg" alt="Google Logo" /> </button> <input type="text" id="searchQuery" placeholder="Enter your search term" /> <button onclick="search()">Search</button> <footer> <p>Powered by <a href="https://www.buymeacoffee.com/pokemonmeme" target="_blank">amar</a></p> </footer> <script> const engines = [ { name: "Google", url: "https://www.google.com/search?q=", logo: "https://upload.wikimedia.org/wikipedia/commons/2/2f/Google_2015_logo.svg" }, { name: "Bing", url: "https://www.bing.com/search?q=", logo: "https://upload.wikimedia.org/wikipedia/commons/9/9c/Bing_Fluent_Logo.svg" }, { name: "DuckDuckGo", url: "https://duckduckgo.com/?q=", logo: "https://upload.wikimedia.org/wikipedia/en/8/88/DuckDuckGo_logo.svg"}, { name: "Yahoo", url: "https://search.yahoo.com/search?p=", logo: "https://upload.wikimedia.org/wikipedia/commons/3/3a/Yahoo%21_%282019%29.svg" } ]; let currentEngineIndex = 0; function changeEngine() { currentEngineIndex = (currentEngineIndex + 1) % engines.length; const button = document.getElementById("searchButton"); const logo = engines[currentEngineIndex].logo; button.innerHTML = `<span style="font-size: 1.0em;">I wanna search with</span> <img src="${logo}" alt="${engines[currentEngineIndex].name} Logo" />`; } function search() { const query = document.getElementById("searchQuery").value.trim(); if (query) { const engineUrl = engines[currentEngineIndex].url; window.open(engineUrl + encodeURIComponent(query), '_blank'); } else { alert("Please enter a search term."); } } </script> </body> </html> |