2025-08-29 03:27:00 -03:00
|
|
|
<%
|
2025-05-29 17:58:34 -06:00
|
|
|
let ogPages = {
|
|
|
|
|
"results": "opengraphresults",
|
|
|
|
|
"info": "opengraphinfo"
|
|
|
|
|
}
|
|
|
|
|
%>
|
2024-10-15 21:03:27 -06:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<%- include('../partials/head'); %>
|
|
|
|
|
</head>
|
2024-10-15 23:26:39 -06:00
|
|
|
<body class="d-flex flex-column min-vh-100">
|
2024-10-15 21:03:27 -06:00
|
|
|
<header>
|
|
|
|
|
<%- include('../partials/header'); %>
|
2025-05-29 17:58:34 -06:00
|
|
|
<%- ogPages[page] ? include(`../partials/${ogPages[page]}`) : include('../partials/opengraph') %>
|
2024-10-15 21:03:27 -06:00
|
|
|
</header>
|
|
|
|
|
|
2024-10-15 23:26:39 -06:00
|
|
|
<%- include(page); %>
|
2024-10-15 21:03:27 -06:00
|
|
|
|
2024-10-15 23:26:39 -06:00
|
|
|
<footer class="footer mt-auto text-center">
|
2024-10-15 21:03:27 -06:00
|
|
|
<%- include('../partials/footer'); %>
|
|
|
|
|
</footer>
|
|
|
|
|
|
2025-08-29 03:27:00 -03:00
|
|
|
<!-- AI Chat Button and Modal -->
|
|
|
|
|
<button class="ai-chat-button" id="aiChatButton" title="<%= __('ai_chat.button_tooltip') %>">
|
|
|
|
|
<i class="fas fa-robot"></i>
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<div class="ai-chat-modal" id="aiChatModal">
|
|
|
|
|
<div class="ai-chat-header">
|
|
|
|
|
<h5 class="ai-chat-title"><%= __('ai_chat.title') %></h5>
|
|
|
|
|
<button class="ai-chat-close" id="aiChatClose">×</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ai-chat-messages" id="aiChatMessages">
|
|
|
|
|
<div class="ai-chat-empty-state" id="aiChatEmptyState">
|
|
|
|
|
<div class="ai-chat-welcome">
|
|
|
|
|
<i class="fas fa-robot ai-chat-welcome-icon"></i>
|
|
|
|
|
<h6 class="ai-chat-welcome-title"><%= __('ai_chat.welcome.title') %></h6>
|
|
|
|
|
<p class="ai-chat-welcome-text">
|
|
|
|
|
<%= __('ai_chat.welcome.description') %>
|
|
|
|
|
</p>
|
|
|
|
|
<div class="ai-chat-suggestions">
|
|
|
|
|
<button class="ai-suggestion-pill" data-suggestion="<%= __('ai_chat.suggestions.game_recommendations') %>">🎮 <%= __('ai_chat.suggestions.game_recommendations') %></button>
|
|
|
|
|
<button class="ai-suggestion-pill" data-suggestion="<%= __('ai_chat.suggestions.search_tips') %>">🔍 <%= __('ai_chat.suggestions.search_tips') %></button>
|
|
|
|
|
<button class="ai-suggestion-pill" data-suggestion="<%= __('ai_chat.suggestions.gaming_history') %>">🕹️ <%= __('ai_chat.suggestions.gaming_history') %></button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ai-chat-input-container">
|
|
|
|
|
<textarea
|
|
|
|
|
class="ai-chat-input"
|
|
|
|
|
id="aiChatInput"
|
|
|
|
|
placeholder="<%= __('ai_chat.input_placeholder') %>"
|
|
|
|
|
rows="1"
|
|
|
|
|
maxlength="1000"
|
|
|
|
|
></textarea>
|
|
|
|
|
<button class="ai-chat-send" id="aiChatSend" title="<%= __('search.button') %>">
|
|
|
|
|
➤
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-10-15 21:03:27 -06:00
|
|
|
</body>
|
2024-10-22 01:54:30 -06:00
|
|
|
<script>
|
2025-08-29 03:27:00 -03:00
|
|
|
// Pass AI Chat translations to the client
|
|
|
|
|
window.aiChatTranslations = {
|
|
|
|
|
typing_indicator: '<%= __('ai_chat.typing_indicator') %>',
|
|
|
|
|
error: {
|
|
|
|
|
network: '<%= __('ai_chat.error.network') %>',
|
|
|
|
|
generic: '<%= __('ai_chat.error.generic') %>'
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2024-10-22 01:54:30 -06:00
|
|
|
if(window.location.pathname != '/settings'){ //don't load on the settings page
|
|
|
|
|
settingStore = localStorage.getItem('settings')
|
|
|
|
|
if(typeof settingStore == 'string' && window.location.href){
|
|
|
|
|
settingsElem = document.getElementById('searchSettings')
|
|
|
|
|
if(settingsElem){
|
|
|
|
|
settingsElem.value = btoa(settingStore)
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-05-27 20:12:30 -06:00
|
|
|
if(typeof settingStore == 'string' && window.location.href){
|
|
|
|
|
oldResultElem = document.getElementById('oldResults')
|
|
|
|
|
if(oldResultElem){
|
2025-08-29 03:27:00 -03:00
|
|
|
oldResultElem.value = JSON.parse(settingStore).useOldResults.toString()
|
2025-05-27 20:12:30 -06:00
|
|
|
}
|
|
|
|
|
}
|
2024-10-22 01:54:30 -06:00
|
|
|
}
|
|
|
|
|
</script>
|
2025-08-29 03:27:00 -03:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous">
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
2025-05-27 20:12:30 -06:00
|
|
|
<script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js'></script>
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
|
2025-08-29 03:27:00 -03:00
|
|
|
<link rel="stylesheet" href="/public/css/ai.css">
|
|
|
|
|
<script src="/public/js/ai-chat.js"></script>
|
2024-10-15 21:03:27 -06:00
|
|
|
</html>
|