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:
12
views/partials/co2.pug
Normal file
12
views/partials/co2.pug
Normal file
@@ -0,0 +1,12 @@
|
||||
- function g(v) { return v != null ? v.toFixed(4)+' g CO₂' : '—'; }
|
||||
|
||||
div(class='bg-white border border-gray-200 rounded-xl p-5')
|
||||
h2(class='text-base font-semibold mb-4') Sustainability & CO₂
|
||||
if job.co2_per_page_view == null
|
||||
p(class='text-sm text-gray-400') No CO₂ data collected.
|
||||
else
|
||||
div(class='grid grid-cols-2 sm:grid-cols-4 gap-3')
|
||||
each item in [['Per page view', job.co2_per_page_view], ['Total', job.co2_total], ['First-party', job.co2_first_party], ['Third-party', job.co2_third_party]]
|
||||
div(class='metric-card text-center')
|
||||
div(class='text-lg font-bold text-green-700')= g(item[1])
|
||||
div(class='text-xs text-gray-500 mt-1')= item[0]
|
||||
Reference in New Issue
Block a user