[automated] update diyhrt.market

This commit is contained in:
github-actions
2026-01-19 02:03:34 +00:00
parent 0182a031da
commit 97cda1b60f
341 changed files with 372101 additions and 737 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
@font-face {
font-family: "Nunito Sans";
src: url("https://diyhrt.market/static/fonts/NunitoSans-Italic-VariableFont_YTLC,opsz,wdth,wght.ttf");
src: url("../fonts/NunitoSans-Italic-VariableFont_YTLC,opsz,wdth,wght.ttf");
font-weight: 200 1000;
font-style: italic;
}
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 377 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 183 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 380 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

File diff suppressed because one or more lines are too long
+116
View File
@@ -0,0 +1,116 @@
const priceChartElement = document.getElementById("price-chart");
const priceChartData = JSON.parse(document.getElementById("pricechart-data").textContent);
function skipped(ctx, value) {
output = !ctx.p0.raw.in_stock ? value : undefined;
return output;
}
priceChartData.datasets.forEach(
function (dataset) {
dataset.segment = {
borderColor: ctx => skipped(ctx, "rgba(0, 0, 0, 0)")
}
}
);
function afterLabelGen(tooltipItem) {
return tooltipItem.raw.state;
}
let start_date = new Date();
start_date.setDate(start_date.getDate() - 365);
let priceChart = new Chart(
priceChartElement,
{
type: 'line',
data: priceChartData,
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
xAxis: {
type: "time",
min: start_date,
max: new Date(),
},
yAxis: {
}
},
interaction: {
intersect: false,
axis: 'xAxis'
},
plugins: {
legend: {
labels: {
// This more specific font property overrides the global property
font: {
family: '"Nunito Sans", Cambria, "Times New Roman", Times, serif',
size: 16
}
}
},
tooltip: {
callbacks: {
afterLabel: afterLabelGen,
}
}
},
}
}
);
const actions = [
{
name: 'Step: false (default)',
handler: (chart) => {
chart.data.datasets.forEach(dataset => {
dataset.stepped = false;
});
chart.update();
}
},
{
name: 'Step: true',
handler: (chart) => {
chart.data.datasets.forEach(dataset => {
dataset.stepped = true;
});
chart.update();
}
},
{
name: 'Step: before',
handler: (chart) => {
chart.data.datasets.forEach(dataset => {
dataset.stepped = 'before';
});
chart.update();
}
},
{
name: 'Step: after',
handler: (chart) => {
chart.data.datasets.forEach(dataset => {
dataset.stepped = 'after';
});
chart.update();
}
},
{
name: 'Step: middle',
handler: (chart) => {
chart.data.datasets.forEach(dataset => {
dataset.stepped = 'middle';
});
chart.update();
}
}
];