diff --git a/src/components/AccordionItem.tsx b/src/components/AccordionItem.tsx new file mode 100644 index 0000000..adfa39d --- /dev/null +++ b/src/components/AccordionItem.tsx @@ -0,0 +1,34 @@ +import type { ReactNode } from "react"; + +interface IProps { + children: ReactNode; + title: string; + id: string; +} + +const AccordionItem = ({ title, id, children }: IProps) => ( +
+
+ + +

{title}

+
+
+
+ +
+

+ {children} +

+
+
+); + +export default AccordionItem; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index e5f9ffe..fb74027 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,8 +1,8 @@ import { Link } from "@tanstack/react-router"; import { Image } from "@unpic/react"; +import AccordionItem from "#/components/AccordionItem.tsx"; import Feature from "#/components/Feature.tsx"; import Section from "#/components/Section.tsx"; - import examplePdf1 from "@/assets/images/examplepdf1.webp?url"; import examplePdf2 from "@/assets/images/examplepdf2.webp?url"; @@ -65,7 +65,30 @@ const Home = () => ( smallTitle="FAQs" description="Below we answer some of the most common questions we get regarding this service." > -

section content

+
+ + Yes. There are no current plans to charge for this service. If in the + future there is a payment plan, it will come with a generous free + tier. + + + + We have a lot more features to implement in the near future. If you + have a feature that you would like to see implemented, please feel + free to send us a message via our contact form. + + + + No. We will never implement any terms whereby we have any interest in + the materials created with this service. + +
); diff --git a/src/styles.css b/src/styles.css index 36a1959..d261c3e 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,4 +1,6 @@ @import "tailwindcss"; +@import "./styles/_accordion.css"; + @plugin "@tailwindcss/typography"; /* inter-latin-wght-normal */ @@ -92,33 +94,6 @@ body { } } - -/*a {*/ -/* text-decoration-thickness: 1px;*/ -/* text-underline-offset: 2px;*/ -/*}*/ - -/*a:hover {*/ -/* color: #246f76;*/ -/*}*/ - -/*.page-wrap {*/ -/* width: min(1080px, calc(100% - 2rem));*/ -/* margin-inline: auto;*/ -/*}*/ - -/*button,*/ -/*a {*/ -/* transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease,*/ -/* transform 180ms ease;*/ -/*}*/ - -/*@media (max-width: 640px) {*/ -/* .nav-link::after {*/ -/* bottom: -4px;*/ -/* }*/ -/*}*/ - .rise-in { animation: rise-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both; } diff --git a/src/styles/_accordion.css b/src/styles/_accordion.css new file mode 100644 index 0000000..5ce6f28 --- /dev/null +++ b/src/styles/_accordion.css @@ -0,0 +1,73 @@ +.hero__accordion-container { + grid-column: 1 / -1; + max-width: 600px; + padding: 1rem; +} + +.hero__accordion-item { + overflow: clip; + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 0.15s; + cursor: pointer; + padding: 1rem 0; +} + +.hero__accordion-item:not(:last-child) { + border-bottom: 1px solid var(--neutral-content); +} + +.hero__accordion-details[open] + .hero__accordion-item__content { + grid-template-rows: 1fr; + padding: 10px; +} + +.hero__accordion-details[open] .hero__accordion-item__title-container:after { + transform: rotate(270deg); +} + +.hero__accordion-item__summary { + display: block; + + &::-webkit-details-marker { + display: none; + } +} + +.hero__accordion-item__title-container { + display: flex; + justify-content: space-between; + + &:after { + content: "\276F"; + color: var(--base-content); + margin-right: 1rem; + transform: rotate(90deg); + transition: transform 0.3s ease; + } +} + +.hero__accordion-item__title { + color: var(--base-content); + font-size: 1.25rem; + font-weight: 600; +} + +.hero__accordion-item__content { + padding: 0 10px; + display: grid; + grid-template-rows: 0fr; + transition: + grid-template-rows 0.3s ease, + padding 0.3s ease; + + @media (prefers-reduced-motion) { + transition: none; + } +} + +.hero__accordion-item__content__inner { + color: var(--neutral-content); + overflow: hidden; + margin: 0; +}