Reworking css
This commit is contained in:
+14
-8
@@ -880,23 +880,29 @@ FRONTEND_JS_TEMPLATE = r"""
|
||||
// Move AI Overview outside #answers, place it before #results
|
||||
(function relocateBox() {
|
||||
const answersDiv = document.getElementById('answers');
|
||||
const resultsDiv = document.getElementById('results') ||
|
||||
document.querySelector('.results') ||
|
||||
document.querySelector('#urls');
|
||||
|
||||
if (!box || !answersDiv) return;
|
||||
|
||||
// Create our own container
|
||||
const aiContainer = document.createElement('div');
|
||||
aiContainer.id = 'ai-answers';
|
||||
aiContainer.style.cssText = 'margin-bottom: 1rem;';
|
||||
aiContainer.style.cssText = [
|
||||
'background: var(--color-answer-background)',
|
||||
'padding: 1rem',
|
||||
'margin: 0 0 1rem 0',
|
||||
'color: var(--color-answer-font)',
|
||||
'border-radius: 8px',
|
||||
'box-sizing: border-box',
|
||||
'width: 100%'
|
||||
].join('; ');
|
||||
|
||||
// Move our box into the new container
|
||||
aiContainer.appendChild(box);
|
||||
|
||||
// Insert before results, or before #answers if no results found
|
||||
if (resultsDiv) {
|
||||
resultsDiv.parentNode.insertBefore(aiContainer, resultsDiv);
|
||||
const resultsGrid = document.getElementById('results');
|
||||
if (resultsGrid) {
|
||||
// Insert as first child of #results grid so grid-area:answers applies
|
||||
resultsGrid.insertBefore(aiContainer, resultsGrid.firstChild);
|
||||
} else {
|
||||
answersDiv.parentNode.insertBefore(aiContainer, answersDiv);
|
||||
}
|
||||
@@ -2056,7 +2062,7 @@ class SXNGPlugin(Plugin):
|
||||
.replace("__JS_Q__", js_q)
|
||||
|
||||
html_payload = f'''
|
||||
<article id="sxng-stream-box" class="answer" style="display:none; margin-top: 0; margin-bottom: 0;">
|
||||
<article id="sxng-stream-box" class="answer" style="display:none; margin: 0; padding: 0;">
|
||||
<style>
|
||||
@keyframes sxng-fade-pulse {{
|
||||
0%, 100% {{ opacity: 0.1; }}
|
||||
|
||||
Reference in New Issue
Block a user