aboutsummaryrefslogtreecommitdiffstats
path: root/src/i18n
Commit message (Collapse)AuthorAgeFilesLines
* fix(layout): refine pagination when JS is disabledArmand Philippot2023-12-192-16/+24
| | | | | | | | * fix the total number of pages * hide the load more button and the progress bar * remove the informative notice since it is no longer necessary * if the page number is equal to 1, use Blog route directly (NextJS is not able to redirect the user when JS is disabled)
* refactor(pages): rewrite helpers to output schema in json-ld formatArmand Philippot2023-12-142-16/+24
| | | | | | | | | | | | | * 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-122-22/+54
| | | | | | | * 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-112-8/+0
| | | | | | | * 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(pages): refine 404 pageArmand Philippot2023-12-092-22/+38
| | | | | * refresh topics and thematics list using hooks * add Cypress tests
* refactor(pages): refine Project pagesArmand Philippot2023-12-082-40/+40
| | | | | | | | | | | * 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(pages): refine Projects pageArmand Philippot2023-12-072-8/+16
| | | | | | | * add a `contexts` meta key to projects * replace `technologies` with `contexts` key in projects list * make getProjectsFilenames async * add Cypress tests
* refactor(pages): refine Search pageArmand Philippot2023-12-072-38/+62
| | | | | | | * extract NoResults component to improve readability * provide a different message when the url does not contain a query * use hooks to refresh Thematics and Topics lists * remove useDataFromApi hook
* refactor(pages): refine Blog pagesArmand Philippot2023-12-042-8/+40
| | | | | | | | | | * replace usePostsList with useArticlesList to keep names coherent * remove useIsMounted hook * rewrite useRedirection hook * add redirect in getStaticProps to avoid unecessary fetching * move Pagination component in a noscript tag * use hooks to refresh thematics and topics lists * complete Cypress tests
* refactor(pages): refine Topic pagesArmand Philippot2023-12-012-9/+17
| | | | | | * add useTopic and useTopicsList hooks to refresh data * add a table of contents * add Cypress tests
* refactor(pages): refine Thematic pagesArmand Philippot2023-12-012-9/+17
| | | | | | | | | | | * add a table of contents (however posts heading are not included) * rename posts list section title * add a useThematic hook to refresh thematic contents * add a useThematicLists hook to refresh thematics list * add a `notIn` filter in thematics list fetcher to directly remove unwanted thematics * add Cypress tests
* refactor(pages): refine Article pagesArmand Philippot2023-12-012-8/+32
| | | | | | | | | | | * use rehype to update code blocks class names * fix widget heading level (after a level 1 it should always be a level 2 and not 3) * replace Spinner with LoadingPage and LoadingPageComments components to keep layout coherent * refactor useArticle and useComments hooks * fix URLs in JSON LD schema * add Cypress tests
* refactor(pages): improve HomepageArmand Philippot2023-11-292-88/+16
| | | | | | | | | * move custom homepage components that does not require props to the MDX file (links should not need to be translated here but where they are defined) * move SEO title and meta desc to MDX file * make Page component the wrapper instead of using a React fragment * fix MDX module types
* refactor(components): split Layout component in smaller componentsArmand Philippot2023-11-222-137/+125
| | | | | The previous component was too long and hardly readable. So I splitted it in different part and added tests.
* refactor(components): replace PageLayout template with PageArmand Philippot2023-11-202-194/+150
| | | | | | | | | * 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-202-80/+0
| | | | | | * 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(components, hooks): rewrite ToC and useHeadingsTreeArmand Philippot2023-11-142-8/+8
| | | | | | | | | | | | * replace TableOfContents component with TocWidget to keep the name of widget components coherent * replace `wrapper` prop with `tree` prop (the component no longer uses the hook, it is up to the consumer to provide the headings tree) * let consumer handle the widget title * add options to useHeadingsTree hook to retrieve only the wanted headings (and do not assume that h1 is unwanted) * expect an ref object instead of an element in useHeadingsTree hook * rename most of the types involved
* refactor(components): replace Sharing with SharingWidget componentArmand Philippot2023-11-142-78/+70
| | | | | | | * all the widgets should have a coherent name * fix mailto uri * remove useless CSS * add tests
* refactor(components): rewrite PostsList componentArmand Philippot2023-11-132-69/+65
| | | | | | | | | | | | | | | * remove NoResults component and move logic to Search page * add a usePostsList hook * remove Pagination from PostsList (it is only used if javascript is disabled and not on every posts list) * replace `byYear` prop with `sortByYear` * replace `loadMore` prop with `onLoadMore` * remove `showLoadMoreBtn` (we can use `loadMore` prop instead to determine if we need to display the button) * replace `titleLevel` prop with `headingLvl` * add `firstNewResult` prop to handle focus on the new results when loading more article (we should not focus a useless span but the item directly)
* refactor(components): replace Overview with ProjectOverview componentArmand Philippot2023-11-112-52/+64
| | | | | | * `cover` prop is now expecting a ReactElement (NextImage) * `meta` prop is now limited to a specific set of meta items * add a `name` prop to add an accessible name to the figure element
* refactor(components): rewrite CommentsList componentArmand Philippot2023-11-112-8/+8
| | | | | | * use ApprovedCommentProps to make CommentData type * add the author name of the parent on reply form heading * add tests
* refactor(components): split Comment component into 3 componentsArmand Philippot2023-11-112-40/+48
| | | | | | | | | * add ApprovedComment, PendingComment and ReplyCommentForm components * let consumer handle reply form visibility * move structured data into article page (each article already has the comments data and already handle json ltd schema so I prefered to move the schema in the final consumer instead of adding a script element foreach comment)
* refactor(components): replace Summary component with PostPreviewArmand Philippot2023-11-112-78/+86
| | | | | | | | | | | * rename component to PostPreview because Summary is an HTML element and it could lead to confusion * replace `title` and `titleLevel` with `heading` and `headingLvl` because `title` is a native attribute * rename `intro` prop to `excerpt` * extract `cover` from `meta` prop * rewrite meta type * extract meta logic into a new component
* refactor(components): rewrite CommentForm componentArmand Philippot2023-11-112-8/+8
| | | | | | * remove `Notice` prop to handle it directly in the form * replace `saveComment` prop with `onSubmit` * use `useForm` hook to handle the form
* refactor(components): rewrite ContactForm componentArmand Philippot2023-11-112-8/+8
| | | | | | * remove `Notice` props to handle it directly inside the form * replace `sendMail` prop with `onSubmit` prop * use `useForm` hook to handle fields
* refactor(components): rewrite SearchForm componentArmand Philippot2023-11-112-0/+24
| | | | | | * remove searchPage prop (the consumer should handle the submit) * change onSubmit type * use `useForm` hook to handle the form
* refactor(components): replace Toolbar with Navbar componentArmand Philippot2023-11-112-62/+46
| | | | | | | | * remove SearchModal and SettingsModal components * add a generic NavbarItem component (instead of the previous toolbar items to avoid unreadable styles...) * move FlippingLabel component logic into NavbarItem since it is only used here
* refactor(components): remove SiteHeader and SiteFooter componentsArmand Philippot2023-11-112-8/+8
| | | | | They do not help to make the layout more readable (on the contrary I think...) so the props drilling is useless.
* refactor(components): rewrite Breadcrumbs componentArmand Philippot2023-11-112-16/+8
|
* refactor(components): rewrite Pagination componentArmand Philippot2023-11-112-32/+40
|
* feat(components): add a Colophon componentArmand Philippot2023-11-112-8/+0
|
* refactor(components): rewrite Card componentArmand Philippot2023-11-112-0/+16
| | | | | | | | | | | | | * make the component more generic * merge `<Summary />` and `<Comment />` styles into card component to avoid repeating the same structure * remove most of the props to use composition However the CSS is a bit complex because of the two variants... Also, the component should be refactored when the CSS pseudo-class `:has` has enough support: the provider and the `cover` and `meta` props should be removed.
* feat(components): add a Time componentArmand Philippot2023-11-112-8/+8
| | | | | | 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-112-122/+282
| | | | | | 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-112-16/+16
| | | | | | | | 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(components): merge HeadingButton and Widget componentsArmand Philippot2023-11-112-16/+0
| | | | | | 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 HelpButton componentArmand Philippot2023-11-112-9/+9
|
* refactor(components): rewrite BackToTop componentArmand Philippot2023-11-112-8/+8
| | | | | * replace `link` prop with `anchor` prop * add a `label` prop to let consumer handle the accessible name
* refactor(components): rewrite SocialLink componentArmand Philippot2023-11-112-0/+64
| | | | | * replace default label with a label prop * rename name prop to icon prop
* refactor(components): rewrite SharingLink componentArmand Philippot2023-11-112-8/+48
| | | | | * replace default label with label prop * simplify CSS rules
* refactor(components): rewrite Spinner componentArmand Philippot2023-10-242-8/+32
| | | | | | | * Message should be set as children * Default message is no longer available (depending on use case, the consumer might prefer aria-label instead) * It is now possible to define the message position
* feat(components): replace icons with a generic Icon componentArmand Philippot2023-10-242-8/+8
| | | | | 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-242-8/+8
| | | | | Some components have been renamed to be able to create Footer, Header and Nav.
* refactor(routes): replace hardcoded routes with constantsArmand Philippot2023-10-242-8/+16
| | | | | | | | 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-242-16/+8
|
* fix: ensure radio buttons are accessibleArmand Philippot2022-06-022-49/+49
| | | | | It seems I cannot use the SVG title as label. So I removed the title and added a visually hidden span to set the radio buttons label.
* chore: fix some typographic issuesArmand Philippot2022-05-251-53/+53
| | | | | | | | Formatjs (ICU actually) uses single quotes as escape character so some French translation had issues because of apostrophe. I replaced the character used. I took the opportunity to use the correct characters for some other typographic rules (non-breaking spaces, suspension points…)
* chore: update translationArmand Philippot2022-05-242-1056/+760
|
* feat: provide pagination for users with js disabled (#13)Armand Philippot2022-03-092-8/+40
| | | | | | | | | * chore: add a Pagination component * chore: add blog pages * chore: fallback to page number based navigation if JS disabled * chore: update translation
* chore(i18n): replace Subscribe translation textArmand Philippot2022-03-031-1/+1
| | | | In the context, "Vous abonner" is more accurated than "S'abonner".