Skip to content

Commit

Permalink
unit-conversion/data: Init for bibytes (closes #53)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Jul 10, 2024
1 parent 30b14d2 commit 0940d65
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import LanguageHtml5 from "svelte-material-icons/LanguageHtml5.svelte";
import Qrcode from "svelte-material-icons/Qrcode.svelte";
import FileDelimitedOutline from "svelte-material-icons/FileDelimitedOutline.svelte";
import Thermometer from "svelte-material-icons/Thermometer.svelte";
import Sd from "svelte-material-icons/Sd.svelte";

export default {
"Plain text": [
Expand Down Expand Up @@ -82,6 +83,11 @@ export default {
],

"Unit conversion": [
{
path: "/unit-conversion/data",
title: "Data",
icon: Sd
},
{
path: "/unit-conversion/temperature",
title: "Temperature",
Expand Down
19 changes: 19 additions & 0 deletions src/routes/unit-conversion/data/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script>
import Tool from "$lib/components/tool.svelte";
import OneColumnView from "$lib/components/one-column-view.svelte";
import SingleUnit from "../single-unit.svelte";
let from = "gibibytes";
let baseValue = 1;
</script>

<Tool>
<OneColumnView title="Data Conversion">
<SingleUnit bind:baseValue={baseValue} bind:from={from} to="bytes" name="Bytes" />
<SingleUnit bind:baseValue={baseValue} bind:from={from} to="kibibytes" name="Kibibytes" />
<SingleUnit bind:baseValue={baseValue} bind:from={from} to="mebibytes" name="Mebibytes" />
<SingleUnit bind:baseValue={baseValue} bind:from={from} to="gibibytes" name="Gibibytes" />
<SingleUnit bind:baseValue={baseValue} bind:from={from} to="tebibytes" name="Tebibytes" />
<SingleUnit bind:baseValue={baseValue} bind:from={from} to="pebibytes" name="Pebibytes" />
</OneColumnView>
</Tool>

0 comments on commit 0940d65

Please sign in to comment.