[openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)
Holger Jeromin
notifications at github.com
Tue Dec 17 07:37:10 UTC 2024
@HolgerJeromin commented on this pull request.
> + const heatmapElement = document.querySelector("#cal-heatmap");
+
+ if (!heatmapElement) {
+ console.warn("Heatmap element not found in the DOM.");
+ return;
+ }
+
+
+ const heatmapData = heatmapElement.dataset.heatmap ? JSON.parse(heatmapElement.dataset.heatmap) : [];
+
+ try {
+ // eslint-disable-line no-undef
+ const cal = new CalHeatmap();
+ const applicationData = $("head").data();
+ const locale = applicationData.locale;
+ const theme = getTheme();
We can watch for change of color theme with
https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/change_event
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5402#pullrequestreview-2508058564
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5402/review/2508058564 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241216/2c7475a7/attachment.htm>
More information about the rails-dev
mailing list