From 0586b35fe7ec1ed6a31d38fac5ef1ac085da1a9c Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 7 Mar 2026 20:33:28 +0000 Subject: [PATCH] Add power conversion entries and responsive nav tweaks --- calculators_list.md | 249 ++++++++++++------ hdyc-svelte/src/app.css | 28 +- .../src/lib/components/Calculator.svelte | 21 +- hdyc-svelte/src/lib/components/Sidebar.svelte | 4 +- hdyc-svelte/src/lib/data/calculators.ts | 50 +++- hdyc-svelte/src/routes/+layout.svelte | 31 ++- 6 files changed, 280 insertions(+), 103 deletions(-) diff --git a/calculators_list.md b/calculators_list.md index c708719..b9063d6 100644 --- a/calculators_list.md +++ b/calculators_list.md @@ -251,6 +251,44 @@ The registry currently contains 416 unique calculator slugs. | Horsepower to BTU/min – Get BTUs per minute from mechanical horsepower. | horsepower-to-btumin | 42.4072263427 | | Horsepower to Calories Per Second – Translate mechanical horsepower into calories per second. | horsepower-to-calories-per-second | 178.226546845 | | Horsepower to Electrical Horsepower – Convert mechanical horsepower into electrical horsepower. | horsepower-to-electrical-horsepower | 0.999597683646 | +| Kilowatts to kVA | kilowatts-to-kva | 1 | +| Lusec to Watts | lusec-to-watts | 0.000133322 | +| Watts to BTU/min | watts-to-btumin | 0.0568690272522 | +| Calories Per Second to Metric Horsepower (ps) | calories-per-second-to-metric-horsepower-ps | 0.0056886568468 | +| Horsepower to Lusec | horsepower-to-lusec | 5593224.46408 | +| Horsepower to Mechanical Hp | horsepower-to-mechanical-hp | 1 | +| Horsepower to Megawatts | horsepower-to-megawatts | 0.000745699872 | +| Horsepower to Metric Horsepower (ps) | horsepower-to-metric-horsepower-ps | 1.01386966599 | +| Kilowatts to Boiler Horsepower | kilowatts-to-boiler-horsepower | 0.101941995005 | +| Kilowatts to Electrical Horsepower | kilowatts-to-electrical-horsepower | 1.34048257373 | +| Kilowatts to Metric Horsepower (ps) | kilowatts-to-metric-horsepower-ps | 1.3596216173 | +| Lusec to Boiler Horsepower | lusec-to-boiler-horsepower | 1.3591110658e-08 | +| Lusec to Electrical Horsepower | lusec-to-electrical-horsepower | 1.78715817694e-07 | +| Lusec to Horsepower | lusec-to-horsepower | 1.78787746929e-07 | +| Lusec to Metric Horsepower (ps) | lusec-to-metric-horsepower-ps | 1.81267473262e-07 | +| Mechanical Hp to Boiler Horsepower | mechanical-hp-to-boiler-horsepower | 0.0760181326265 | +| Mechanical Hp to Electrical Horsepower | mechanical-hp-to-electrical-horsepower | 0.999597683646 | +| Mechanical Hp to Horsepower | mechanical-hp-to-horsepower | 1 | +| Mechanical Hp to Metric Horsepower (ps) | mechanical-hp-to-metric-horsepower-ps | 1.01386966599 | +| Megawatts to Boiler Horsepower | megawatts-to-boiler-horsepower | 101.941995005 | +| Megawatts to Electrical Horsepower | megawatts-to-electrical-horsepower | 1340.48257373 | +| Megawatts to Horsepower | megawatts-to-horsepower | 1341.02208884 | +| Megawatts to Metric Horsepower (ps) | megawatts-to-metric-horsepower-ps | 1359.6216173 | +| Metric Horsepower (ps) to Boiler Horsepower | metric-horsepower-ps-to-boiler-horsepower | 0.0749782098986 | +| Metric Horsepower (ps) to BTU/hour | metric-horsepower-ps-to-btuhour | 2509.62590746 | +| Metric Horsepower (ps) to BTU/min | metric-horsepower-ps-to-btumin | 41.8270984577 | +| Metric Horsepower (ps) to Calories Per Second | metric-horsepower-ps-to-calories-per-second | 175.788420172 | +| Metric Horsepower (ps) to Electrical Horsepower | metric-horsepower-ps-to-electrical-horsepower | 0.985923257373 | +| Metric Horsepower (ps) to Horsepower | metric-horsepower-ps-to-horsepower | 0.986320070067 | +| Metric Horsepower (ps) to Kilowatts | metric-horsepower-ps-to-kilowatts | 0.73549875 | +| Metric Horsepower (ps) to Lusec | metric-horsepower-ps-to-lusec | 5516709.54531 | +| Metric Horsepower (ps) to Mechanical Hp | metric-horsepower-ps-to-mechanical-hp | 0.986320070067 | +| Metric Horsepower (ps) to Megawatts | metric-horsepower-ps-to-megawatts | 0.00073549875 | +| Metric Horsepower (ps) to Tons Of Refrigeration | metric-horsepower-ps-to-tons-of-refrigeration | 0.209135492289 | +| Tons Of Refrigeration to Boiler Horsepower | tons-of-refrigeration-to-boiler-horsepower | 0.358514994648 | +| Tons Of Refrigeration to Electrical Horsepower | tons-of-refrigeration-to-electrical-horsepower | 4.71427994638 | +| Tons Of Refrigeration to Metric Horsepower (ps) | tons-of-refrigeration-to-metric-horsepower-ps | 4.78158914614 | +| Watts to Electrical Horsepower | watts-to-electrical-horsepower | 0.00134048257373 | | Hours to Days | hours-to-days | 0.0416666667 | | Hours to Minutes | hours-to-minutes | 60.0 | | Inches of Mercury to Pascals | inches-of-mercury-to-pascals | 3386.389 | @@ -812,6 +850,22 @@ The registry currently contains 416 unique calculator slugs. | Kilowatts to BTU/hour – Convert kilowatts to BTU per hour. | kilowatts-to-btuhour | 3412.142 | | Kilowatts to Megawatts – Convert power from kilowatts to megawatts. | kilowatts-to-megawatts | 0.001 | | Kilowatts to Watts – Convert kilowatts to watts. | kilowatts-to-watts | 1000 | +| Kilowatts to Amps – Relate kilowatts to amperage when the voltage is known. | kilowatts-to-amps | Multi-Variable | +| Kilowatts to Abamperes – Convert kilowatts into CGS abamperes using abvolts or current. | kilowatts-to-abamperes | Multi-Variable | +| Kilowatts to Abvolts – Convert kilowatts into abvolts given CGS abamperes. | kilowatts-to-abvolts | Multi-Variable | +| Kilowatts to Ampere-hours – Turn kilowatt draws into ampere-hours when you know the duration. | kilowatts-to-ampere-hours | Multi-Variable | +| Kilowatts to BTU/min – Convert kilowatts into BTUs per minute for heat rate comparisons. | kilowatts-to-btumin | 56.8690272522 | +| Kilowatts to Calories Per Second – Translate kilowatts into calories per second for nutrition math. | kilowatts-to-calories-per-second | 238.8458966 | +| Kilowatts to Coulombs – Convert kilowatts into coulombs when the time or voltage is given. | kilowatts-to-coulombs | Multi-Variable | +| Kilowatts to Farads – Estimate the capacitance in farads from kilowatt loads. | kilowatts-to-farads | Multi-Variable | +| Kilowatts to Henries – Estimate inductance in henries using kilowatt load and frequency. | kilowatts-to-henries | Multi-Variable | +| Kilowatts to Lusec – Translate kilowatts into lusecs for legacy power ratings. | kilowatts-to-lusec | 7500637.554192106 | +| Kilowatts to Mechanical Hp – Convert kilowatts into mechanical horsepower. | kilowatts-to-mechanical-hp | 1.341021858656296 | +| Kilowatts to Microfarads – Convert kilowatt loads into capacitance using voltage. | kilowatts-to-microfarads | Multi-Variable | +| Kilowatts to Microhenries – Estimate inductance in microhenries for a kilowatt-level circuit. | kilowatts-to-microhenries | Multi-Variable | +| Kilowatts to Milliampere-hours – Turn kilowatt-hours into milliampere-hours given voltage. | kilowatts-to-milliampere-hours | Multi-Variable | +| Kilowatts to Milliamps – Convert kilowatts into milliamps when you know the voltage. | kilowatts-to-milliamps | Multi-Variable | +| Kilowatts to Millihenries – Estimate inductance in millihenries from a kilowatt load. | kilowatts-to-millihenries | Multi-Variable | | Kilometers per kWh to Miles per kWh – Convert energy efficiency from km/kWh to mi/kWh. | km-per-kwh-to-miles-per-kwh | 0.621371 | | Kilometers per Second to Speed of Light – Express a speed in kilometers per second as a fraction of c (299,792.458 km/s). | kilometers-per-second-to-speed-of-light | 3.33564095198152e-6 | | Knots to Feet per Second – Convert a nautical mile per hour into feet per second. | knots-to-feet-per-second | 1.6878098376 | @@ -1172,6 +1226,30 @@ The registry currently contains 416 unique calculator slugs. | Watts to Calories per Second – Translate watts into calories per second for nutrition math. | watts-to-calories-per-second | 0.2388458966 | | Watts to Kilowatts – Express watts as kilowatts for appliance specs. | watts-to-kilowatts | 0.001 | | Watts to Metric Horsepower – Convert watts into metric horsepower (PS) for vehicle specs. | watts-to-metric-horsepower | 0.00135962162 | +| Watts to Volts – Determine the voltage when you know the power and current. | watts-to-volts | Multi-Variable | +| Watts to Abamperes – Convert watts into CGS abamperes when you have voltage in abvolts. | watts-to-abamperes | Multi-Variable | +| Watts to Abvolts – Convert watts into CGS abvolts using abamperes. | watts-to-abvolts | Multi-Variable | +| Watts to Ampere-hours – Turn a watt draw into ampere-hours when you know the duration or voltage. | watts-to-ampere-hours | Multi-Variable | +| Watts to Coulombs – Translate watts into coulombs when voltage or time is provided. | watts-to-coulombs | Multi-Variable | +| Watts to Farads – Estimate capacitance required for a given wattage and voltage. | watts-to-farads | Multi-Variable | +| Watts to Henries – Estimate inductance from a wattage and frequency scenario. | watts-to-henries | Multi-Variable | +| Watts to kVA – Convert watts into kilovolt-amperes assuming unity power factor. | watts-to-kva | 0.001 | +| Watts to Lusec – Translate watts into lusecs for vintage motor specs. | watts-to-lusec | 7500.637554192106 | +| Watts to Mechanical Hp – Translate watts into mechanical horsepower. | watts-to-mechanical-hp | 0.001341021858656296 | +| Watts to Megawatts – Scale watts down to megawatts. | watts-to-megawatts | 0.000001 | +| Watts to Microfarads – Convert wattage into capacitance when voltage is known. | watts-to-microfarads | Multi-Variable | +| Watts to Microhenries – Convert wattage into inductance using frequency or current. | watts-to-microhenries | Multi-Variable | +| Watts to Milliampere-hours – Convert power into milliampere-hours over time with voltage input. | watts-to-milliampere-hours | Multi-Variable | +| Watts to Milliamps – Convert wattage into milliamps given voltage. | watts-to-milliamps | Multi-Variable | +| Watts to Millihenries – Estimate inductance in millihenries for a given power level. | watts-to-millihenries | Multi-Variable | +| Watts to Millivolts – Scale watts into millivolts with current data. | watts-to-millivolts | Multi-Variable | +| Watts to Ohms – Derive resistance when you know wattage and current. | watts-to-ohms | Multi-Variable | +| Watts to Picofarads – Estimate capacitance in picofarads when voltage and frequency are known. | watts-to-picofarads | Multi-Variable | +| Watts to Siemens – Convert wattage into siemens (conductance) when voltage or current is provided. | watts-to-siemens | Multi-Variable | +| Watts to Statamperes – Translate watts into statamperes within the CGS electromagnetic system. | watts-to-statamperes | Multi-Variable | +| Watts to Statvolts – Translate watts into statvolts when working with CGS fields. | watts-to-statvolts | Multi-Variable | +| Watts to Tons Of Refrigeration – Translate continuous power into refrigeration tons. | watts-to-tons-of-refrigeration | 0.000284345 | +| Watts to Watt-hours – Convert instantaneous power into energy by supplying a time interval. | watts-to-watt-hours | Multi-Variable | | Watts to Milliwatts – Scale watts down to milliwatts. | watts-to-milliwatts | 1000 | | Weber to Maxwell – Express webers as maxwells for magnetic flux reports. | weber-to-maxwell | 100000000 | | Wh per km to Wh per mile – Convert EV efficiency from km to mile units. | wh-per-km-to-wh-per-mile | 1.609344 | @@ -2302,9 +2380,9 @@ The registry currently contains 416 unique calculator slugs. - [x] Kilowatt-hours to Joules - [x] Kilowatt-hours to Kilocalories - [x] Kilowatt-hours to Therms -- [ ] Kilowatts to Amps +- [x] Kilowatts to Amps - [x] Kilowatts to BTU/hour -- [ ] Kilowatts to kVA +- [x] Kilowatts to kVA - [x] Kilowatts to Megawatts - [x] Kilowatts to Watts - [x] km per kWh to Miles per kWh @@ -2339,7 +2417,7 @@ The registry currently contains 416 unique calculator slugs. - [x] Long Tons to Kilograms - [x] Long Tons to Pounds - [x] Long Tons to Short Tons -- [ ] Lusec to Watts +- [x] Lusec to Watts - [ ] Lux to EV - [x] Lux to Foot-candles - [x] Mach to Feet per second @@ -2570,8 +2648,8 @@ The registry currently contains 416 unique calculator slugs. - [ ] Tesla to Milligauss - [ ] Tesla to Millitesla - [ ] Tex to Denier -- [ ] Therms to BTU -- [ ] Therms to Kilowatt-hours +- [x] Therms to BTU +- [x] Therms to Kilowatt-hours - [x] Thou (mil) to Millimeters - [x] Thou to Inches - [x] Tolas to Grams @@ -2598,12 +2676,12 @@ The registry currently contains 416 unique calculator slugs. - [x] Watt-hours to Calories - [ ] Watt-hours to Joules - [x] Watts to Boiler Horsepower -- [ ] Watts to BTU/min +- [x] Watts to BTU/min - [x] Watts to Calories per second - [x] Watts to Kilowatts - [x] Watts to Metric Horsepower (PS) - [x] Watts to Milliwatts -- [ ] Watts to Volts +- [x] Watts to Volts - [x] Weber to Maxwell - [x] Weeks to Days - [x] Weeks to Hours @@ -3247,7 +3325,8 @@ The registry currently contains 416 unique calculator slugs. - [ ] Calories Per Second to Lusec - [ ] Calories Per Second to Mechanical Hp - [ ] Calories Per Second to Megawatts -- [ ] Calories Per Second to Metric Horsepower (ps) +- [x] Calories Per Second to Metric Horsepower (ps) +- [x] Calories Per Second to Metric Horsepower (ps) - [ ] Calories Per Second to Tons Of Refrigeration - [ ] Calories to Electron-volts - [ ] Calories to Ergs @@ -4711,10 +4790,10 @@ The registry currently contains 416 unique calculator slugs. - [x] Horsepower to btu/min - [x] Horsepower to Calories Per Second - [x] Horsepower to Electrical Horsepower -- [ ] Horsepower to Lusec -- [ ] Horsepower to Mechanical Hp -- [ ] Horsepower to Megawatts -- [ ] Horsepower to Metric Horsepower (ps) +- [x] Horsepower to Lusec +- [x] Horsepower to Mechanical Hp +- [x] Horsepower to Megawatts +- [x] Horsepower to Metric Horsepower (ps) - [ ] Hours to Atomic Time Units - [ ] Hours to Centuries - [ ] Hours to Decades @@ -5212,24 +5291,24 @@ The registry currently contains 416 unique calculator slugs. - [ ] Kilowatt-hours to Rydberg - [ ] Kilowatt-hours to Ton Of Tnt - [ ] Kilowatt-hours to Watt-hours -- [ ] Kilowatts to Abamperes -- [ ] Kilowatts to Abvolts -- [ ] Kilowatts to Ampere-hours -- [ ] Kilowatts to Boiler Horsepower +- [x] Kilowatts to Abamperes +- [x] Kilowatts to Abvolts +- [x] Kilowatts to Ampere-hours + - [x] Kilowatts to Boiler Horsepower - [ ] Kilowatts to btu/min -- [ ] Kilowatts to Calories Per Second -- [ ] Kilowatts to Coulombs -- [ ] Kilowatts to Electrical Horsepower -- [ ] Kilowatts to Farads -- [ ] Kilowatts to Henries -- [ ] Kilowatts to Lusec -- [ ] Kilowatts to Mechanical Hp -- [ ] Kilowatts to Metric Horsepower (ps) -- [ ] Kilowatts to Microfarads -- [ ] Kilowatts to Microhenries -- [ ] Kilowatts to Milliampere-hours -- [ ] Kilowatts to Milliamps -- [ ] Kilowatts to Millihenries +- [x] Kilowatts to Calories Per Second +- [x] Kilowatts to Coulombs +- [x] Kilowatts to Farads +- [x] Kilowatts to Henries +- [x] Kilowatts to Lusec +- [x] Kilowatts to Mechanical Hp +- [x] Kilowatts to Electrical Horsepower +- [x] Kilowatts to Metric Horsepower (ps) +- [x] Kilowatts to Microfarads +- [x] Kilowatts to Microhenries +- [x] Kilowatts to Milliampere-hours +- [x] Kilowatts to Milliamps +- [x] Kilowatts to Millihenries - [ ] Kilowatts to Millivolts - [ ] Kilowatts to Milliwatts - [ ] Kilowatts to Ohms @@ -5435,16 +5514,16 @@ The registry currently contains 416 unique calculator slugs. - [ ] Long Tons to Yoctograms - [ ] Long Tons to Zeptograms - [ ] Lumens to Foot-candles -- [ ] Lusec to Boiler Horsepower -- [ ] Lusec to btu/hour -- [ ] Lusec to btu/min -- [ ] Lusec to Calories Per Second -- [ ] Lusec to Electrical Horsepower -- [ ] Lusec to Horsepower -- [ ] Lusec to Kilowatts -- [ ] Lusec to Mechanical Hp -- [ ] Lusec to Megawatts -- [ ] Lusec to Metric Horsepower (ps) +- [x] Lusec to Boiler Horsepower +- [x] Lusec to btu/hour +- [x] Lusec to btu/min +- [x] Lusec to Calories Per Second +- [x] Lusec to Electrical Horsepower +- [x] Lusec to Horsepower +- [x] Lusec to Kilowatts +- [x] Lusec to Mechanical Hp +- [x] Lusec to Megawatts +- [x] Lusec to Metric Horsepower (ps) - [ ] Lusec to Tons Of Refrigeration - [ ] Lux to Candela - [ ] Mach to Centimeters Per Second @@ -5480,16 +5559,16 @@ The registry currently contains 416 unique calculator slugs. - [ ] Mebibytes to Terabytes - [ ] Mebibytes to Words (16-bit) - [ ] Mebibytes to Words (32-bit) -- [ ] Mechanical Hp to Boiler Horsepower +- [x] Mechanical Hp to Boiler Horsepower - [ ] Mechanical Hp to btu/hour - [ ] Mechanical Hp to btu/min - [ ] Mechanical Hp to Calories Per Second -- [ ] Mechanical Hp to Electrical Horsepower -- [ ] Mechanical Hp to Horsepower +- [x] Mechanical Hp to Electrical Horsepower +- [x] Mechanical Hp to Horsepower - [ ] Mechanical Hp to Kilowatts - [ ] Mechanical Hp to Lusec - [ ] Mechanical Hp to Megawatts -- [ ] Mechanical Hp to Metric Horsepower (ps) +- [x] Mechanical Hp to Metric Horsepower (ps) - [ ] Mechanical Hp to Tons Of Refrigeration - [ ] Mechanical Hp to Watts - [ ] Megabits to Bits @@ -5550,15 +5629,15 @@ The registry currently contains 416 unique calculator slugs. - [ ] Megapascals to Technical Atmosphere - [ ] Megapascals to Technical Atmosphere (at) - [ ] Megapascals to Torr -- [ ] Megawatts to Boiler Horsepower +- [x] Megawatts to Boiler Horsepower - [ ] Megawatts to btu/hour - [ ] Megawatts to btu/min - [ ] Megawatts to Calories Per Second -- [ ] Megawatts to Electrical Horsepower -- [ ] Megawatts to Horsepower +- [x] Megawatts to Electrical Horsepower +- [x] Megawatts to Horsepower - [ ] Megawatts to Lusec - [ ] Megawatts to Mechanical Hp -- [ ] Megawatts to Metric Horsepower (ps) +- [x] Megawatts to Metric Horsepower (ps) - [ ] Megawatts to Tons Of Refrigeration - [ ] Megawatts to Watts - [ ] Meters Of Seawater to Atmosphere @@ -5609,17 +5688,17 @@ The registry currently contains 416 unique calculator slugs. - [ ] Meters to Smoots - [ ] Meters to Thou - [ ] Meters to Thou (mil) -- [ ] Metric Horsepower (ps) to Boiler Horsepower -- [ ] Metric Horsepower (ps) to btu/hour -- [ ] Metric Horsepower (ps) to btu/min -- [ ] Metric Horsepower (ps) to Calories Per Second -- [ ] Metric Horsepower (ps) to Electrical Horsepower -- [ ] Metric Horsepower (ps) to Horsepower -- [ ] Metric Horsepower (ps) to Kilowatts -- [ ] Metric Horsepower (ps) to Lusec -- [ ] Metric Horsepower (ps) to Mechanical Hp -- [ ] Metric Horsepower (ps) to Megawatts -- [ ] Metric Horsepower (ps) to Tons Of Refrigeration +- [x] Metric Horsepower (ps) to Boiler Horsepower +- [x] Metric Horsepower (ps) to btu/hour +- [x] Metric Horsepower (ps) to btu/min +- [x] Metric Horsepower (ps) to Calories Per Second +- [x] Metric Horsepower (ps) to Electrical Horsepower +- [x] Metric Horsepower (ps) to Horsepower +- [x] Metric Horsepower (ps) to Kilowatts +- [x] Metric Horsepower (ps) to Lusec +- [x] Metric Horsepower (ps) to Mechanical Hp +- [x] Metric Horsepower (ps) to Megawatts +- [x] Metric Horsepower (ps) to Tons Of Refrigeration - [ ] Metric Tons to Amu - [ ] Metric Tons to Apothecary Ounces - [ ] Metric Tons to Atomic Mass Units @@ -7835,14 +7914,14 @@ The registry currently contains 416 unique calculator slugs. - [ ] Ton Of Tnt to Rydberg - [ ] Ton Of Tnt to Therms - [ ] Ton Of Tnt to Watt-hours -- [ ] Tons Of Refrigeration to Boiler Horsepower +- [x] Tons Of Refrigeration to Boiler Horsepower - [ ] Tons Of Refrigeration to btu/min - [ ] Tons Of Refrigeration to Calories Per Second -- [ ] Tons Of Refrigeration to Electrical Horsepower +- [x] Tons Of Refrigeration to Electrical Horsepower - [ ] Tons Of Refrigeration to Lusec - [ ] Tons Of Refrigeration to Mechanical Hp - [ ] Tons Of Refrigeration to Megawatts -- [ ] Tons Of Refrigeration to Metric Horsepower (ps) +- [x] Tons Of Refrigeration to Metric Horsepower (ps) - [ ] Tons Of Refrigeration to Watts - [ ] Tons to Amu - [ ] Tons to Apothecary Ounces @@ -8080,30 +8159,30 @@ The registry currently contains 416 unique calculator slugs. - [ ] Watt-hours to Ton Of Tnt - [ ] Watt-hours to Volts - [ ] Watt-hours to Watts -- [ ] Watts to Abamperes -- [ ] Watts to Abvolts -- [ ] Watts to Ampere-hours -- [ ] Watts to Coulombs -- [ ] Watts to Electrical Horsepower -- [ ] Watts to Farads -- [ ] Watts to Henries -- [ ] Watts to Kva -- [ ] Watts to Lusec -- [ ] Watts to Mechanical Hp -- [ ] Watts to Megawatts -- [ ] Watts to Microfarads -- [ ] Watts to Microhenries -- [ ] Watts to Milliampere-hours -- [ ] Watts to Milliamps -- [ ] Watts to Millihenries -- [ ] Watts to Millivolts -- [ ] Watts to Ohms -- [ ] Watts to Picofarads -- [ ] Watts to Siemens -- [ ] Watts to Statamperes -- [ ] Watts to Statvolts -- [ ] Watts to Tons Of Refrigeration -- [ ] Watts to Watt-hours +- [x] Watts to Abamperes +- [x] Watts to Abvolts +- [x] Watts to Ampere-hours +- [x] Watts to Coulombs +- [x] Watts to Electrical Horsepower +- [x] Watts to Farads +- [x] Watts to Henries +- [x] Watts to Kva +- [x] Watts to Lusec +- [x] Watts to Mechanical Hp +- [x] Watts to Megawatts +- [x] Watts to Microfarads +- [x] Watts to Microhenries +- [x] Watts to Milliampere-hours +- [x] Watts to Milliamps +- [x] Watts to Millihenries +- [x] Watts to Millivolts +- [x] Watts to Ohms +- [x] Watts to Picofarads +- [x] Watts to Siemens +- [x] Watts to Statamperes +- [x] Watts to Statvolts +- [x] Watts to Tons Of Refrigeration +- [x] Watts to Watt-hours - [ ] Weber to Ampere-turns Per Meter - [ ] Weber to Gauss - [ ] Weber to Milligauss diff --git a/hdyc-svelte/src/app.css b/hdyc-svelte/src/app.css index ab5293b..c10fe57 100644 --- a/hdyc-svelte/src/app.css +++ b/hdyc-svelte/src/app.css @@ -468,11 +468,15 @@ a:hover { } .category-grid { width: min(1160px, 100%); - display: grid; - grid-template-columns: repeat(auto-fit, minmax(180px, 220px)); - gap: clamp(0.75rem, 1.3vw, 1.25rem); + display: flex; + flex-wrap: wrap; justify-content: center; - justify-items: stretch; + gap: clamp(0.75rem, 1.3vw, 1.25rem); +} +.category-grid .category-card { + flex: 0 1 clamp(180px, 22vw, 220px); + min-width: 180px; + max-width: 220px; } /* ─── Calculator List (category page) ────────────────────── */ @@ -600,10 +604,17 @@ a:hover { /* ─── Responsive ─────────────────────────────────────────── */ -@media (max-width: 768px) { +@media (max-width: 1024px) { .hamburger { display: block; } + .site-body { + gap: 1rem; + padding-inline: 1rem; + } +} + +@media (max-width: 768px) { .main-content { padding: 1.25rem; } @@ -618,8 +629,11 @@ a:hover { } .category-grid { width: min(960px, 100%); - grid-template-columns: repeat(auto-fit, minmax(150px, 200px)); - justify-content: center; + } + .category-grid .category-card { + flex: 0 1 clamp(150px, 40vw, 200px); + min-width: 150px; + max-width: 200px; } .stats-row { gap: 1.5rem; diff --git a/hdyc-svelte/src/lib/components/Calculator.svelte b/hdyc-svelte/src/lib/components/Calculator.svelte index b52f53e..74fd21e 100644 --- a/hdyc-svelte/src/lib/components/Calculator.svelte +++ b/hdyc-svelte/src/lib/components/Calculator.svelte @@ -13,6 +13,8 @@ let val2 = ''; let val3 = ''; let activeField: 1 | 2 | 3 = 1; + let swapSnapshot: { val1: string; val2: string } | null = null; + let isSwapFlipped = false; $: has3 = ['3col', '3col-mul'].includes(config.type) || !!config.labels.in3; $: isTextInput = ['base', 'text-bin', 'bin-text', 'dec-frac', 'dms-dd', 'dd-dms'].includes(config.type); @@ -24,7 +26,13 @@ let paramsInitializing = true; + function resetSwapState() { + swapSnapshot = null; + isSwapFlipped = false; + } + function handleInput(source: 1 | 2 | 3) { + resetSwapState(); activeField = source; const result = solve(config, source, val1, val2, val3); if (source !== 1) val1 = result.val1; @@ -33,14 +41,23 @@ } function swap() { - [val1, val2] = [val2, val1]; - handleInput(1); + if (isSwapFlipped && swapSnapshot) { + val1 = swapSnapshot.val1; + val2 = swapSnapshot.val2; + resetSwapState(); + } else { + swapSnapshot = { val1, val2 }; + [val1, val2] = [val2, val1]; + isSwapFlipped = true; + } + activeField = activeField === 1 ? 2 : 1; } function clear() { val1 = ''; val2 = ''; val3 = ''; + resetSwapState(); } onMount(() => { diff --git a/hdyc-svelte/src/lib/components/Sidebar.svelte b/hdyc-svelte/src/lib/components/Sidebar.svelte index 4823214..3d86f41 100644 --- a/hdyc-svelte/src/lib/components/Sidebar.svelte +++ b/hdyc-svelte/src/lib/components/Sidebar.svelte @@ -64,7 +64,7 @@ export let open = false; -