diff --git a/html/css/style.css b/html/css/style.css index 31b2241..cfe883d 100644 --- a/html/css/style.css +++ b/html/css/style.css @@ -136,6 +136,49 @@ p { box-shadow: 0 0 15px var(--accent-glow); } +.search-form { + display: flex; + align-items: center; + gap: 10px; + max-width: 720px; + width: 100%; + margin-top: 30px; + justify-content: center; +} + +.search-engine { + min-width: 140px; + padding: 12px 14px; + border-radius: 12px; + border: 1px solid var(--border); + background: var(--card); + color: var(--text-main); + font-size: 16px; +} + +.search-engine:focus, +.search-form input:focus, +.search-btn:focus { + outline: 2px solid rgba(34, 197, 94, 0.6); + outline-offset: 2px; +} + +.search-form input { + flex: 1; + min-width: 200px; + padding: 12px 16px; + border-radius: 12px; + border: 1px solid var(--border); + background: var(--card); + color: var(--text-main); + font-size: 16px; +} + +.search-btn { + margin-top: 0; + padding: 12px 24px; +} + .btn:hover { transform: scale(1.05); box-shadow: 0 0 25px var(--accent-glow); diff --git a/html/index.html b/html/index.html index 1ae1013..c24a881 100644 --- a/html/index.html +++ b/html/index.html @@ -32,6 +32,16 @@

We Build Worlds

AloeGames is a modern game development studio focused on creating immersive, next-generation experiences.

+ +
+ + + +
+ diff --git a/html/js/app.js b/html/js/app.js index a9913c7..b2a6abb 100644 --- a/html/js/app.js +++ b/html/js/app.js @@ -43,6 +43,27 @@ function tryToggleTextContent(elementId, textContent) { el.textContent = textContent; } +function searchQuery(event) { + event.preventDefault(); + + const engine = document.getElementById('searchEngine').value; + const query = document.getElementById('searchInput').value.trim(); + + if (!query) { + document.getElementById('searchInput').focus(); + return; + } + + const encodedQuery = encodeURIComponent(query); + let url = 'https://www.google.com/search?q=' + encodedQuery; + + if (engine === 'duckduckgo') { + url = 'https://duckduckgo.com/?q=' + encodedQuery; + } + + window.open(url, '_blank', 'noopener'); +} + // Background animation const canvas = document.getElementById('bgCanvas'); const ctx = canvas.getContext('2d');