From 020639b55b0242f81f51ad29c87b5ad27498848d Mon Sep 17 00:00:00 2001 From: Daniel O'Connell Date: Fri, 23 Feb 2024 01:05:55 +0100 Subject: [PATCH] fixes --- app/components/Article/Contents.tsx | 4 ++-- app/components/Article/article.css | 4 +++- app/components/Widget/Stampy.tsx | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/components/Article/Contents.tsx b/app/components/Article/Contents.tsx index 2b9c54c6..e531b9e9 100644 --- a/app/components/Article/Contents.tsx +++ b/app/components/Article/Contents.tsx @@ -123,9 +123,9 @@ const insertGlossary = (pageid: string, glossary: Glossary) => { addPopup( e as HTMLSpanElement, `glossary-${entry.term}`, - `
+ `
-

${entry.term}

+
${entry.term}
${entry.contents}
${link || ''}
diff --git a/app/components/Article/article.css b/app/components/Article/article.css index 3abd0b15..26e7c9b9 100644 --- a/app/components/Article/article.css +++ b/app/components/Article/article.css @@ -66,6 +66,8 @@ article .glossary-entry { article .link-popup { visibility: hidden; opacity: 0; + width: 522px; + height: 304px; position: absolute; display: inline-block; font: var(--baseFont); @@ -83,7 +85,6 @@ article .contents a.button { font-weight: normal; } article .link-popup .glossary-popup > .contents { - height: 21.46vw; padding: var(--spacing-24) var(--spacing-40) var(--spacing-24); } article .defintion { @@ -96,6 +97,7 @@ article .defintion { } article .link-popup .glossary-popup > img { width: 100%; + height: 303px; border-top-right-radius: var(--border-radius); border-bottom-right-radius: var(--border-radius); } diff --git a/app/components/Widget/Stampy.tsx b/app/components/Widget/Stampy.tsx index 5858c842..48e896f0 100644 --- a/app/components/Widget/Stampy.tsx +++ b/app/components/Widget/Stampy.tsx @@ -13,7 +13,7 @@ export const WidgetStampy = () => { 'Do people seriously worry about existential risk from AI?', ] - const stampyUrl = `https://chat.aisafety.info/?question=${question.trim()}` + const stampyUrl = (question: string) => `https://chat.aisafety.info/?question=${question.trim()}` return (
@@ -27,7 +27,7 @@ export const WidgetStampy = () => {
Try asking me...
{questions.map((question, i) => (
-
@@ -44,11 +44,11 @@ export const WidgetStampy = () => { onChange={(e) => setQuestion(e.target.value)} onKeyDown={(e) => { if (e.key === 'Enter' && question.trim()) { - window.location = stampyUrl as any + window.location = stampyUrl(question) as any } }} /> - +