diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png index c4f9fa0..8ea8ec7 100644 Binary files a/public/apple-touch-icon.png and b/public/apple-touch-icon.png differ diff --git a/public/icon-512-maskable.webp b/public/icon-512-maskable.webp index e96e889..f678270 100644 Binary files a/public/icon-512-maskable.webp and b/public/icon-512-maskable.webp differ diff --git a/public/icon-512.webp b/public/icon-512.webp index c847a1b..d635e76 100644 Binary files a/public/icon-512.webp and b/public/icon-512.webp differ diff --git a/public/images/accessories/pudu-carpet-vacuuming-assembly.webp b/public/images/accessories/pudu-carpet-vacuuming-assembly.webp index de18945..e50ab8f 100644 Binary files a/public/images/accessories/pudu-carpet-vacuuming-assembly.webp and b/public/images/accessories/pudu-carpet-vacuuming-assembly.webp differ diff --git a/public/images/accessories/pudu-conveyor-single-layer.webp b/public/images/accessories/pudu-conveyor-single-layer.webp index e958ff9..0cdecf9 100644 Binary files a/public/images/accessories/pudu-conveyor-single-layer.webp and b/public/images/accessories/pudu-conveyor-single-layer.webp differ diff --git a/public/images/accessories/pudu-elevator-control-module.webp b/public/images/accessories/pudu-elevator-control-module.webp index 883b1fa..a4f1e98 100644 Binary files a/public/images/accessories/pudu-elevator-control-module.webp and b/public/images/accessories/pudu-elevator-control-module.webp differ diff --git a/public/images/accessories/pudu-gate-control-module.webp b/public/images/accessories/pudu-gate-control-module.webp index aedec04..b11295d 100644 Binary files a/public/images/accessories/pudu-gate-control-module.webp and b/public/images/accessories/pudu-gate-control-module.webp differ diff --git a/public/images/accessories/pudu-mobile-water-station.webp b/public/images/accessories/pudu-mobile-water-station.webp index e149a54..da6ad7d 100644 Binary files a/public/images/accessories/pudu-mobile-water-station.webp and b/public/images/accessories/pudu-mobile-water-station.webp differ diff --git a/public/images/accessories/pudu-pager.webp b/public/images/accessories/pudu-pager.webp index 9e268f0..940dd5d 100644 Binary files a/public/images/accessories/pudu-pager.webp and b/public/images/accessories/pudu-pager.webp differ diff --git a/public/images/accessories/pudu-protection-case.webp b/public/images/accessories/pudu-protection-case.webp index fb562eb..ace7725 100644 Binary files a/public/images/accessories/pudu-protection-case.webp and b/public/images/accessories/pudu-protection-case.webp differ diff --git a/public/images/accessories/pudu-reflective-post.webp b/public/images/accessories/pudu-reflective-post.webp index f23b609..aaee81f 100644 Binary files a/public/images/accessories/pudu-reflective-post.webp and b/public/images/accessories/pudu-reflective-post.webp differ diff --git a/public/images/accessories/pudu-retractable-tray-baffle.webp b/public/images/accessories/pudu-retractable-tray-baffle.webp index dd2a9a5..2851866 100644 Binary files a/public/images/accessories/pudu-retractable-tray-baffle.webp and b/public/images/accessories/pudu-retractable-tray-baffle.webp differ diff --git a/public/images/accessories/pudu-self-cleaning-dock.webp b/public/images/accessories/pudu-self-cleaning-dock.webp index a0ad057..548f6a6 100644 Binary files a/public/images/accessories/pudu-self-cleaning-dock.webp and b/public/images/accessories/pudu-self-cleaning-dock.webp differ diff --git a/public/images/accessories/unitree-d1-t.webp b/public/images/accessories/unitree-d1-t.webp index 881803e..21366f6 100644 Binary files a/public/images/accessories/unitree-d1-t.webp and b/public/images/accessories/unitree-d1-t.webp differ diff --git a/public/images/accessories/unitree-dex1-1.webp b/public/images/accessories/unitree-dex1-1.webp index 10aa277..3de4f04 100644 Binary files a/public/images/accessories/unitree-dex1-1.webp and b/public/images/accessories/unitree-dex1-1.webp differ diff --git a/public/images/accessories/unitree-dex1-1/diagram.webp b/public/images/accessories/unitree-dex1-1/diagram.webp index 2c229b0..30a35b8 100644 Binary files a/public/images/accessories/unitree-dex1-1/diagram.webp and b/public/images/accessories/unitree-dex1-1/diagram.webp differ diff --git a/public/images/accessories/unitree-dex2-5.webp b/public/images/accessories/unitree-dex2-5.webp index 5cf43ed..1c69db6 100644 Binary files a/public/images/accessories/unitree-dex2-5.webp and b/public/images/accessories/unitree-dex2-5.webp differ diff --git a/public/images/accessories/unitree-dex3-1.png b/public/images/accessories/unitree-dex3-1.png deleted file mode 100644 index 1e1fe0e..0000000 Binary files a/public/images/accessories/unitree-dex3-1.png and /dev/null differ diff --git a/public/images/accessories/unitree-dex3-1.webp b/public/images/accessories/unitree-dex3-1.webp new file mode 100644 index 0000000..46f595f Binary files /dev/null and b/public/images/accessories/unitree-dex3-1.webp differ diff --git a/public/images/accessories/unitree-dex3-1/diagram.png b/public/images/accessories/unitree-dex3-1/diagram.png deleted file mode 100644 index 1e1fe0e..0000000 Binary files a/public/images/accessories/unitree-dex3-1/diagram.png and /dev/null differ diff --git a/public/images/accessories/unitree-dex3-1/diagram.webp b/public/images/accessories/unitree-dex3-1/diagram.webp new file mode 100644 index 0000000..46f595f Binary files /dev/null and b/public/images/accessories/unitree-dex3-1/diagram.webp differ diff --git a/public/images/accessories/unitree-dex5-1.webp b/public/images/accessories/unitree-dex5-1.webp index f77db20..5da3c6f 100644 Binary files a/public/images/accessories/unitree-dex5-1.webp and b/public/images/accessories/unitree-dex5-1.webp differ diff --git a/public/images/accessories/unitree-dex5-1/hero.webp b/public/images/accessories/unitree-dex5-1/hero.webp index f77db20..5da3c6f 100644 Binary files a/public/images/accessories/unitree-dex5-1/hero.webp and b/public/images/accessories/unitree-dex5-1/hero.webp differ diff --git a/public/images/accessories/unitree-dex5-1/params.webp b/public/images/accessories/unitree-dex5-1/params.webp index ad13f2c..b8e17a8 100644 Binary files a/public/images/accessories/unitree-dex5-1/params.webp and b/public/images/accessories/unitree-dex5-1/params.webp differ diff --git a/public/images/accessories/unitree-l2.png b/public/images/accessories/unitree-l2.png deleted file mode 100644 index 2ddeb06..0000000 Binary files a/public/images/accessories/unitree-l2.png and /dev/null differ diff --git a/public/images/accessories/unitree-l2.webp b/public/images/accessories/unitree-l2.webp new file mode 100644 index 0000000..d87bbe3 Binary files /dev/null and b/public/images/accessories/unitree-l2.webp differ diff --git a/public/images/accessories/unitree-z1.webp b/public/images/accessories/unitree-z1.webp index 7682cf1..4ac1b98 100644 Binary files a/public/images/accessories/unitree-z1.webp and b/public/images/accessories/unitree-z1.webp differ diff --git a/public/images/brands/ys-lootah-robotics-logo.webp b/public/images/brands/ys-lootah-robotics-logo.webp index 83663c3..498e3db 100644 Binary files a/public/images/brands/ys-lootah-robotics-logo.webp and b/public/images/brands/ys-lootah-robotics-logo.webp differ diff --git a/public/images/robots/featured-bellabot-pro.webp b/public/images/robots/featured-bellabot-pro.webp index d16790c..2d56026 100644 Binary files a/public/images/robots/featured-bellabot-pro.webp and b/public/images/robots/featured-bellabot-pro.webp differ diff --git a/public/images/robots/featured-go2.webp b/public/images/robots/featured-go2.webp index 75ef17a..c9f8a7b 100644 Binary files a/public/images/robots/featured-go2.webp and b/public/images/robots/featured-go2.webp differ diff --git a/public/images/robots/featured-kettybot-black.webp b/public/images/robots/featured-kettybot-black.webp index 3cb40eb..09bc3eb 100644 Binary files a/public/images/robots/featured-kettybot-black.webp and b/public/images/robots/featured-kettybot-black.webp differ diff --git a/public/images/robots/featured-kettybot-yellow.webp b/public/images/robots/featured-kettybot-yellow.webp index 6250a29..9e65130 100644 Binary files a/public/images/robots/featured-kettybot-yellow.webp and b/public/images/robots/featured-kettybot-yellow.webp differ diff --git a/public/images/robots/pudu-bellabot.webp b/public/images/robots/pudu-bellabot.webp index ea2de70..653ff4b 100644 Binary files a/public/images/robots/pudu-bellabot.webp and b/public/images/robots/pudu-bellabot.webp differ diff --git a/public/images/robots/pudu-cc1.webp b/public/images/robots/pudu-cc1.webp index 1042172..dfb6a3b 100644 Binary files a/public/images/robots/pudu-cc1.webp and b/public/images/robots/pudu-cc1.webp differ diff --git a/public/images/robots/pudu-d7.webp b/public/images/robots/pudu-d7.webp index 9a75d02..df463d4 100644 Binary files a/public/images/robots/pudu-d7.webp and b/public/images/robots/pudu-d7.webp differ diff --git a/public/images/robots/pudu-d9.webp b/public/images/robots/pudu-d9.webp index 2eb9966..f14c82c 100644 Binary files a/public/images/robots/pudu-d9.webp and b/public/images/robots/pudu-d9.webp differ diff --git a/public/images/robots/pudu-flashbot-max.webp b/public/images/robots/pudu-flashbot-max.webp index c829a40..3eac8e2 100644 Binary files a/public/images/robots/pudu-flashbot-max.webp and b/public/images/robots/pudu-flashbot-max.webp differ diff --git a/public/images/robots/pudu-flashbot.webp b/public/images/robots/pudu-flashbot.webp index 172b4bc..8a47938 100644 Binary files a/public/images/robots/pudu-flashbot.webp and b/public/images/robots/pudu-flashbot.webp differ diff --git a/public/images/robots/pudu-holabot.webp b/public/images/robots/pudu-holabot.webp index 17f0ee9..d66d703 100644 Binary files a/public/images/robots/pudu-holabot.webp and b/public/images/robots/pudu-holabot.webp differ diff --git a/public/images/robots/pudu-kettybot.webp b/public/images/robots/pudu-kettybot.webp index b105d86..bc94811 100644 Binary files a/public/images/robots/pudu-kettybot.webp and b/public/images/robots/pudu-kettybot.webp differ diff --git a/public/images/robots/pudu-mt1.webp b/public/images/robots/pudu-mt1.webp index 030aab2..0fed16d 100644 Binary files a/public/images/robots/pudu-mt1.webp and b/public/images/robots/pudu-mt1.webp differ diff --git a/public/images/robots/pudu-pudubot2.webp b/public/images/robots/pudu-pudubot2.webp index 74c41f4..334c534 100644 Binary files a/public/images/robots/pudu-pudubot2.webp and b/public/images/robots/pudu-pudubot2.webp differ diff --git a/public/images/robots/pudu-sh1.webp b/public/images/robots/pudu-sh1.webp index 28de4b2..f39f788 100644 Binary files a/public/images/robots/pudu-sh1.webp and b/public/images/robots/pudu-sh1.webp differ diff --git a/public/images/robots/pudu-swiftbot.webp b/public/images/robots/pudu-swiftbot.webp index bd71c78..2417219 100644 Binary files a/public/images/robots/pudu-swiftbot.webp and b/public/images/robots/pudu-swiftbot.webp differ diff --git a/public/images/robots/pudu-t300.webp b/public/images/robots/pudu-t300.webp index 7b77220..83b6931 100644 Binary files a/public/images/robots/pudu-t300.webp and b/public/images/robots/pudu-t300.webp differ diff --git a/public/images/robots/unitree-a2-w.webp b/public/images/robots/unitree-a2-w.webp index 0fe437c..399ead0 100644 Binary files a/public/images/robots/unitree-a2-w.webp and b/public/images/robots/unitree-a2-w.webp differ diff --git a/public/images/robots/unitree-a2.webp b/public/images/robots/unitree-a2.webp index ac9ad04..5d6bab4 100644 Binary files a/public/images/robots/unitree-a2.webp and b/public/images/robots/unitree-a2.webp differ diff --git a/public/images/robots/unitree-aliengo.webp b/public/images/robots/unitree-aliengo.webp index 736550f..d2fe996 100644 Binary files a/public/images/robots/unitree-aliengo.webp and b/public/images/robots/unitree-aliengo.webp differ diff --git a/public/images/robots/unitree-as2.webp b/public/images/robots/unitree-as2.webp index 093abef..4367e69 100644 Binary files a/public/images/robots/unitree-as2.webp and b/public/images/robots/unitree-as2.webp differ diff --git a/public/images/robots/unitree-b1.webp b/public/images/robots/unitree-b1.webp index 0da41c8..893199d 100644 Binary files a/public/images/robots/unitree-b1.webp and b/public/images/robots/unitree-b1.webp differ diff --git a/public/images/robots/unitree-b2-w.webp b/public/images/robots/unitree-b2-w.webp index 7060beb..fd10990 100644 Binary files a/public/images/robots/unitree-b2-w.webp and b/public/images/robots/unitree-b2-w.webp differ diff --git a/public/images/robots/unitree-b2.webp b/public/images/robots/unitree-b2.webp index c4b7b2b..f89105b 100644 Binary files a/public/images/robots/unitree-b2.webp and b/public/images/robots/unitree-b2.webp differ diff --git a/public/images/robots/unitree-g1.webp b/public/images/robots/unitree-g1.webp index b76f3ff..9b4307c 100644 Binary files a/public/images/robots/unitree-g1.webp and b/public/images/robots/unitree-g1.webp differ diff --git a/public/images/robots/unitree-go2-w.png b/public/images/robots/unitree-go2-w.png deleted file mode 100644 index fdf0bdc..0000000 Binary files a/public/images/robots/unitree-go2-w.png and /dev/null differ diff --git a/public/images/robots/unitree-go2-w.webp b/public/images/robots/unitree-go2-w.webp new file mode 100644 index 0000000..70da54b Binary files /dev/null and b/public/images/robots/unitree-go2-w.webp differ diff --git a/public/images/robots/unitree-go2.webp b/public/images/robots/unitree-go2.webp index 409a783..2f6add7 100644 Binary files a/public/images/robots/unitree-go2.webp and b/public/images/robots/unitree-go2.webp differ diff --git a/public/images/robots/unitree-h1.webp b/public/images/robots/unitree-h1.webp index 87b47de..2c2c845 100644 Binary files a/public/images/robots/unitree-h1.webp and b/public/images/robots/unitree-h1.webp differ diff --git a/public/images/robots/unitree-h2.webp b/public/images/robots/unitree-h2.webp index a5bea67..0f4c363 100644 Binary files a/public/images/robots/unitree-h2.webp and b/public/images/robots/unitree-h2.webp differ diff --git a/public/images/robots/unitree-r1.webp b/public/images/robots/unitree-r1.webp index e6c3223..bb040ea 100644 Binary files a/public/images/robots/unitree-r1.webp and b/public/images/robots/unitree-r1.webp differ diff --git a/public/images/robots/unitree/b2-shop-1.webp b/public/images/robots/unitree/b2-shop-1.webp index 9e69fca..fa9a306 100644 Binary files a/public/images/robots/unitree/b2-shop-1.webp and b/public/images/robots/unitree/b2-shop-1.webp differ diff --git a/public/images/robots/unitree/g1-shop-1.webp b/public/images/robots/unitree/g1-shop-1.webp index 7de27c2..a8394b0 100644 Binary files a/public/images/robots/unitree/g1-shop-1.webp and b/public/images/robots/unitree/g1-shop-1.webp differ diff --git a/public/images/robots/unitree/go2-shop-2.webp b/public/images/robots/unitree/go2-shop-2.webp index 1bd9e13..a9ec029 100644 Binary files a/public/images/robots/unitree/go2-shop-2.webp and b/public/images/robots/unitree/go2-shop-2.webp differ diff --git a/public/industries/cards/events.webp b/public/industries/cards/events.webp index 7c7a460..25548cf 100644 Binary files a/public/industries/cards/events.webp and b/public/industries/cards/events.webp differ diff --git a/public/industries/cards/healthcare.webp b/public/industries/cards/healthcare.webp index 7120157..3e0d002 100644 Binary files a/public/industries/cards/healthcare.webp and b/public/industries/cards/healthcare.webp differ diff --git a/public/industries/cards/hospitality.webp b/public/industries/cards/hospitality.webp index e6f9074..f99de85 100644 Binary files a/public/industries/cards/hospitality.webp and b/public/industries/cards/hospitality.webp differ diff --git a/public/industries/cards/hotels-resorts.webp b/public/industries/cards/hotels-resorts.webp index 88280b8..77bfb81 100644 Binary files a/public/industries/cards/hotels-resorts.webp and b/public/industries/cards/hotels-resorts.webp differ diff --git a/public/industries/cards/restaurants-cafes.webp b/public/industries/cards/restaurants-cafes.webp index 055f183..17d3507 100644 Binary files a/public/industries/cards/restaurants-cafes.webp and b/public/industries/cards/restaurants-cafes.webp differ diff --git a/public/industries/cards/security-surveillance.webp b/public/industries/cards/security-surveillance.webp index 71bbaec..8e6c8c7 100644 Binary files a/public/industries/cards/security-surveillance.webp and b/public/industries/cards/security-surveillance.webp differ diff --git a/public/industries/cards/shopping-malls.webp b/public/industries/cards/shopping-malls.webp index 6a0aeab..dee3001 100644 Binary files a/public/industries/cards/shopping-malls.webp and b/public/industries/cards/shopping-malls.webp differ diff --git a/public/industries/cards/smart-buildings.webp b/public/industries/cards/smart-buildings.webp index cc96ffa..a4441fb 100644 Binary files a/public/industries/cards/smart-buildings.webp and b/public/industries/cards/smart-buildings.webp differ diff --git a/public/industries/cards/warehouses-logistics.webp b/public/industries/cards/warehouses-logistics.webp index bc4266b..544f86e 100644 Binary files a/public/industries/cards/warehouses-logistics.webp and b/public/industries/cards/warehouses-logistics.webp differ diff --git a/public/industries/unitree/ai-patrol.webp b/public/industries/unitree/ai-patrol.webp index 0983d98..5a73d91 100644 Binary files a/public/industries/unitree/ai-patrol.webp and b/public/industries/unitree/ai-patrol.webp differ diff --git a/public/industries/unitree/analytics.webp b/public/industries/unitree/analytics.webp index dd4c737..0377612 100644 Binary files a/public/industries/unitree/analytics.webp and b/public/industries/unitree/analytics.webp differ diff --git a/public/industries/unitree/b2-render.webp b/public/industries/unitree/b2-render.webp index de04706..e1a0917 100644 Binary files a/public/industries/unitree/b2-render.webp and b/public/industries/unitree/b2-render.webp differ diff --git a/public/industries/unitree/cloud.webp b/public/industries/unitree/cloud.webp index 5b4fefb..98df1cd 100644 Binary files a/public/industries/unitree/cloud.webp and b/public/industries/unitree/cloud.webp differ diff --git a/public/industries/unitree/digital-twin.webp b/public/industries/unitree/digital-twin.webp index 44494a7..4ec661b 100644 Binary files a/public/industries/unitree/digital-twin.webp and b/public/industries/unitree/digital-twin.webp differ diff --git a/public/industries/unitree/endurance.webp b/public/industries/unitree/endurance.webp index 4868498..c8284a0 100644 Binary files a/public/industries/unitree/endurance.webp and b/public/industries/unitree/endurance.webp differ diff --git a/public/industries/unitree/flight-path.webp b/public/industries/unitree/flight-path.webp index f61ff1d..3cc767e 100644 Binary files a/public/industries/unitree/flight-path.webp and b/public/industries/unitree/flight-path.webp differ diff --git a/public/industries/unitree/go2-render.webp b/public/industries/unitree/go2-render.webp index b25d4c0..f5be175 100644 Binary files a/public/industries/unitree/go2-render.webp and b/public/industries/unitree/go2-render.webp differ diff --git a/public/industries/unitree/industrial-park.webp b/public/industries/unitree/industrial-park.webp index c734d41..6e05db8 100644 Binary files a/public/industries/unitree/industrial-park.webp and b/public/industries/unitree/industrial-park.webp differ diff --git a/public/industries/unitree/mine.jpg b/public/industries/unitree/mine.jpg deleted file mode 100644 index 5d39b61..0000000 Binary files a/public/industries/unitree/mine.jpg and /dev/null differ diff --git a/public/industries/unitree/mine.webp b/public/industries/unitree/mine.webp new file mode 100644 index 0000000..72a6f92 Binary files /dev/null and b/public/industries/unitree/mine.webp differ diff --git a/public/industries/unitree/modular.webp b/public/industries/unitree/modular.webp index b67cfcb..678b17b 100644 Binary files a/public/industries/unitree/modular.webp and b/public/industries/unitree/modular.webp differ diff --git a/public/industries/unitree/patrol-system.webp b/public/industries/unitree/patrol-system.webp index 4d509a4..e2de420 100644 Binary files a/public/industries/unitree/patrol-system.webp and b/public/industries/unitree/patrol-system.webp differ diff --git a/public/industries/unitree/pipeline.webp b/public/industries/unitree/pipeline.webp index c5cf1dc..bbe22b8 100644 Binary files a/public/industries/unitree/pipeline.webp and b/public/industries/unitree/pipeline.webp differ diff --git a/public/industries/unitree/quad-render.webp b/public/industries/unitree/quad-render.webp index 9dc230b..a58f2a0 100644 Binary files a/public/industries/unitree/quad-render.webp and b/public/industries/unitree/quad-render.webp differ diff --git a/public/industries/unitree/sensor-overview.webp b/public/industries/unitree/sensor-overview.webp index d200526..db64b61 100644 Binary files a/public/industries/unitree/sensor-overview.webp and b/public/industries/unitree/sensor-overview.webp differ diff --git a/public/industries/unitree/substation.webp b/public/industries/unitree/substation.webp index 25cefff..161ed59 100644 Binary files a/public/industries/unitree/substation.webp and b/public/industries/unitree/substation.webp differ diff --git a/public/industries/unitree/terrain-day.webp b/public/industries/unitree/terrain-day.webp index 7dd3918..ae17e13 100644 Binary files a/public/industries/unitree/terrain-day.webp and b/public/industries/unitree/terrain-day.webp differ diff --git a/public/industries/unitree/terrain-night.webp b/public/industries/unitree/terrain-night.webp index 8687792..cf30b2f 100644 Binary files a/public/industries/unitree/terrain-night.webp and b/public/industries/unitree/terrain-night.webp differ diff --git a/public/industries/unitree/terrain.webp b/public/industries/unitree/terrain.webp index 209a0f5..ea3a811 100644 Binary files a/public/industries/unitree/terrain.webp and b/public/industries/unitree/terrain.webp differ diff --git a/public/industries/unitree/thermal.jpg b/public/industries/unitree/thermal.jpg deleted file mode 100644 index d378842..0000000 Binary files a/public/industries/unitree/thermal.jpg and /dev/null differ diff --git a/public/industries/unitree/thermal.webp b/public/industries/unitree/thermal.webp new file mode 100644 index 0000000..28ebf08 Binary files /dev/null and b/public/industries/unitree/thermal.webp differ diff --git a/public/industries/unitree/utility-room.webp b/public/industries/unitree/utility-room.webp index cdfa466..4422ce2 100644 Binary files a/public/industries/unitree/utility-room.webp and b/public/industries/unitree/utility-room.webp differ diff --git a/scripts/aggressive-compress.mjs b/scripts/aggressive-compress.mjs new file mode 100644 index 0000000..6f625a7 --- /dev/null +++ b/scripts/aggressive-compress.mjs @@ -0,0 +1,85 @@ +import { promises as fs } from 'node:fs'; +import path from 'node:path'; +import sharp from 'sharp'; + +const ROOT = path.resolve('public'); +const SKIP = new Set(['favicon.ico']); +const MAX_W = 1920; // cap any image wider than this + +const exts = new Set(['.jpg', '.jpeg', '.png', '.gif', '.webp']); +let convertedCount = 0; +let savedBytes = 0; +let skippedCount = 0; + +async function walk(dir) { + const entries = await fs.readdir(dir, { withFileTypes: true }); + for (const e of entries) { + const p = path.join(dir, e.name); + if (e.isDirectory()) await walk(p); + else if (exts.has(path.extname(p).toLowerCase())) await compress(p); + } +} + +function qualityFor(bytes) { + if (bytes > 700 * 1024) return 70; + if (bytes > 300 * 1024) return 75; + if (bytes > 120 * 1024) return 78; + return 82; +} + +async function compress(input) { + const base = path.basename(input); + if (SKIP.has(base)) return; + const ext = path.extname(input).toLowerCase(); + const isGif = ext === '.gif'; + const relRoot = path.relative(process.cwd(), input).split(path.sep).join('/'); + + try { + const stIn = await fs.stat(input); + if (stIn.size < 8 * 1024) { + // tiny: leave + return; + } + const target = input.slice(0, -ext.length) + '.webp'; + // Read into memory first, then close handle + const srcBuf = await fs.readFile(input); + const meta = await sharp(srcBuf, { animated: isGif }).metadata(); + let pipeline = sharp(srcBuf, { animated: isGif }); + if (meta.width && meta.width > MAX_W) { + pipeline = pipeline.resize({ width: MAX_W, withoutEnlargement: true }); + } + const q = qualityFor(stIn.size); + pipeline = pipeline.webp({ + quality: q, + alphaQuality: 88, + effort: 6, + smartSubsample: true, + ...(isGif ? { loop: 0 } : {}), + }); + const buf = await pipeline.toBuffer(); + if (buf.length >= stIn.size && ext === '.webp') { + skippedCount++; + return; + } + // write via temp file then rename for atomicity + const tmp = target + '.tmp'; + await fs.writeFile(tmp, buf); + if (target !== input) { + try { await fs.unlink(input); } catch {} + } + await fs.rename(tmp, target); + convertedCount++; + savedBytes += stIn.size - buf.length; + const inKB = (stIn.size / 1024).toFixed(0); + const outKB = (buf.length / 1024).toFixed(0); + console.log(`OK q=${q} ${relRoot} ${inKB}KB -> ${outKB}KB${meta.width && meta.width > MAX_W ? ' (resized)' : ''}`); + } catch (err) { + console.log(`FAIL ${relRoot}: ${err.message}`); + } +} + +await walk(ROOT); +const savedMB = (savedBytes / 1024 / 1024).toFixed(2); +console.log('\n---'); +console.log(`compressed: ${convertedCount} skipped: ${skippedCount}`); +console.log(`saved: ${savedMB} MB`); diff --git a/src/app/globals.css b/src/app/globals.css index c2a52b5..f13000f 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -529,6 +529,21 @@ html { /* === Layout helpers === */ .container-wide { max-width: 1320px; margin: 0 auto; padding-left: clamp(1rem, 4vw, 2rem); padding-right: clamp(1rem, 4vw, 2rem); } +/* === Navbar responsive === */ +.nav-desktop { display: none; } +.nav-desktop-cta { display: inline-flex; } +.nav-mobile-toggle { display: none !important; } +@media (min-width: 900px) { + .nav-desktop { display: flex !important; } + .nav-desktop-cta { display: inline-flex !important; } + .nav-mobile-toggle { display: none !important; } +} +@media (max-width: 899px) { + .nav-desktop { display: none !important; } + .nav-desktop-cta { display: none !important; } + .nav-mobile-toggle { display: inline-flex !important; } +} + .eyebrow { display: inline-flex; align-items: center; diff --git a/src/data/accessories.ts b/src/data/accessories.ts index 780ebef..5dd6871 100644 --- a/src/data/accessories.ts +++ b/src/data/accessories.ts @@ -315,7 +315,7 @@ export const ACCESSORIES: Accessory[] = [ '12–58 V operating voltage', '1 kHz communication rate', ], - image: '/images/accessories/unitree-dex3-1.jpg', + image: '/images/accessories/unitree-dex3-1.webp', accent: GOLD_BRONZE, officialUrl: 'https://www.unitree.com/Dex3-1', compatibility: ['Unitree G1'], @@ -402,7 +402,7 @@ export const ACCESSORIES: Accessory[] = [ ], }, ], - paramsImage: '/images/accessories/unitree-dex3-1/diagram.png', + paramsImage: '/images/accessories/unitree-dex3-1/diagram.webp', footnotes: [ 'Size refers to the dexterous hand in flat state.', 'Pressure data refers to force exerted by the dexterous hand when pressed by a vertical 1 cm diameter cylinder. Varies in different application scenarios.', @@ -718,7 +718,7 @@ export const ACCESSORIES: Accessory[] = [ 'ENET UDP / TTL UART communication', 'Open POINT-LIO SLAM solution', ], - image: '/images/accessories/unitree-l2.jpg', + image: '/images/accessories/unitree-l2.webp', accent: GOLD_CHAMPAGNE, officialUrl: 'https://www.unitree.com/L2', compatibility: ['Unitree Go2', 'Unitree quadrupeds', 'Third-party robots'], diff --git a/src/data/industry-pages.ts b/src/data/industry-pages.ts index b1418fc..4d91c6e 100644 --- a/src/data/industry-pages.ts +++ b/src/data/industry-pages.ts @@ -329,7 +329,7 @@ export const INDUSTRY_PAGES: Record = { { src: '/images/robots/pudu-cc1.webp', alt: 'PUDU CC1 auto-scrubber', caption: 'PUDU CC1 — auto-scrubber for large floors.', credit: 'Pudu' }, { src: '/images/robots/pudu-kettybot.webp', alt: 'KettyBot wayfinding and ad display', caption: 'KettyBot Pro — wayfinding and promo runs.', credit: 'Pudu' }, { src: '/images/robots/unitree-go2.webp', alt: 'Unitree Go2 night patrol', caption: 'Unitree Go2 — night patrol across decks.', credit: 'Unitree' }, - { src: '/industries/unitree/thermal.jpg', alt: 'Thermal + LiDAR patrol sensors', caption: 'Thermal + LiDAR sensors for after-hours rounds.', credit: 'Unitree' }, + { src: '/industries/unitree/thermal.webp', alt: 'Thermal + LiDAR patrol sensors', caption: 'Thermal + LiDAR sensors for after-hours rounds.', credit: 'Unitree' }, ], problemPoints: [ 'Large floor areas are hard to clean and patrol consistently.', @@ -606,12 +606,12 @@ export const INDUSTRY_PAGES: Record = { ], gallery: [ { src: '/industries/unitree/terrain.webp', alt: 'Quadruped robot on mixed industrial terrain', caption: 'Stairs, gullies, and uneven ground handled on one platform.', credit: 'Unitree' }, - { src: '/industries/unitree/thermal.jpg', alt: 'Thermal imaging and laser-radar detection', caption: 'Thermal, laser-radar, and AI imaging for routine monitoring.', credit: 'Unitree' }, + { src: '/industries/unitree/thermal.webp', alt: 'Thermal imaging and laser-radar detection', caption: 'Thermal, laser-radar, and AI imaging for routine monitoring.', credit: 'Unitree' }, { src: '/industries/unitree/substation.webp', alt: 'Power substation patrol', caption: 'Substation patrol — switchgear and transformer scans.', credit: 'Unitree' }, { src: '/industries/unitree/pipeline.webp', alt: 'Pipeline corridor patrol', caption: 'Pipeline and refinery corridor inspection rounds.', credit: 'Unitree' }, { src: '/industries/unitree/industrial-park.webp', alt: 'Industrial park perimeter coverage', caption: 'Industrial park and large-compound perimeter coverage.', credit: 'Unitree' }, { src: '/industries/unitree/utility-room.webp', alt: 'Utility plant room inspection', caption: 'Utility and plant-room routine checks.', credit: 'Unitree' }, - { src: '/industries/unitree/mine.jpg', alt: 'Tunnel inspection', caption: 'Tunnel and confined-zone inspection.', credit: 'Unitree' }, + { src: '/industries/unitree/mine.webp', alt: 'Tunnel inspection', caption: 'Tunnel and confined-zone inspection.', credit: 'Unitree' }, { src: '/industries/unitree/terrain-night.webp', alt: 'Quadruped robot on night patrol', caption: 'After-hours rounds with consistent route timing.', credit: 'Unitree' }, { src: '/industries/unitree/b2-render.webp', alt: 'Unitree B2 industrial quadruped render', caption: 'B2 — industrial-grade quadruped platform.', credit: 'Unitree' }, ], diff --git a/src/data/robots.ts b/src/data/robots.ts index cae289c..008a13b 100644 --- a/src/data/robots.ts +++ b/src/data/robots.ts @@ -288,7 +288,7 @@ export const ROBOTS: Robot[] = [ { label: 'Battery', value: '1.5–3 h' }, SPEC_CONSULT, ], - image: '/images/robots/unitree-go2-w.png', + image: '/images/robots/unitree-go2-w.webp', imageType: 'photo', accent: GOLD_BRAND, officialUrl: 'https://www.unitree.com/go2-w',