aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components): rewrite Breadcrumbs componentArmand Philippot2023-11-111-34/+53
|
* refactor(components): rewrite Code component and usePrism hookArmand Philippot2023-11-115-183/+309
| | | | | | | | | | | | * move Prism styles to Sass placeholders to avoid repeats * let usePrism consumer define its plugins (remove default ones) * remove `plugins` prop from Code component * add new props to Code component to let consumer configure plugins (and handle plugin list from the given options) However there are some problems with Prism plugins: line-highlight and treeview does not seems to be loaded. I don't want to use Babel instead of SWC so I have no solution for now.
* feat(components): add a Time componentArmand Philippot2023-11-112-41/+0
| | | | | | 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): rewrite Branding componentArmand Philippot2023-11-112-28/+0
| | | | | | 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.
* refactor(routes): replace hardcoded routes with constantsArmand Philippot2023-10-245-45/+82
| | | | | | | | 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-2035-132/+114
| | | | | | 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-1920-44/+44
| | | | | | 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.
* fix(projects): load content dynamically and refresh table of contentsArmand Philippot2022-09-212-1/+40
| | | | | | | The previous way of handling content import was causing issue. So I use dynamic import instead. However, the table of contents was not displayed because the wrapper is first empty. I added a mutation observer to refresh the table of contents when the body is updated.
* fix(comments): load all comments on a postArmand Philippot2022-08-211-20/+7
| | | | | | | | | Previously, only the first 10 comments was loaded. So I update the fetching method to retrieve all the comments on a post. Also, I choose to order comments on client side because of a bug with WPGraphQL. Finally, I renamed the Comment type to SingleComment to avoid conflict with existing types.
* refactor(types): move and rename GraphQL typesArmand Philippot2022-08-204-12/+25
| | | | | | | The api file in services was not really readable. So I move the types and I also rewrite a little the fetch function. I also rename most of the type to avoid conflict with preexisting types (like Node) and to keep consistency.
* fix(article): prevent TypeError on buildArmand Philippot2022-07-232-8/+25
| | | | | | By switching to custom hooks for revalidating articles and comments, everything was working on development mode but articles failed to build for production.
* refactor(article): wrap useSWR with a custom hook to revalidate articleArmand Philippot2022-07-222-4/+28
|
* fix(comments): refresh comments on changes or new commentArmand Philippot2022-07-221-0/+33
|
* fix(settings): close tooltip when modal is closingArmand Philippot2022-06-082-46/+52
| | | | | The event was not captured so the tooltip remained open when the settings was closed. It prevented to click on the toolbar buttons.
* chore: use image title as figure label if no caption is providedArmand Philippot2022-06-071-0/+1
|
* chore: replace the toggle componentArmand Philippot2022-06-011-0/+19
|
* build(deps): bump all dependenciesArmand Philippot2022-05-251-21/+0
| | | | | | | 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: close search form when launching searchArmand Philippot2022-05-241-0/+12
|
* chore: give autofocus to the toolbar search formArmand Philippot2022-05-241-0/+39
|
* fix: ensure all topics/thematics have the base urlArmand Philippot2022-05-231-10/+6
|
* refactor(schema): use helpers function to avoid repeat between pagesArmand Philippot2022-05-231-0/+224
|
* refactor: reduce the number of data transformationArmand Philippot2022-05-231-17/+32
|
* fix: close Ackee tooltip on button clickArmand Philippot2022-05-211-2/+5
| | | | | | | The tooltip was closing and reopening on click because of a conflict between the button event and the hook useClickOutside. By checking that the event target is not the button, the tooltip is now closing as expected.
* chore: handle blog pagination when JS is disabledArmand Philippot2022-05-202-1/+35
|
* refactor: rewrite Prism hooks and providersArmand Philippot2022-05-199-254/+294
| | | | | It avoid some hydratation errors on project pages (not in article however) and the hooks are now reusable.
* chore: handle settings changeArmand Philippot2022-05-186-1/+126
|
* chore: close toolbar modals on click/focus outsideArmand Philippot2022-05-181-0/+43
|
* chore: add branding animationArmand Philippot2022-05-181-0/+29
|
* chore: listen scroll to hide/show back to top buttonArmand Philippot2022-05-171-0/+15
|
* chore: adjust and complete missing stylesArmand Philippot2022-05-162-1/+64
| | | | | | * add logo to topics pages and links * add Prism styles to articles * and a few other adjustements
* refactor: use custom hook for breadcrumb items and schemaArmand Philippot2022-05-161-0/+106
|
* chore: add Search pageArmand Philippot2022-05-152-1/+25
|
* chore: add Thematic pageArmand Philippot2022-05-131-1/+46
|
* chore: handle blog paginationArmand Philippot2022-05-132-2/+127
|
* chore: add the Blog index pageArmand Philippot2022-05-131-0/+58
|
* chore: add Project single pagesArmand Philippot2022-05-135-51/+108
|
* refactor: rewrite DescriptionList and Meta componentsArmand Philippot2022-05-091-15/+0
| | | | | | 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.
* chore: add a Contact pageArmand Philippot2022-05-072-1/+8
|
* chore: add a Projects pageArmand Philippot2022-05-051-0/+85
|
* chore: add a LegalNotice pageArmand Philippot2022-05-031-5/+5
|
* chore: add homepageArmand Philippot2022-05-031-0/+112
|
* chore: fetch posts for rss feedArmand Philippot2022-05-025-19/+156
|
* chore: remove old pages, components, helpers and typesArmand Philippot2022-04-299-602/+5
| | | | | Since I'm using new components, I will also rewrite the GraphQL queries so it is easier to start from scratch.
* chore: add a PageLayout componentArmand Philippot2022-04-252-3/+44
|
* chore: add a Layout componentArmand Philippot2022-04-221-1/+1
| | | | It defines the different components used by all other layouts.
* chore: add a TableOfContents componentArmand Philippot2022-04-221-0/+153
|
* chore: add a Code componentArmand Philippot2022-04-191-0/+115
|
* refactor: load prism plugins without babelArmand Philippot2022-03-242-13/+16
|
* refactor: update graphql queries (#14)Armand Philippot2022-03-091-3/+3
| | | | | | | | | | | | | | | | | | * refactor: replace postBy query postBy is now deprecated in WPGraphQL v1.7 * refactor: update post comments query PostBy is deprecated and it is now possible to use the post ID to query comments. * refactor: update get topic by slug query topicBy is deprecated * refactor: update get thematic by slug query thematicBy is deprecated
* feat: provide pagination for users with js disabled (#13)Armand Philippot2022-03-091-1/+16
| | | | | | | | | * chore: add a Pagination component * chore: add blog pages * chore: fallback to page number based navigation if JS disabled * chore: update translation