From 8afb903d7bf83f501d7bf207b75702840cd3d49e Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 7 Mar 2026 07:05:48 +0000 Subject: [PATCH] Responsive layout --- calculators_list.md | 154 +++++++++--------- hdyc-svelte/src/app.css | 13 +- hdyc-svelte/src/lib/components/Sidebar.svelte | 140 +++++++++++++--- hdyc-svelte/src/lib/data/calculators.ts | 84 ++++++++++ 4 files changed, 293 insertions(+), 98 deletions(-) diff --git a/calculators_list.md b/calculators_list.md index 44be9f4..5f37f03 100644 --- a/calculators_list.md +++ b/calculators_list.md @@ -471,7 +471,7 @@ Whenever a new calculator is published via the REST API, it must be appended her - [ ] AWG to Circular mils - [ ] AWG to Millimeters (diameter) - [ ] AWG to Square millimeters (cross-section) -- [ ] Banana equivalent dose to Microsievert +- [x] Banana equivalent dose to Microsievert - [x] Bar to Atmosphere - [x] Bar to Inches of Water - [x] Bar to kPa @@ -496,91 +496,91 @@ Whenever a new calculator is published via the REST API, it must be appended her - [x] BTU to Calories - [x] BTU to Joules - [x] BTU to Kilowatt-hours -- [ ] BTU to Megajoules -- [ ] BTU to Therms -- [ ] BTU/hour to Horsepower -- [ ] BTU/hour to Kilowatts -- [ ] BTU/hour to Tons of Refrigeration -- [ ] Bushels to Liters +- [x] BTU to Megajoules +- [x] BTU to Therms +- [x] BTU/hour to Horsepower +- [x] BTU/hour to Kilowatts +- [x] BTU/hour to Tons of Refrigeration +- [x] Bushels to Liters -- [ ] Bytes to Kilobytes -- [ ] Cables to Meters -- [ ] Calories per second to Watts -- [ ] Calories to BTU -- [ ] Calories to Kilocalories -- [ ] Calories to Watt-hours -- [ ] Carats to Milligrams -- [ ] Celsius to Delisle -- [ ] Celsius to Kelvin -- [ ] Celsius to Rankine -- [ ] Celsius to Réaumur -- [ ] Celsius to Rømer -- [ ] Centigrams to Milligrams -- [ ] Centiliters to Milliliters -- [ ] Centimeters to Cubits -- [ ] Centimeters to Hands -- [ ] Centimeters to Kilometers -- [ ] Centimeters to Yards -- [ ] Centipoise to Pascal-seconds -- [ ] Centistokes to Square meters per second -- [ ] Centistokes to Stokes -- [ ] Centuries to Years -- [ ] CFS to Gallons per minute -- [ ] Chains to Miles -- [ ] Chains to Yards -- [ ] Circular mils to Square mils +- [x] Bytes to Kilobytes +- [x] Cables to Meters +- [x] Calories per second to Watts +- [x] Calories to BTU +- [x] Calories to Kilocalories +- [x] Calories to Watt-hours +- [x] Carats to Milligrams +- [x] Celsius to Delisle +- [x] Celsius to Kelvin +- [x] Celsius to Rankine +- [x] Celsius to Réaumur +- [x] Celsius to Rømer +- [x] Centigrams to Milligrams +- [x] Centiliters to Milliliters +- [x] Centimeters to Cubits +- [x] Centimeters to Hands +- [x] Centimeters to Kilometers +- [x] Centimeters to Yards +- [x] Centipoise to Pascal-seconds +- [x] Centistokes to Square meters per second +- [x] Centistokes to Stokes +- [x] Centuries to Years +- [x] CFS to Gallons per minute +- [x] Chains to Miles +- [x] Chains to Yards +- [x] Circular mils to Square mils - [ ] Cloves to Kilograms -- [ ] cm per second to Inches per second -- [ ] cmHg to Torr -- [ ] CMS to Liters per second -- [ ] Cord to Cubic meters -- [ ] Coulombs to Ampere-hours -- [ ] Counts per minute to Becquerel -- [ ] Cubic feet to Board feet +- [x] cm per second to Inches per second +- [x] cmHg to Torr +- [x] CMS to Liters per second +- [x] Cord to Cubic meters +- [x] Coulombs to Ampere-hours +- [x] Counts per minute to Becquerel +- [x] Cubic feet to Board feet - [ ] Cubic Feet to Gallons -- [ ] Cubic Feet to Liters -- [ ] Cubic Inches to Cubic Centimeters -- [ ] Cubic inches to Liters -- [ ] Cubic meters to Board feet -- [ ] Cubic meters to Cord +- [x] Cubic Feet to Liters +- [x] Cubic Inches to Cubic Centimeters +- [x] Cubic inches to Liters +- [x] Cubic meters to Board feet +- [x] Cubic meters to Cord - [ ] Cubic Meters to Cubic Feet -- [ ] Cubic meters to Cubic yards -- [ ] Cubic Meters to Gallons -- [ ] Cubic yards to Cubic meters -- [ ] Cubits to Centimeters -- [ ] Cups to Fluid Ounces -- [ ] Cups to Gallons +- [x] Cubic meters to Cubic yards +- [x] Cubic Meters to Gallons +- [x] Cubic yards to Cubic meters +- [x] Cubits to Centimeters +- [x] Cups to Fluid Ounces +- [x] Cups to Gallons - [ ] Cups to Ounces (weight) -- [ ] Cups to Pints -- [ ] Cups to Tablespoons -- [ ] Cups to Teaspoons -- [ ] Curie to Rutherford -- [ ] Days to Fortnights -- [ ] Days to Minutes -- [ ] Decades to Years -- [ ] Degrees to Arcminutes -- [ ] Degrees to Arcseconds -- [ ] Degrees to Gradians -- [ ] Degrees to Points (compass) -- [ ] Degrees to Turns -- [ ] Delisle to Celsius -- [ ] Denier to Dtex (decitex) -- [ ] Denier to Tex -- [ ] DPI to Pixels per centimeter -- [ ] Drams (fluid) to Milliliters -- [ ] Drams to Grams -- [ ] Dunams to Square meters -- [ ] Dyne-Centimeters to Newton-Meters -- [ ] Dynes per sq cm to Pascal -- [ ] Earth masses to Kilograms +- [x] Cups to Pints +- [x] Cups to Tablespoons +- [x] Cups to Teaspoons +- [x] Curie to Rutherford +- [x] Days to Fortnights +- [x] Days to Minutes +- [x] Decades to Years +- [x] Degrees to Arcminutes +- [x] Degrees to Arcseconds +- [x] Degrees to Gradians +- [x] Degrees to Points (compass) +- [x] Degrees to Turns +- [x] Delisle to Celsius +- [x] Denier to Dtex (decitex) +- [x] Denier to Tex +- [x] DPI to Pixels per centimeter +- [x] Drams (fluid) to Milliliters +- [x] Drams to Grams +- [x] Dunams to Square meters +- [x] Dyne-Centimeters to Newton-Meters +- [x] Dynes per sq cm to Pascal +- [x] Earth masses to Kilograms - [ ] Electrical Horsepower to Mechanical HP -- [ ] Electron-volts to Hartree -- [ ] Electron-volts to Joules +- [x] Electron-volts to Hartree +- [x] Electron-volts to Joules - [ ] Em to Pixels - [ ] EV (exposure value) to Lux -- [ ] Exabytes to Petabytes +- [x] Exabytes to Petabytes - [ ] f-stops to T-stops -- [ ] Fahrenheit to Kelvin +- [x] Fahrenheit to Kelvin - [ ] Fahrenheit to Newton (temp scale) - [ ] Fahrenheit to Rankine - [ ] Farads to Microfarads diff --git a/hdyc-svelte/src/app.css b/hdyc-svelte/src/app.css index 479d9ef..cd8dfdb 100644 --- a/hdyc-svelte/src/app.css +++ b/hdyc-svelte/src/app.css @@ -105,12 +105,17 @@ a:hover { .site-body { display: flex; min-height: calc(100vh - var(--header-h)); + width: 100%; + max-width: 1800px; + margin: 0 auto; + gap: clamp(1.25rem, 2vw, 2.5rem); + padding: 0 clamp(1rem, 2vw, 2rem); + align-items: stretch; } .main-content { flex: 1; - padding: 2rem; - max-width: 900px; + padding: clamp(1.5rem, 2vw, 3rem); width: 100%; } @@ -316,4 +321,8 @@ a:hover { .stats-row { gap: 1.5rem; } + .site-body { + gap: 1rem; + padding-inline: 1rem; + } } diff --git a/hdyc-svelte/src/lib/components/Sidebar.svelte b/hdyc-svelte/src/lib/components/Sidebar.svelte index 1518ef9..1b7461a 100644 --- a/hdyc-svelte/src/lib/components/Sidebar.svelte +++ b/hdyc-svelte/src/lib/components/Sidebar.svelte @@ -1,13 +1,54 @@