diff --git a/README.md b/README.md
index e6cd94f..99209b8 100644
--- a/README.md
+++ b/README.md
@@ -1,47 +1,43 @@
-# Svelte + TS + Vite
+# Kalkylatorer
-This template should help get you started developing with Svelte and TypeScript in Vite.
+This is 2 things:
-## Recommended IDE Setup
+- A set of formulaes for speedy calculation for
+those times when a spreadsheet is to overwhelming. Basically related to strength training and body fat.
+- An personal exercise to learn CSS subgrids, as well
+as grinding code with Svelte.
-[VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
+## How it works
-## Need an official Svelte framework?
+- Choose a formula (top row), and set the values
+with the keypad.
+- Separate the values using semicolons.
+- Add decimals by using a comma (sorry not sorry).
+- Get result by pressing "=" button.
-Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.
-## Technical considerations
+## Built-in calculators
-**Why use this over SvelteKit?**
+### 1 repetition max calculator
-- It brings its own routing solution which might not be preferable for some users.
-- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
-
-This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
-
-Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
-
-**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
-
-Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.
-
-**Why include `.vscode/extensions.json`?**
-
-Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.
-
-**Why enable `allowJs` in the TS template?**
-
-While `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.
-
-**Why is HMR not preserving my local component state?**
-
-HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).
-
-If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.
-
-```ts
-// store.ts
-// An extremely simple external store
-import { writable } from 'svelte/store'
-export default writable(0)
+```
+1rm(weight: number, reps: number, variant: "lower" | "upper")
+```
+
+### KG to LBS converter
+
+```
+lbs(weight: number)
+```
+
+### Army body fat composition calculator
+
+```
+abf(length: number, neck: number, waist: number, hips?: number, gender: "male" | "female", metric: boolean)
+```
+
+### Navy body fat composition calculator
+
+```
+nbf(length: number, neck: number, waist: number, hips?: number, gender: "male" | "female", metric: boolean)
```
diff --git a/src/App.svelte b/src/App.svelte
index ea9c222..e5a583d 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -1,42 +1,29 @@
-{#if $currentView === "armyfatcalc"}
-
-{/if}
-{#if $currentView === "navyfatcalc"}
-
-{/if}
-{#if $currentView === "onerepmax"}
-
-{/if}
-{#if $currentView === "start"}
-
-
-
-{/if}
+
+
+
+
+
diff --git a/src/app.css b/src/app.css
index 395a0a3..6f59ae9 100644
--- a/src/app.css
+++ b/src/app.css
@@ -5,7 +5,13 @@
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
+ background-color: #333;
+ background-image: linear-gradient(
+ hsl(0 25% 10%),
+ hsl(90 25% 10%),
+ hsl(180 25% 10%),
+ hsl(270 25% 10%)
+ );
font-synthesis: none;
text-rendering: optimizeLegibility;
@@ -14,90 +20,27 @@
}
body {
+ min-height: 100vh;
+ min-width: 100vw;
margin: 0;
-}
-
-button {
- border: 5px solid crimson;
- background-color: transparent;
- border-radius: 0;
- color: inherit;
-
- &:hover,
- &:focus {
- border-color: #fff;
- background-color: rgba(255, 255, 255, 0.1);
- }
-}
-
-header {
- background-color: crimson;
-}
-
-h1,
-h2,
-h2 {
- font-size: 1em;
- margin: 0;
- text-wrap: balance;
+ display: flex;
+ justify-content: center;
+ align-items: center;
}
main {
- min-width: 100vw;
- min-height: 100vh;
+ width: 14rem;
+ height: 14rem;
+ max-width: 97%;
+ max-height: 97%;
+ background: #543;
+ padding: 0.5em;
+ border: 3px solid #000;
+ background-image: linear-gradient(135deg, #432, #654, #432);
+ border-radius: 5px;
display: grid;
- gap: 1em;
- padding: 1em;
+ gap: 0.2em;
box-sizing: border-box;
- grid-template-columns: repeat(3, 1fr);
- grid-template-rows: repeat(7, 1fr);
-}
-
-output {
- background: rgba(0, 0, 0, 0.25);
- display: grid;
- grid-column: 1 / 4;
- grid-row: 2 / 4;
- grid-template: subgrid / subgrid;
- font-size: 2em;
-
- > span {
- grid-column: 1 / 6;
- grid-row: 1 / 2;
- text-align: right;
-
- &::before {
- content: "=";
- color: #888;
- }
-
- &::after {
- content: "%";
- color: #888;
- }
- }
-}
-
-form {
- background: rgba(255, 255, 255, 0.25);
- display: grid;
- grid-column: 1 / 4;
- grid-row: 4 / 8;
- grid-template: subgrid / subgrid;
-}
-
-input {
- max-width: 4em;
- display: block;
-}
-
-header {
- display: grid;
- grid-column: 1 / 4;
- grid-row: 1 / 1;
- grid-template: subgrid / subgrid;
-}
-
-h1 {
- grid-column: 2 / 4;
+ grid-template-columns: repeat(4, 1fr);
+ grid-template-rows: repeat(8, 1fr);
}
diff --git a/src/lib/ArmyFatPercentage.svelte b/src/lib/ArmyFatPercentage.svelte
deleted file mode 100644
index c85056d..0000000
--- a/src/lib/ArmyFatPercentage.svelte
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
-
-