summaryrefslogtreecommitdiffstats
path: root/src/utils
Commit message (Collapse)AuthorAgeFilesLines
* 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
* chore: use a different configuration depending on app envArmand Philippot2022-03-042-8/+17
| | | | | | It will be useful with Docker. Instead of cloning the project with a different configuration, I can manage two different configuration thanks to dotenv and some checking inside the app.
* feat: improve Ackee tracking (#11)Armand Philippot2022-02-231-0/+57
| | | | | | | | | | | | | | | | | * build(deps): add use-ackee hook package * chore: create a context provider for Ackee The provider allows users to change the 'detailed' settings. * chore: add a select menu to choose which info to share with Ackee * chore: add a tooltip for askee settings * chore: replace default select styles with custom styles * chore: register user choice in localstorage * chore: replace Matomo with Ackee in legal notice
* feat: replace Matomo with AckeeArmand Philippot2022-02-211-4/+5
| | | | | I do not use all Matomo features so I was searching a lightweight analytics tools. I will give a try to Ackee.
* feat: add HTTP security headersArmand Philippot2022-02-152-5/+5
| | | | | I also renamed and changed the format of some environment variables so I can reuse them inside the CSP security header.
* fix: update comments list when a new comment is sendArmand Philippot2022-02-141-8/+6
| | | | | The comments list was static before. If an user posted a comment, even after it was approved, the comments list was keeping the old state.
* chore(matomo): use another dependency to track page viewsArmand Philippot2022-02-142-7/+4
| | | | | | I though the previous package would track all visits with the provided but it seems that I need to add trackPageView on all pages. So I decided to use another package.
* chore: improve RSS feed generation timeArmand Philippot2022-02-131-10/+5
|
* chore(toc): exclude comments section for headings listArmand Philippot2022-02-121-1/+1
|