-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Safari bug for results page #19
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d6a9a9e
fix button styles, clean up
JohannaPeanut 669e825
rename disclosure components, use the same components on all pages
JohannaPeanut 45af3c8
remove LayoutArticle from /route and /faq
JohannaPeanut f24d3c7
fix tailwind config: do not overwrite tw font sizes
JohannaPeanut 29ca35a
rename PageRouteSection and clean up layout
JohannaPeanut 7f63b71
Headings: clean up, use tailwind default font sizes, add H3
JohannaPeanut dd30041
wrap prose class around Disclosure body
JohannaPeanut bb1da99
reduce leading in H1
JohannaPeanut 136b38c
fix prose
JohannaPeanut 25336f0
Add missing .
hekele 32b36b6
update Gatsby and dependencies
JohannaPeanut dc2f26b
fix unique key warning
JohannaPeanut 07624e6
Fix Labels in Safari
ohrie 9e2eb5e
Fix relative length for <foreignObject/> for Safari
ohrie 9d146be
Fix aria-labels missing onClick elements
ohrie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import classNames from 'classnames' | ||
import { Disclosure } from '@headlessui/react' | ||
import { ChevronDownIcon } from '@heroicons/react/24/outline' | ||
import React from 'react' | ||
|
||
type Props = { | ||
title: string | ||
children: React.ReactNode | ||
no?: number | ||
} | ||
|
||
export const DisclosureListItem: React.FC<Props> = ({ | ||
title, | ||
children, | ||
no, | ||
}) => { | ||
return ( | ||
<Disclosure as="div" key={title} className="pt-6"> | ||
{({ open }) => ( | ||
<> | ||
<dt className="text-lg"> | ||
<Disclosure.Button className="flex w-full items-start justify-between text-left text-gray-400 gap-2"> | ||
<div className="flex gap-6 items-center"> | ||
{no && ( | ||
<span className="flex h-10 w-10 flex-none items-center justify-center rounded-full bg-rs8-pink pt-1 text-white shadow-lg"> | ||
{no} | ||
</span> | ||
)} | ||
<span className="font-medium text-gray-900">{title}</span> | ||
</div> | ||
<span className="flex h-7 items-center"> | ||
<ChevronDownIcon | ||
className={classNames( | ||
open ? '-rotate-180' : 'rotate-0', | ||
'h-6 w-6 transform', | ||
)} | ||
aria-hidden="true" | ||
/> | ||
</span> | ||
</Disclosure.Button> | ||
</dt> | ||
<Disclosure.Panel | ||
as="dd" | ||
className={classNames( | ||
'mt-3 lg:pr-12 prose', | ||
'text-gray-500', | ||
'prose-strong:text-gray-500', | ||
'max-w-full', | ||
'prose-div:max-w-full', | ||
'text-sm md:text-[16px]', | ||
'prose-h1:text-base md:prose-h1:text-lg', // h1 size | ||
'prose-h2:text-sm md:prose-h2:text-[16px]', // h2 size | ||
'prose-h3:text-sm md:prose-h3:text-[16px]', // h3 size | ||
'leading-normal md:leading-normal prose-p:leading-normal md:prose-p:leading-normal prose-li:leading-relaxed md:prose-li:leading-relaxed', | ||
'prose-ul:list-disc prose-ul:my-6 prose-li:text-gray-500 prose-ul:ml-4', | ||
)} | ||
> | ||
{children} | ||
</Disclosure.Panel> | ||
</> | ||
)} | ||
</Disclosure> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
import React from 'react' | ||
import { FAQ, FAQItem } from '../FAQ' | ||
|
||
import { DisclosureList } from '../Disclosure/DisclosureList' | ||
import { DisclosureListItem } from '../Disclosure/DisclosureListItem' | ||
import { H2 } from '../Text' | ||
import { categoizedFaqs } from './categoizedFaqs.const' | ||
import { Section } from '../Layout' | ||
|
||
export const PageFaqFaqs: React.FC = () => { | ||
return ( | ||
<div className="mb-10 md:mb-36"> | ||
<Section> | ||
{Object.entries(categoizedFaqs).map(([categoryTitle, categoryFaqs]) => { | ||
return ( | ||
<section className="m-auto mb-24"> | ||
<h2 className="text-sky-700">{categoryTitle}</h2> | ||
<FAQ> | ||
<section key={categoryTitle} className="m-auto mb-24"> | ||
<H2>{categoryTitle}</H2> | ||
<DisclosureList> | ||
{Object.entries(categoryFaqs).map(([faqTitle, faqBody]) => { | ||
return <FAQItem title={faqTitle}>{faqBody}</FAQItem> | ||
return ( | ||
<DisclosureListItem key={faqTitle} title={faqTitle}> | ||
{faqBody} | ||
</DisclosureListItem> | ||
) | ||
})} | ||
</FAQ> | ||
</DisclosureList> | ||
</section> | ||
) | ||
})} | ||
</div> | ||
</Section> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
import React from 'react' | ||
|
||
import { DisclosureList } from '~/components/Disclosure/DisclosureList' | ||
import { DisclosureListItem } from '~/components/Disclosure/DisclosureListItem' | ||
import { H3 } from '~/components/Text' | ||
import { TSectionDetails } from '../data.const/types' | ||
import { SectionDetailsItem } from './SectionDetailsItem' | ||
|
||
type Props = { | ||
details: TSectionDetails[] | ||
} | ||
|
||
export const SectionDetails: React.FC<Props> = ({ details }) => { | ||
return ( | ||
<div className="m-auto mb-20 space-y-6 divide-y divide-white border-y bg-gray-200 px-6 pb-6 md:mx-10 md:px-10"> | ||
<h3 className="mb-8 mt-14 text-center text-[32px] font-bold text-sky-700"> | ||
Detailinfos | ||
</h3> | ||
{details.map((detail) => { | ||
return <SectionDetailsItem detail={detail} /> | ||
})} | ||
<div> | ||
<H3>Detailinfos</H3> | ||
<DisclosureList> | ||
{details.map((detail) => { | ||
return ( | ||
<DisclosureListItem | ||
key={detail.no} | ||
no={detail.no} | ||
title={detail.title} | ||
> | ||
<div>{detail.body}</div> | ||
</DisclosureListItem> | ||
) | ||
})} | ||
</DisclosureList> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️