Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mruwnik committed Feb 23, 2024
1 parent 9903b24 commit 020639b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/components/Article/Contents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ const insertGlossary = (pageid: string, glossary: Glossary) => {
addPopup(
e as HTMLSpanElement,
`glossary-${entry.term}`,
`<div class="glossary-popup flex-container black col-6 small">
`<div class="glossary-popup flex-container black small">
<div class="contents col-8">
<h3>${entry.term}</h3>
<div class="small-bold">${entry.term}</div>
<div class="defintion">${entry.contents}</div>
${link || ''}
</div>
Expand Down
4 changes: 3 additions & 1 deletion app/components/Article/article.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 {
Expand All @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions app/components/Widget/Stampy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div className="chat col-10">
<div className="col-6 padding-bottom-56">
Expand All @@ -27,7 +27,7 @@ export const WidgetStampy = () => {
<div className="padding-bottom-24">Try asking me...</div>
{questions.map((question, i) => (
<div key={i} className="padding-bottom-16">
<Button className="secondary-alt" action={stampyUrl}>
<Button className="secondary-alt" action={stampyUrl(question)}>
{question}
</Button>
</div>
Expand All @@ -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
}
}}
/>
<Link to={stampyUrl}>
<Link to={stampyUrl(question)}>
<SendIcon />
</Link>
</div>
Expand Down

0 comments on commit 020639b

Please sign in to comment.