aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/mentions-legales.tsx
Commit message (Collapse)AuthorAgeFilesLines
* fix(pages): use dynamic imports for the table of contentsArmand Philippot2023-12-181-5/+9
| | | | | | | The ToCWidget relies on Javascript to display the headings. If JS is disabled in the browser, the widget is empty. For a better UX, we should use dynamic imports. Now, the ToC is only displayed when JS is enabled.
* 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 LegalNotice pageArmand Philippot2023-12-091-8/+6
| | | | | | * remove unnecessary dependency (useRouter) * fix React errors (blurWidth/blurHeight) * complete Cypress tests
* refactor(pages): refine Project pagesArmand Philippot2023-12-081-1/+1
| | | | | | | | | | | * refactor ProjectOverview component to let consumers handle the value * extract project overview depending on Github to avoid fetching Github API if the project is not on Github * wrap dynamic import in a useMemo hook to avoid infinite rerender * fix table of contents by adding a useMutationObserver hook to refresh headings tree (without it useHeadingsTree is not retriggered once the dynamic import is done) * add Cypress tests
* refactor(components,pages): extract MDX components mapping from pagesArmand Philippot2023-11-221-16/+2
| | | | | | | Instead of repeating the overriding on each pages, we should define it in one place and reuse it in pages. By default it is not possible to override native HTML tags with MDX so I added a plugin in next config to allow it.
* refactor(components): replace PageLayout template with PageArmand Philippot2023-11-201-40/+39
| | | | | | | | | * 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(components): extract MetaItem from MetaListArmand Philippot2023-11-201-28/+26
| | | | | | * replace `items` prop on MetaList with `children` prop: it was too restrictive and the global options was not really useful. It is better too give control to the consumers.
* refactor(hooks): remove useSettings hookArmand Philippot2023-11-151-6/+6
| | | | | | | 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.
* feat(components): add a Time componentArmand Philippot2023-11-111-15/+3
| | | | | | Instead of using helpers functions to format the date each time we need to use a time element, it makes more sense to create a new component dedicated to this task.
* refactor(components): replace Meta component with MetaListArmand Philippot2023-11-111-8/+39
| | | | | | It removes items complexity by allowing consumers to use any label/value association. Translations should also be defined by the consumer. Each item can now be configured separately (borders, layout...).
* refactor(components): replace ResponsiveImage with Figure componentArmand Philippot2023-11-111-1/+8
| | | | | | | | The styles applied to ResponsiveImage are related to the figure and figcaption elements. Those elements could be use with other contents than images. So I extracted them in a Figure component. The ResponsiveImage component is no longer useful: the consumer should use the Image component from `next` and wrap it in a link if needed.
* refactor(routes): replace hardcoded routes with constantsArmand Philippot2023-10-241-14/+22
| | | | | | | | 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: use named export for everything except pagesArmand Philippot2023-09-201-10/+10
| | | | | | 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.
* build(deps): bump all dependenciesArmand Philippot2023-09-191-2/+2
| | | | | * MDX type has changed so some components props had to be updated * Since Storybook now supports TS, I renamed the main/preview files
* refactor(build): replace paths aliases with relative pathsArmand Philippot2023-09-191-16/+16
| | | | | | 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.
* chore: make Links and Images compliant with Next.js 13Armand Philippot2023-01-231-2/+2
|
* refactor(schema): use helpers function to avoid repeat between pagesArmand Philippot2022-05-231-41/+21
|
* chore: use persistent layoutArmand Philippot2022-05-171-2/+7
| | | | | It prevents to rerender the common components between pages (header, footer...).
* refactor: use custom hook for breadcrumb items and schemaArmand Philippot2022-05-161-14/+8
|
* refactor: rewrite DescriptionList and Meta componentsArmand Philippot2022-05-091-18/+8
| | | | | | 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 LegalNotice pageArmand Philippot2022-05-031-0/+140
|
* chore: remove old pages, components, helpers and typesArmand Philippot2022-04-291-150/+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/+3
| | | | | I'm not able to configure SWC plugins in Next.js so to make it works, all translation must have an id.
* feat: improve Ackee tracking (#11)Armand Philippot2022-02-231-1/+7
| | | | | | | | | | | | | | | | | * build(deps): add use-ackee hook package * chore: create a context provider for Ackee The provider allows users to change the 'detailed' settings. * chore: add a select menu to choose which info to share with Ackee * chore: add a tooltip for askee settings * chore: replace default select styles with custom styles * chore: register user choice in localstorage * chore: replace Matomo with Ackee in legal notice
* 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
* fix: make schema.org markup valid (#4)Armand Philippot2022-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 49c1b3b1556a0eb91c429a961fedd2bded8ffd47 Author: Armand Philippot <git@armandphilippot.com> Date: Wed Feb 16 15:17:52 2022 +0100 chore: add headline field to blogPosting schema commit 42214c6f032cc899ec252a9387be35dcad738546 Author: Armand Philippot <git@armandphilippot.com> Date: Wed Feb 16 15:09:11 2022 +0100 chore: update the searchAction markup and add query-input Google was complaining about "query-input" which is not in Schema.org representation. So I added it. commit 5f29226d937cbdcd262df2793f1588435d850f02 Author: Armand Philippot <git@armandphilippot.com> Date: Wed Feb 16 14:32:14 2022 +0100 chore: remove breadcrumb from homepage The breadcrumb is not displayed on the homepage, so the breadcrumb field should not appear inside Schema markup.
* refactor(config): move config from config dir to utilsArmand Philippot2022-01-291-13/+13
|
* chore: replace lingui functions with react-intlArmand Philippot2022-01-291-9/+26
|
* chore(i18n): replace i18n provider and helpersArmand Philippot2022-01-291-12/+12
|
* fix: handle translation with linguiArmand Philippot2022-01-281-5/+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-2/+2
| | | | | 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/+50
| | | | I also added the featured image on single article.
* chore: update sidebar and widgets stylesArmand Philippot2022-01-151-3/+4
| | | | | | | | | 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.
* chore: move Main grid to its childrenArmand Philippot2022-01-061-3/+6
| | | | This way I can use full width background for some blocks.
* refactor: reuse PostMeta components on single articles/pagesArmand Philippot2022-01-061-6/+22
|
* chore: replace legal notice page content with MDX contentArmand Philippot2021-12-241-15/+5
| | | | | I cannot use WordPress shortcodes from a custom plugin through WP GraphQL so I'm using mdx file instead to define the page content.
* chore: add a table of contentsArmand Philippot2021-12-211-2/+10
|
* chore: add a breadcrumb componentArmand Philippot2021-12-211-3/+4
|
* refactor: rewrite types and servicesArmand Philippot2021-12-201-2/+2
| | | | | | | 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 legal notice viewArmand Philippot2021-12-151-0/+48