Mobile UI fix

This commit is contained in:
2026-01-07 10:57:57 +01:00
parent 86c20628c8
commit 6f0977be50
3 changed files with 6 additions and 16 deletions

View File

@@ -268,7 +268,7 @@
curl -X POST http://localhost:8000/api/predict \
-H "Content-Type: application/json" \
-d '{
"prompt": "Once upon a time",
"prompt": "Kiedyś tak było",
"n": 4,
"temperature": 1.2,
"length": 20
@@ -280,7 +280,7 @@ curl -X POST http://localhost:8000/api/predict \
<div class="code-block">
<pre>
{
"prediction": "in a kingdom far away there lived a brave knight who sought adventure..."
"prediction": "przezroczyste, że prawie ich dostrzec nie mógł. Słysząc bowiem tyle o jej egzystencji. Zaiste z pogardą arcykapłańskich święceń i źle traktujesz sługi boże."
}</pre
>
</div>
@@ -294,7 +294,7 @@ const response = await fetch('/api/predict', {
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: 'The old wizard',
prompt: 'Kiedyś tak było',
n: 3,
temperature: 0.8,
length: 15
@@ -313,7 +313,7 @@ import requests
response = requests.post('http://localhost:8000/api/predict',
json={
'prompt': 'In the beginning',
'prompt': 'Kiedyś tak było',
'n': 4,
'temperature': 1.0,
'length': 25
@@ -385,15 +385,6 @@ print(result['prediction'])</pre
</li>
</ul>
</div>
<div class="section">
<h2>Rate Limits</h2>
<p>
Currently, there are no rate limits imposed on the API. For
production use, consider implementing appropriate rate
limiting.
</p>
</div>
</div>
</body>
</html>

View File

@@ -158,9 +158,9 @@ document.addEventListener("DOMContentLoaded", () => {
closeSidebarOnMobile();
});
// Sync scroll - FIX: Use transform instead of scrollTop
// Sync scroll
editor.addEventListener("scroll", () => {
suggestionOverlay.style.transform = `translateY(-${editor.scrollTop}px)`;
suggestionOverlay.scrollTop = editor.scrollTop;
});
// Initialize UI badges

View File

@@ -414,5 +414,4 @@ label {
pointer-events: none;
opacity: 0.5;
overflow: hidden;
transition: transform 0.05s linear;
}