aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/contact.tsx
Commit message (Collapse)AuthorAgeFilesLines
* refactor(pages): rewrite helpers to output schema in json-ld formatArmand Philippot2023-12-141-32/+15
| | | | | | | | | | | | | * make sure url are absolutes * nest breadcrumb schema in webpage schema * trim HTML tags from content/description * use a regular script instead of next/script (with the latter the schema is not updated on route change) * place the script in document head * add keywords, wordCount and readingTime keys in BlogPosting schema * fix breadcrumbs in search page (without query) * add tests (a `MatchInlineSnapshot` will be better but Prettier 3 is not supported yet)
* refactor(hooks): rewrite useBreadcrumbs hookArmand Philippot2023-12-121-12/+8
| | | | | | | * use next/router to get the slug instead of using props * handle cases where the current page title is not provided * update JSON-LD schema to match the example in documentation * add tests
* refactor(pages): refine Contact pageArmand Philippot2023-12-111-46/+42
| | | | | | | * remove next/router dependency * remove pageTitle since it is defined in MDX * reduce statements by grouping messages * mock response with MSW and add test for sendEmail
* refactor(components): replace PageLayout template with PageArmand Philippot2023-11-201-46/+45
| | | | | | | | | * split pages in smaller components (it is both easier to maintain and more readable, we avoid the use of fragments in pages directory) * extract breadcrumbs from article tag (the navigation is not related to the page contents) * remove useReadingTime hook * remove layout options except `isHome`
* refactor(hooks): remove useSettings hookArmand Philippot2023-11-151-8/+8
| | | | | | | It does not make sense to re-export an existing object through a hook. On some pages both the hook and the object was imported... It is better to use the CONFIG (previously settings) object directly and by doing it we avoid potential errors because of conditional hooks.
* refactor(components): replace SocialMedia with SocialMediaWidgetArmand Philippot2023-11-131-2/+2
| | | | | | * the goal is to make the name of the widgets coherent * remove useless CSS * replace Media type with SocialMediaData
* refactor(components): rewrite ContactForm componentArmand Philippot2023-11-111-39/+32
| | | | | | * remove `Notice` props to handle it directly inside the form * replace `sendMail` prop with `onSubmit` prop * use `useForm` hook to handle fields
* refactor(components): merge HeadingButton and Widget componentsArmand Philippot2023-11-111-2/+6
| | | | | | The HeadingButton component was only used inside Widget component and it is not very useful on its own so I merge the two components in a new Collapsible component.
* refactor(components): rewrite SocialLink componentArmand Philippot2023-11-111-3/+30
| | | | | * replace default label with a label prop * rename name prop to icon prop
* refactor(components): rewrite Notice componentArmand Philippot2023-11-111-5/+3
| | | | * Rename message prop to children prop and set ReactNode as type
* refactor(routes): replace hardcoded routes with constantsArmand Philippot2023-10-241-42/+60
| | | | | | | | It makes it easier to change a route if needed and it avoid typo mistakes. I also refactored a bit the concerned files to be complient with the new ESlint config. However, I should rewrite the pages to reduce the number of statements.
* refactor(components): rewrite form componentsArmand Philippot2023-10-241-7/+9
|
* refactor: use named export for everything except pagesArmand Philippot2023-09-201-12/+13
| | | | | | Next expect a default export for pages so only those components should use default exports. Everything else should use named exports to reduce the number of import statements.
* refactor(build): replace paths aliases with relative pathsArmand Philippot2023-09-191-19/+19
| | | | | | Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases.
* refactor(schema): use helpers function to avoid repeat between pagesArmand Philippot2022-05-231-38/+22
|
* chore: use persistent layoutArmand Philippot2022-05-171-3/+8
| | | | | It prevents to rerender the common components between pages (header, footer...).
* refactor: use custom hook for breadcrumb items and schemaArmand Philippot2022-05-161-13/+9
|
* refactor: rewrite DescriptionList and Meta componentsArmand Philippot2022-05-091-2/+2
| | | | | | The meta can have different layout. The previous implementation was not enough to easily change the layout. Also, I prefer to restrict the meta types and it prevents me to repeat myself for the labels.
* chore: add a Contact pageArmand Philippot2022-05-071-0/+181
|
* chore: remove old pages, components, helpers and typesArmand Philippot2022-04-291-151/+0
| | | | | Since I'm using new components, I will also rewrite the GraphQL queries so it is easier to start from scratch.
* refactor: use formatjs swc pluginArmand Philippot2022-03-231-0/+7
| | | | | I'm not able to configure SWC plugins in Next.js so to make it works, all translation must have an id.
* refactor: replace script tags with next/script (#10)Armand Philippot2022-02-211-4/+6
| | | | | | | | * refactor: replace script tags with next/script Since next.js v12.1.0 some warnings was displayed because I was using some script tags. * build(deps): bump next-themes to v0.1.1
* refactor: extract contact form from contact pageArmand Philippot2022-02-101-141/+2
| | | | | The contact page file was too long. By extracting the contact form the readability is improved.
* chore: improve contact form behaviorArmand Philippot2022-02-101-5/+37
| | | | | | | * The status was not visile in top of the form, so I moved it under the submit button. * It was possible to send an empty form. * The input type for email should be email instead of text.
* refactor(config): move config from config dir to utilsArmand Philippot2022-01-291-12/+12
|
* chore: replace lingui functions with react-intlArmand Philippot2022-01-291-19/+76
|
* chore(i18n): replace i18n provider and helpersArmand Philippot2022-01-291-8/+8
|
* fix: handle translation with linguiArmand Philippot2022-01-281-6/+4
| | | | | | | | The previous method was not working so I tried a different approach. Translation is loaded but I'm still getting warnings: * Plurals for locale undefined aren't loaded * Text content did not match I can't figure how to fix them...
* chore: add opengraph and twitter metaArmand Philippot2022-01-191-3/+8
|
* refactor(config): move defaultLocale as property of config.localesArmand Philippot2022-01-191-1/+1
| | | | | I will need the country code, so I think it makes more sense to gather them inside the same property.
* chore: add structured data using schema.org and JSON-LDArmand Philippot2022-01-191-0/+40
| | | | I also added the featured image on single article.
* chore: update sidebar and widgets stylesArmand Philippot2022-01-151-2/+2
| | | | | | | | | I'm now using a widget that can be expanded/collapsed. It also allows me to handle more effectively widgets overflow and to avoid styles repetitions. However, with stylelint rule "no-descending-specificity", I'm not sure if the stylesheets are really logical... Maybe I should deactivate this rule.
* refactor(sidebar): use a component to avoid styles repetitionArmand Philippot2022-01-111-2/+3
| | | | | | I also fix some overflow/sticky issues. I have to set overflow auto only when there is no button-like links otherwise, with translate, the button is cropped on hover.
* chore: add a social media widget on contact and cv pagesArmand Philippot2022-01-101-0/+9
|
* chore: move Main grid to its childrenArmand Philippot2022-01-061-2/+5
| | | | This way I can use full width background for some blocks.
* refactor: reuse PostMeta components on single articles/pagesArmand Philippot2022-01-061-3/+5
|
* refactor(sharing): avoid nested template literalsArmand Philippot2022-01-041-1/+2
| | | | | This improves readability. I also rename a variable to avoid duplicate between global scope and useEffect scope.
* chore: add a breadcrumb componentArmand Philippot2021-12-211-3/+6
|
* refactor: rewrite types and servicesArmand Philippot2021-12-201-2/+8
| | | | | | | I was repeating myself a lot in services. So I rewrited the different functions to improve readability and I extracted some formatting functions to put them in utils. I also rewrited/reorganized some types to keep consistent names.
* chore: create mutation to send mail from contact formArmand Philippot2021-12-171-2/+22
|
* chore: create contact pageArmand Philippot2021-12-161-0/+104