HTMLify
File.html
Views: 435 | 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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | <!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> /* Basic Reset */ * { box-sizing: border-box; } /* Body Styling */ 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; } /* Container Styling */ .container { width: 100%; max-width: 600px; text-align: center; background-color: rgba(255, 255, 255, 0.9); padding: 30px; border-radius: 12px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); } /* Header */ h1 { font-size: 2.5em; margin-bottom: 20px; color: #111; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); } /* Engine Button */ .engine-button { padding: 15px; margin: 20px 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: #333; font-weight: bold; font-size: 1.2em; } .engine-button:hover { transform: scale(1.05); background-color: rgba(0, 0, 0, 0.05); } /* Input and Button */ .search-container { display: flex; width: 100%; max-width: 500px; margin: auto; } input[type="text"] { padding: 15px; flex: 1; border-radius: 24px 0 0 24px; border: 2px solid #333; outline: none; font-size: 1em; background-color: rgba(255, 255, 255, 0.9); color: #111; } button { padding: 15px 20px; background-color: #4CAF50; color: white; border: none; cursor: pointer; border-radius: 0 24px 24px 0; font-size: 1em; } button:hover { background-color: #45a049; } /* Footer */ footer { margin-top: 30px; font-size: 0.9em; text-align: center; color: #333; } footer a { color: #4CAF50; text-decoration: none; } /* Responsive Styles */ @media (max-width: 600px) { h1 { font-size: 2em; } .container { padding: 20px; } .search-container { flex-direction: column; } input[type="text"], button, .engine-button { width: 100%; border-radius: 24px; margin: 5px 0; } } </style> </head> <body> <div class="container"> <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> <div class="search-container"> <input type="text" id="searchQuery" placeholder="Enter your search term" /> <button onclick="search()">Search</button> </div> <footer> <p>Powered by <a href="https://www.buymeacoffee.com/pokemonmeme" target="_blank">amar</a></p> </footer> </div> <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> |