aboutsummaryrefslogtreecommitdiffstats
path: root/src/i18n
Commit message (Collapse)AuthorAgeFilesLines
* 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".
* refactor: split posts meta into smaller componentsArmand Philippot2022-03-012-98/+106
|
* fix: translate Ackee tooltip titleArmand Philippot2022-02-232-1/+9
|
* fix: typo in french translationArmand Philippot2022-02-231-1/+1
|
* chore: update translationsArmand Philippot2022-02-232-0/+72
|
* chore: add a banner for users with JS disabledArmand Philippot2022-02-142-0/+8
|
* chore: display initial posts, thematics & topicsArmand Philippot2022-02-142-40/+8
| | | | | By fetching the data in getStaticProps, I can display the data even for users with Javascript disabled.
* chore: load recent posts on homepage during buildArmand Philippot2022-02-142-8/+0
| | | | This way, even whithout JS, user can see the latest posts.
* chore: improve comment form user experienceArmand Philippot2022-02-142-16/+72
|
* chore: add some noscript tags to explain why the data are not loadedArmand Philippot2022-02-132-0/+56
|
* chore: update some texts to reduce its widthArmand Philippot2022-02-132-22/+22
| | | | | | | In French, "Utiliser le thème sombre" was a little too long, so instead I decided to remove the "Toggle" word and add an icon to help user understand the button purpose. Same way, "Aucune étoile" was too long, so I replace it with "0 étoile"
* chore: improve accessibilityArmand Philippot2022-02-112-0/+112
|
* refactor: extract contact form from contact pageArmand Philippot2022-02-102-62/+62
| | | | | The contact page file was too long. By extracting the contact form the readability is improved.
* chore: improve contact form behaviorArmand Philippot2022-02-102-0/+8
| | | | | | | * 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.