CGI-Lingua
view release on metacpan or search on metacpan
scripts/generate_index.pl view on Meta::CPAN
.icon-link {
text-decoration: none;
}
.icon-link:hover {
opacity: 0.7;
cursor: pointer;
}
.coverage-badge {
padding: 2px 6px;
border-radius: 4px;
font-weight: bold;
color: white;
font-size: 0.9em;
}
.badge-good { background-color: #4CAF50; }
.badge-warn { background-color: #FFC107; }
.badge-bad { background-color: #F44336; }
.summary-row {
font-weight: bold;
background-color: #f0f0f0;
}
td.positive { color: green; font-weight: bold; }
td.negative { color: red; font-weight: bold; }
td.neutral { color: gray; }
// Show cursor points on the headers to show that they are clickable
th { background-color: #f2f2f2; cursor: pointer; }
th.sortable {
cursor: pointer;
user-select: none;
white-space: nowrap;
}
th .arrow {
color: #aaa; /* dimmed for inactive */
font-weight: normal;
}
th .arrow.active {
color: #000; /* dark for active */
font-weight: bold;
}
.sparkline {
display: inline-block;
vertical-align: middle;
}
</style>
</head>
<body>
<div class="badges">
<a href="https://github.com/nigelhorne/CGI-Lingua">
scripts/generate_index.pl view on Meta::CPAN
y: { beginAtZero: true, max: 100, title: { display: true, text: 'Coverage (%)' } }
}, plugins: {
legend: {
display: true,
position: 'top', // You can also use 'bottom', 'left', or 'right'
labels: {
boxWidth: 12,
padding: 10,
font: {
size: 12,
weight: 'bold'
}
}
}, tooltip: {
callbacks: {
label: function(context) {
const raw = context.raw;
const coverage = raw.y.toFixed(1);
const delta = raw.delta?.toFixed(1) ?? '0.0';
const sign = delta > 0 ? '+' : delta < 0 ? '-' : '±';
// const baseLine = `${raw.label}: ${coverage}% (${sign}${Math.abs(delta)}%)`;
scripts/generate_index.pl view on Meta::CPAN
// Reattach rows: sorted normalRows first, then fixedRows (keeps summary/total last)
normalRows.forEach(r => table.tBodies[0].appendChild(r));
fixedRows.forEach(r => table.tBodies[0].appendChild(r));
// Update header arrows
const headers = table.tHead.rows[0].cells;
for (let i = 0; i < headers.length; i++) {
const arrow = headers[i].querySelector(".arrow");
if (!arrow) continue;
if (i === n) {
// active column: bold arrow, direction â² or â¼
arrow.textContent = asc ? "â²" : "â¼";
arrow.classList.add("active");
} else {
// inactive column: always â², dimmed
arrow.textContent = "â²";
arrow.classList.remove("active");
}
}
// Remember state (so clicking same column toggles)
( run in 3.500 seconds using v1.01-cache-2.11-cpan-5623c5533a1 )