aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates/layout/layout.tsx
Commit message (Collapse)AuthorAgeFilesLines
* refactor(hooks,provider): move reduce motion setterArmand Philippot2023-11-111-2/+0
| | | | | | | | | | Since the local storage key is not meant to change between the components, it should be set directly inside the app file. So both the local storage and the data attribute should be handle in a provider. I also added a custom document because we need a script to retrieve the stored value in local storage earlier to avoid flashing on hydration.
* refactor(hooks,providers): rewrite useAckee hook and AckeeProviderArmand Philippot2023-11-111-2/+0
|
* refactor(components): remove SiteHeader and SiteFooter componentsArmand Philippot2023-11-111-65/+86
| | | | | They do not help to make the layout more readable (on the contrary I think...) so the props drilling is useless.
* refactor(components): rewrite Copyright componentArmand Philippot2023-11-111-5/+3
| | | | | | | | | * remove `icon` prop (it is confusing because a copyright should have the copyright symbol, the license is not part of the copyright) * reorganize copyright informations I also updated the CC BY SA icon because the elements was in the wrong order.
* refactor(components): rewrite Branding componentArmand Philippot2023-11-111-16/+52
| | | | | | The component should only be responsible of the layout for the logo, the name and the optional baseline. Also, the homepage url could be different from `/` so the consumer should give the right url.
* feat(components): add a generic Flip componentArmand Philippot2023-11-111-3/+28
| | | | | | The flipping animation is used at several places so it makes sense to use a single component to handle the animation. It will avoid styles duplication.
* refactor(components): remove Column and NoScript from atomsArmand Philippot2023-11-111-3/+2
| | | | | | | * Column is a simple div meant to be used inside Columns component so they should live together. * NoScript is only used in Layout component and its name does not make sense since it needs to be used inside a `noscript` element.
* feat(components): replace icons with a generic Icon componentArmand Philippot2023-10-241-17/+12
| | | | | Sizes are also predefined and can be set using the `size` prop, so the consumers should no longer adjust the size in CSS.
* feat(components): add Article, Aside, Footer, Header, Main & NavArmand Philippot2023-10-241-9/+9
| | | | | Some components have been renamed to be able to create Footer, Header and Nav.
* refactor(components): rewrite Button and ButtonLink componentsArmand Philippot2023-10-241-1/+1
| | | | | | | | | | | | | | Both: * move styles to Sass placeholders Button: * add `isPressed` prop to Button * add `isLoading` prop to Button (to differentiate state from disabled) ButtonLink: * replace `external` prop with `isExternal` prop * replace `href` prop with `to` prop
* refactor(routes): replace hardcoded routes with constantsArmand Philippot2023-10-241-23/+37
| | | | | | | | 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-22/+28
| | | | | | 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-15/+15
| | | | | | 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: add aria hidden attribute to SVG iconsArmand Philippot2022-06-071-5/+25
|
* test(unit): fix Jest errors due to images importArmand Philippot2022-06-031-1/+1
| | | | | I mocked some SVG files and moves the branding photo to public directory. It is more a workaround than a real fix but it works so...
* fix: reset focus to top of the page on route changeArmand Philippot2022-05-251-2/+8
|
* build(deps): bump all dependenciesArmand Philippot2022-05-251-4/+5
| | | | | | | I moved the website picture from useSettings to the layout component since it is only used here. This reduce the number of Jest errors. However, there's still some issues with some images import...
* chore: handle settings changeArmand Philippot2022-05-181-4/+6
|
* chore: use persistent layoutArmand Philippot2022-05-171-22/+32
| | | | | It prevents to rerender the common components between pages (header, footer...).
* chore: listen scroll to hide/show back to top buttonArmand Philippot2022-05-171-2/+17
|
* refactor: use custom hook for breadcrumb items and schemaArmand Philippot2022-05-161-3/+23
|
* chore: add Search pageArmand Philippot2022-05-151-1/+2
|
* chore: add homepageArmand Philippot2022-05-031-19/+88
|
* chore: add a Layout componentArmand Philippot2022-04-221-0/+125
It defines the different components used by all other layouts.