Skip to content

Commit

Permalink
Merge pull request #708 from StampyAI/misc-CSS
Browse files Browse the repository at this point in the history
misc CSS
  • Loading branch information
melissasamworth committed Jun 7, 2024
2 parents 29d65e0 + d90f67f commit 9c7a335
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/components/Article/Contents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const addPopup = (e: HTMLElement, id: string, contents: string, mobile?: boolean
if (preexisting) return preexisting

const popup = document.createElement('div')
popup.className = 'link-popup bordered'
popup.className = 'link-popup bordered small'
popup.innerHTML = contents
popup.id = id

Expand Down
23 changes: 21 additions & 2 deletions app/components/Article/article.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,18 @@ article .contents p {
padding-bottom: var(--spacing-32);
}

article .contents p:last-child {
padding-bottom: 0;
}

article .contents li {
padding-bottom: var(--spacing-16);
}

article .contents li:last-child {
padding-bottom: 0;
}

article .contents img {
max-width: 100%;
}
Expand All @@ -91,11 +103,18 @@ article .glossary-entry {
article .link-popup {
visibility: hidden;
opacity: 0;
z-index: 2;
z-index: 4;
position: absolute;
top: 0;
width: 512px;
}

article .link-popup .footnote {
padding: var(--spacing-24) var(--spacing-24) 0 var(--spacing-24);
padding: var(--spacing-32) var(--spacing-32) 0 var(--spacing-32);
}

article .footnote-ref {
position: relative;
}

article .glossary-popup {
Expand Down
10 changes: 8 additions & 2 deletions app/components/Chatbot/ChatEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ const UserQuery = ({content}: Entry) => (
</div>
)

const ReferenceSummary = ({title, authors, source, url}: Citation & {titleClass?: string}) => {
const ReferenceSummary = ({
title,
authors,
source,
url,
titleClass,
}: Citation & {titleClass?: string}) => {
const referenceSources = {
arxiv: 'Scientific paper',
blogs: 'Blogpost',
Expand All @@ -88,7 +94,7 @@ const ReferenceSummary = ({title, authors, source, url}: Citation & {titleClass?

return (
<div>
<div className="large-bold black padding-bottom-8">{title}</div>
<div className={`black padding-bottom-8 ${titleClass}`}>{title}</div>
<div className="small">
<Authors authors={authors} />
<span>{' · '}</span>
Expand Down
3 changes: 2 additions & 1 deletion app/components/Chatbot/chat_entry.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ article.stampy {
padding: var(--spacing-40);
border-radius: var(--spacing-6);
max-width: unset;
margin: var(--spacing-16);
margin-left: var(--spacing-56);
margin-bottom: var(--spacing-24);
border-radius: var(--border-radius);
}

.chat-entry .title {
Expand Down
2 changes: 1 addition & 1 deletion app/components/Chatbot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export const Chatbot = ({question, questions, settings}: ChatbotProps) => {
<ChatEntry key={`chat-entry-${i}`} {...item} />
))}

<div className="padding-bottom-192">
<div className="padding-bottom-128">
{followups ? (
<Followups
title="Continue the conversation"
Expand Down

0 comments on commit 9c7a335

Please sign in to comment.