aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/layout/summary.tsx
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components): replace Summary component with PostPreviewArmand Philippot2023-11-111-235/+0
| | | | | | | | | | | * 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 Card componentArmand Philippot2023-11-111-39/+53
| | | | | | | | | | | | | * 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-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-42/+133
| | | | | | 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-11/+9
| | | | | | | | 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): rewrite Link componentArmand Philippot2023-11-111-3/+5
| | | | | | | | | * rename `external` prop to `isExternal` * rename `download` prop to `isDownload` * rewrite CSS to reduce code length and complexity * move link styles in Sass placeholders to avoid repeats because of WordPress articles * move NavLink component to molecules
* refactor(components): rewrite DescriptionList componentArmand Philippot2023-11-111-10/+1
| | | | | | | | | | | | | * add a `spacing` prop * replace `layout` prop with `isInline` prop * remove `items` prop (and classNames props) in favor of new components: Description, Group, Term * remove `withSeparator` prop (CSS content is announced by screen readers and Firefox/Safari have no support for alternative text so the consumer should add itself an element with `aria-hidden` if it need a separator) Be aware, Meta component and its consumers can be visually broken, they should be refactored before using them in production.
* feat(components): replace icons with a generic Icon componentArmand Philippot2023-10-241-3/+5
| | | | | Sizes are also predefined and can be set using the `size` prop, so the consumers should no longer adjust the size in CSS.
* refactor(components): rewrite Button and ButtonLink componentsArmand Philippot2023-10-241-5/+11
| | | | | | | | | | | | | | 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: use named export for everything except pagesArmand Philippot2023-09-201-15/+18
| | | | | | 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-10/+10
| | | | | | 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-1/+5
|
* fix: ensure all topics/thematics have the base urlArmand Philippot2022-05-231-2/+2
|
* refactor: reduce the number of data transformationArmand Philippot2022-05-231-50/+23
|
* chore: improve accessibilityArmand Philippot2022-05-151-1/+2
|
* chore: handle blog paginationArmand Philippot2022-05-131-2/+9
|
* chore: add the Blog index pageArmand Philippot2022-05-131-11/+53
|
* refactor: rewrite DescriptionList and Meta componentsArmand Philippot2022-05-091-19/+14
| | | | | | 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.
* refactor(storybook): reorganize design systemArmand Philippot2022-04-201-2/+2
| | | | | Add more stories for each components and change some components categories for better organization.
* refactor: support React 18Armand Philippot2022-04-161-32/+45
| | | | | | | | I replaced the deprecated VFC type with FC type and made all children explicits. Formatjs is still not compatible with React 18 so I need to skip type checking when comitting. There are some type errors because of IntlProvider in Storybook stories.
* chore: add a Summary componentArmand Philippot2022-04-121-0/+105