feat: initial Speedboard implementation
sitespeed.io web UI with Express/Pug/SQLite — port 3132. Includes job queue, SSE live log, full metrics dashboard, site history, CO2/axe/CWV sections, and Docker support. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
15
views/partials/axe.pug
Normal file
15
views/partials/axe.pug
Normal file
@@ -0,0 +1,15 @@
|
||||
- function num(v) { return v != null ? v : '—'; }
|
||||
- const hasAxe = job.axe_critical != null || job.axe_serious != null
|
||||
|
||||
div(class='bg-white border border-gray-200 rounded-xl p-5')
|
||||
h2(class='text-base font-semibold mb-4') Accessibility (axe)
|
||||
if !hasAxe
|
||||
p(class='text-sm text-gray-400') No axe data collected.
|
||||
else
|
||||
div(class='grid grid-cols-2 sm:grid-cols-4 gap-3')
|
||||
each item in [['Critical', job.axe_critical, 'bg-red-50 border-red-300 text-red-700'], ['Serious', job.axe_serious, 'bg-orange-50 border-orange-300 text-orange-700'], ['Moderate', job.axe_moderate, 'bg-yellow-50 border-yellow-300 text-yellow-700'], ['Minor', job.axe_minor, 'bg-blue-50 border-blue-300 text-blue-700']]
|
||||
div(class=`metric-card border ${item[2]} text-center`)
|
||||
div(class='text-2xl font-bold')= num(item[1])
|
||||
div(class='text-xs mt-1')= item[0]
|
||||
if job.axe_critical === 0 && job.axe_serious === 0
|
||||
p(class='text-sm text-green-600 mt-3 font-medium') No critical or serious violations found.
|
||||
Reference in New Issue
Block a user