aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/index.ts
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components): rewrite PostsList componentArmand Philippot2023-11-131-1/+1
| | | | | | | | | | | | | | | * 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-111-0/+1
| | | | | | * `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-111-0/+1
| | | | | | * 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-111-0/+1
| | | | | | | | | * 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-111-0/+1
| | | | | | | | | | | * 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): replace Toolbar with Navbar componentArmand Philippot2023-11-111-2/+1
| | | | | | | | * 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): rewrite Pagination componentArmand Philippot2023-11-111-0/+1
|
* feat(components): add a generic Grid componentArmand Philippot2023-11-111-1/+0
| | | | | * merge Columns, Gallery and CardsList into Grid component * add more options to control the grid
* refactor: use named export for everything except pagesArmand Philippot2023-09-201-0/+6
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.