fix ask-AI
This commit is contained in:
@@ -59,7 +59,7 @@ a.view-markdown:any-link {
|
|||||||
.container {
|
.container {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: auto auto 1fr auto;
|
grid-template-rows: auto 0fr 1fr auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"header"
|
"header"
|
||||||
"ask-ai"
|
"ask-ai"
|
||||||
@@ -158,6 +158,15 @@ a.view-markdown:any-link {
|
|||||||
background: #f6f8fa;
|
background: #f6f8fa;
|
||||||
border-bottom: 1px solid #d1d9e0;
|
border-bottom: 1px solid #d1d9e0;
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ask-ai-panel[style*="block"] {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container:has(.ask-ai-panel[style*="block"]) {
|
||||||
|
grid-template-rows: auto auto 1fr auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ask-ai-content {
|
.ask-ai-content {
|
||||||
@@ -193,13 +202,15 @@ a.view-markdown:any-link {
|
|||||||
grid-area: main;
|
grid-area: main;
|
||||||
max-width: 1000px;
|
max-width: 1000px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 24px;
|
/* padding: 24px; */
|
||||||
|
padding-top: 80px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1000px) {
|
@media (max-width: 1000px) {
|
||||||
.main-content {
|
.main-content {
|
||||||
padding: 20px;
|
/* padding: 20px; */
|
||||||
|
padding: 0px;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -324,6 +335,10 @@ a.view-markdown:any-link {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
article.article-content {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.article-meta {
|
.article-meta {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
@@ -818,13 +833,13 @@ a.view-markdown:any-link {
|
|||||||
justify-self: end;
|
justify-self: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ask AI button mobile style */
|
/* Ask AI button mobile style - icon only */
|
||||||
.ask-ai-btn {
|
.ask-ai-btn {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
min-width: 40px;
|
min-width: 40px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 0;
|
|
||||||
gap: 0;
|
gap: 0;
|
||||||
|
font-size: 0; /* Hide all text content */
|
||||||
}
|
}
|
||||||
|
|
||||||
.ask-ai-btn .ai-icon {
|
.ask-ai-btn .ai-icon {
|
||||||
|
@@ -186,12 +186,7 @@ function updateAskAIButton() {
|
|||||||
const button = document.getElementById('askAiButton');
|
const button = document.getElementById('askAiButton');
|
||||||
if (!button) return;
|
if (!button) return;
|
||||||
|
|
||||||
const iconSpan = button.querySelector('.ai-icon');
|
// Only update text, never modify the icon
|
||||||
|
|
||||||
if (aiProfileData && aiProfileData.avatar && iconSpan) {
|
|
||||||
iconSpan.innerHTML = `<img src="${aiProfileData.avatar}" alt="${aiProfileData.displayName || 'AI'}" class="ai-avatar-small">`;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aiProfileData && aiProfileData.displayName) {
|
if (aiProfileData && aiProfileData.displayName) {
|
||||||
const textNode = button.childNodes[2] || button.lastChild;
|
const textNode = button.childNodes[2] || button.lastChild;
|
||||||
if (textNode && textNode.nodeType === Node.TEXT_NODE) {
|
if (textNode && textNode.nodeType === Node.TEXT_NODE) {
|
||||||
|
Reference in New Issue
Block a user