mirror of
https://github.com/tcsenpai/spacellama.git
synced 2025-06-07 11:45:33 +00:00
better pagination and backgrounds
This commit is contained in:
parent
3477478cfd
commit
a98379f9ee
@ -108,8 +108,9 @@ async function summarizeContent(content, systemPrompt) {
|
|||||||
return {
|
return {
|
||||||
summary:
|
summary:
|
||||||
typeof summary === "string" ? summary.trim() : JSON.stringify(summary),
|
typeof summary === "string" ? summary.trim() : JSON.stringify(summary),
|
||||||
chunkCount,
|
// NOTE Chunk count and recursion depth are disabled if not needed
|
||||||
recursionDepth,
|
//chunkCount,
|
||||||
|
//recursionDepth,
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error in summarizeContent:", error);
|
console.error("Error in summarizeContent:", error);
|
||||||
|
@ -2,10 +2,46 @@ body {
|
|||||||
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
background-image: url("https://static.pexels.com/photos/414171/pexels-photo-414171.jpeg");
|
||||||
|
background-size: cover;
|
||||||
|
-webkit-animation: slidein 100s;
|
||||||
|
animation: slidein 100s;
|
||||||
|
|
||||||
|
-webkit-animation-fill-mode: forwards;
|
||||||
|
animation-fill-mode: forwards;
|
||||||
|
|
||||||
|
-webkit-animation-iteration-count: infinite;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
|
||||||
|
-webkit-animation-direction: alternate;
|
||||||
|
animation-direction: alternate;
|
||||||
|
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes slidein {
|
||||||
|
from {
|
||||||
|
background-position: top;
|
||||||
|
background-size: 3000px;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
background-position: -100px 0px;
|
||||||
|
background-size: 2750px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes slidein {
|
||||||
|
from {
|
||||||
|
background-position: top;
|
||||||
|
background-size: 3000px;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
background-position: -100px 0px;
|
||||||
|
background-size: 2750px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
@ -58,29 +58,65 @@ h1 {
|
|||||||
.btn {
|
.btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
font-size: 16px;
|
font-size: 14px;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 5px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color 0.3s ease;
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
font-weight: 500;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: -100%;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
transparent,
|
||||||
|
rgba(255, 255, 255, 0.2),
|
||||||
|
transparent
|
||||||
|
);
|
||||||
|
transition: 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover::before {
|
||||||
|
left: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
background-color: #3498db;
|
background: linear-gradient(135deg, #0b132b 0%, #3a506b 100%);
|
||||||
color: white;
|
color: #5bc0be;
|
||||||
|
border: 1px solid #5bc0be;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary:hover {
|
.btn-primary:hover {
|
||||||
background-color: #2980b9;
|
background: linear-gradient(135deg, #0b132b 0%, #3a506b 100%);
|
||||||
|
box-shadow: 0 5px 15px rgba(91, 192, 190, 0.4),
|
||||||
|
0 0 5px rgba(91, 192, 190, 0.4);
|
||||||
|
color: #6fffe9;
|
||||||
|
border-color: #6fffe9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary {
|
.btn-secondary {
|
||||||
background-color: #95a5a6;
|
background: rgba(30, 30, 30, 0.9);
|
||||||
color: white;
|
color: #c5c6c7;
|
||||||
|
border: 1px solid #45a29e;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary:hover {
|
.btn-secondary:hover {
|
||||||
background-color: #7f8c8d;
|
background: rgba(30, 30, 30, 0.9);
|
||||||
|
box-shadow: 0 5px 15px rgba(69, 162, 158, 0.3),
|
||||||
|
0 0 5px rgba(69, 162, 158, 0.3);
|
||||||
|
color: #ffffff;
|
||||||
|
border-color: #66fcf1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-container {
|
.summary-container {
|
||||||
|
@ -71,7 +71,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
|
|
||||||
// Render the Markdown content with warning if applicable
|
// Render the Markdown content with warning if applicable
|
||||||
summaryDiv.innerHTML = warningHtml + marked.parse(summaryText);
|
summaryDiv.innerHTML = warningHtml + marked.parse(summaryText);
|
||||||
tokenCountDiv.textContent = `Token count: ${response.tokenCount}`;
|
// NOTE Token count is disabled if not needed
|
||||||
|
//tokenCountDiv.textContent = `Token count: ${response.tokenCount}`;
|
||||||
} else if (response && response.error) {
|
} else if (response && response.error) {
|
||||||
handleError(response.error, response.details);
|
handleError(response.error, response.details);
|
||||||
if (response.tokenCount) {
|
if (response.tokenCount) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user