Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 78 additions & 21 deletions app/src/main/html/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,58 @@
margin-bottom: 10%;
width: 100%;
}
.launcher-card {
max-width: 560px;
margin: 0 auto;
padding: 24px 16px;
}
.prompt-title {
color: ${searchBarTextColor};
font-size: 28px;
font-weight: 700;
margin: 18px 0 14px;
}
.prompt-form {
width: 90%;
max-width: 480px;
margin: 0 auto 18px;
}
.prompt-form input {
width: 100%;
height: 48px;
font-size: 16px;
padding: 0 14px;
}
.ai-grid {
display: grid;
grid-template-columns: 1fr;
gap: 10px;
width: 90%;
max-width: 480px;
margin: 0 auto;
}
.ai-button {
width: 100%;
padding: 12px 16px;
border: 1px solid ${borderColor};
border-radius: 12px;
background: ${accent};
color: ${backgroundColor};
font-size: 15px;
font-weight: 700;
cursor: pointer;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
#search_input {
color: ${searchBarTextColor};
background-color: ${backgroundColor};
Expand Down Expand Up @@ -269,32 +321,37 @@
<body>
<div class="outer">
<div class="middle">
<div class="inner">
<div class="inner launcher-card">
<img id="image_url" class="smaller" src="${IMAGE}">
</br>
</br>
<form onsubmit="return search()" class="search_bar example" autocomplete="off">
<button type="submit" id="search_submit">
<svg height="24px" viewBox="0 0 24 24" width="24px" fill="${backgroundColor}">
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
</svg>
</button>
<span>
<input class="search" type="text" id="search_input" placeholder="${search}"/>
</span>

<h1 class="prompt-title">Prompt Box</h1>

<form class="prompt-form" autocomplete="off" onsubmit="return false;">
<label class="sr-only" for="prompt_input">Prompt</label>
<input
id="prompt_input"
type="text"
placeholder="Enter a prompt"
aria-label="Prompt"
/>
</form>

<div class="ai-grid">
<button class="ai-button" type="button" data-url="https://chat.openai.com/">ChatGPT</button>
<button class="ai-button" type="button" data-url="https://claude.ai/">Claude</button>
<button class="ai-button" type="button" data-url="https://gemini.google.com/">Gemini</button>
<button class="ai-button" type="button" data-url="https://x.com/i/grok">Grok</button>
<button class="ai-button" type="button" data-url="https://www.perplexity.ai/">Perplexity</button>
</div>
</div>
</div>
</div>
</div>

<script type="text/javascript">
function search() {
if (document.getElementById("search_input").value != "") {
window.location.href = "${BASE_URL}" + document.getElementById("search_input").value;
document.getElementById("search_input").value = "";
}
return false;
}
document.querySelectorAll('.ai-button').forEach(function (button) {
button.addEventListener('click', function () {
window.location.href = this.getAttribute('data-url');
});
});
</script>
</body>