Skip to content

Commit

Permalink
article spacing fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
zarSou9 committed Jun 6, 2024
1 parent 1a6b91b commit e42d18b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
14 changes: 12 additions & 2 deletions app/components/Article/Contents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,17 @@ const insertGlossary = (pageid: string, glossary: Glossary) => {
}
}

const Contents = ({pageid, html, glossary}: {pageid: PageId; html: string; glossary: Glossary}) => {
const Contents = ({
pageid,
html,
glossary,
className = '',
}: {
pageid: PageId
html: string
glossary: Glossary
className?: string
}) => {
const elementRef = useRef<HTMLDivElement>(null)
const mobile = useIsMobile()

Expand Down Expand Up @@ -194,7 +204,7 @@ const Contents = ({pageid, html, glossary}: {pageid: PageId; html: string; gloss

return (
<div
className="contents large-reading padding-bottom-80"
className={`contents large-reading ${className}`}
dangerouslySetInnerHTML={{
__html: html,
}}
Expand Down
7 changes: 6 additions & 1 deletion app/components/Article/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@ export const Article = ({question, glossary, className}: ArticleProps) => {
{question.banners?.filter((b) => b.title).map(Banner)}
<ArticleMeta question={question} className="padding-bottom-56" />

<Contents pageid={pageid} html={text || ''} glossary={glossary || {}} />
<Contents
className="padding-bottom-80"
pageid={pageid}
html={text || ''}
glossary={glossary || {}}
/>

<KeepGoing {...question} />

Expand Down
4 changes: 4 additions & 0 deletions app/components/Chatbot/chat_entry.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ article.stampy {
visibility: visible;
}

.chat-entry .footnotes {
padding-top: var(--spacing-32);
}

.chat-entry .reference-link {
font-size: 12px;
line-height: 12px;
Expand Down

0 comments on commit e42d18b

Please sign in to comment.