プロフィールトップに最近のシコ草を移動

This commit is contained in:
shibafu
2020-05-24 19:03:15 +09:00
parent 8ac65f1cc6
commit 8fb8677406
4 changed files with 60 additions and 10 deletions

15
resources/assets/js/user/profile.js vendored Normal file
View File

@@ -0,0 +1,15 @@
import CalHeatMap from 'cal-heatmap';
if (document.getElementById('cal-heatmap')) {
new CalHeatMap().init({
itemSelector: '#cal-heatmap',
domain: 'month',
subDomain: 'day',
domainLabelFormat: '%Y/%m',
weekStartOnMonday: false,
start: new Date().setMonth(new Date().getMonth() - 9),
range: 10,
data: JSON.parse(document.getElementById('count-by-day').textContent),
legend: [1, 2, 3, 4]
});
}