diff --git a/Dockerfile b/Dockerfile index b1ff4b3..bfb77aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,8 @@ RUN apt-get update -y \ WORKDIR /code +RUN git config --global --add safe.directory /code + FROM base AS full-client COPY ./package.json ./yarn.lock /code/ diff --git a/app/Base/components/Navbar/index.tsx b/app/Base/components/Navbar/index.tsx index 578768c..57ff616 100644 --- a/app/Base/components/Navbar/index.tsx +++ b/app/Base/components/Navbar/index.tsx @@ -233,6 +233,12 @@ function Navbar(props: Props) { )} )} + + {strings.donationsButtonLabel} + {routes.login.load({ className })} + + {routes.donations.load({ className })} + import('#views/Donations')), + componentProps: { + }, + visibility: 'is-anything', +}); const forgotPassword = wrap({ path: '/forgot-password/', title: `${title} - Forgot Password`, @@ -140,6 +149,7 @@ const eBook = wrap({ const routes = { register, login, + donations, home, myProfile, wishList, diff --git a/app/resources/img/donate-books.png b/app/resources/img/donate-books.png new file mode 100644 index 0000000..cf9c897 Binary files /dev/null and b/app/resources/img/donate-books.png differ diff --git a/app/resources/img/donate-website.png b/app/resources/img/donate-website.png new file mode 100644 index 0000000..430467e Binary files /dev/null and b/app/resources/img/donate-website.png differ diff --git a/app/resources/img/money.png b/app/resources/img/money.png new file mode 100644 index 0000000..6531493 Binary files /dev/null and b/app/resources/img/money.png differ diff --git a/app/views/Donations/index.tsx b/app/views/Donations/index.tsx new file mode 100644 index 0000000..f054e87 --- /dev/null +++ b/app/views/Donations/index.tsx @@ -0,0 +1,120 @@ +import React from 'react'; +import { _cs } from '@togglecorp/fujs'; +import { + Container, + Heading, + ButtonLikeLink, +} from '@the-deep/deep-ui'; +import { IoOpenOutline } from 'react-icons/io5'; + +import { donations } from '#base/configs/lang'; +import DonateMoney from '#resources/img/money.png'; +import DonateBooks from '#resources/img/donate-books.png'; +import DonateWebsite from '#resources/img/donate-website.png'; +import useTranslation from '#base/hooks/useTranslation'; + +import styles from './styles.css'; + +interface Props { + className?: string; +} + +function Donations(props: Props) { + const { className } = props; + const strings = useTranslation(donations); + + return ( +
+
+ +

+ {strings.donationsDescription1} +

+

+ {strings.donationsDescription2} +

+

+ {strings.donationsDescription3} +

+
+
+
+ logo + + {strings.donateMoneyHeading} + +
+ {strings.donateMoneyDescription} +
+
+ } + className={styles.button} + variant="tertiary" + > + {strings.linkToTheFormButtonLabel} + +
+
+
+ logo + + {strings.donateSecondHandBooksHeading} + +
+ {strings.donateSecondHandBooksDescription} +
+
+ } + className={styles.button} + variant="tertiary" + > + {strings.linkToTheFormButtonLabel} + +
+
+
+ logo + + {strings.donateBooksFromWebsiteHeading} + +
+ {strings.donateBooksFromWebsiteDescription} +
+
+
+ {strings.contactUsAt} +
+
+
+
+
+
+ ); +} + +export default Donations; diff --git a/app/views/Donations/styles.css b/app/views/Donations/styles.css new file mode 100644 index 0000000..85d0be0 --- /dev/null +++ b/app/views/Donations/styles.css @@ -0,0 +1,73 @@ +.about { + display: flex; + align-items: center; + flex-direction: column; + padding: var(--dui-spacing-extra-large); + + .page-content { + display: flex; + flex-wrap: wrap; + width: 100%; + max-width: var(--kitab-page-max-width); + gap: var(--dui-spacing-medium); + + * { + overflow: unset; + } + + .donations-text { + background-color: unset; + padding: var(--dui-spacing-large); + } + + .donate-cards { + display: grid; + grid-gap: var(--dui-spacing-large); + grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); + padding: var(--dui-spacing-large); + width: 100%; + + .donate-item { + display: flex; + align-items: center; + flex-direction: column; + justify-content: flex-end; + gap: var(--dui-spacing-large); + border: var(--dui-width-separator-thin) solid var(--dui-color-separator); + border-radius: var(--kitab-radius-border); + background-color: var(--dui-color-foreground); + padding: var(--dui-spacing-large); + min-width: 15rem; + height: 18rem; + + .icon { + width: 5rem; + height: 5rem; + object-fit: contain; + } + + .description { + text-align: center; + color: var(--dui-color-label); + font-size: var(--dui-font-size-medium); + } + + .end-wrapper { + display: flex; + align-items: flex-end; + flex-grow: 1; + + .button { + justify-self: flex-end; + } + } + } + + @media (max-width: 435px) { + .donate-item { + min-width: 13rem; + } + } + } + } +}