Skip to content

Commit

Permalink
webapp: some tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
TuritoYuenan committed Dec 29, 2024
1 parent e608cd8 commit 690c120
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
12 changes: 0 additions & 12 deletions webapp/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,3 @@ body {
#app {
display: contents;
}

button {
padding: 1rem;
border-radius: 1rem;
background-color: var(--ctp-latte-text);
cursor: pointer;
transition: 1s cubic-bezier(0.075, 0.82, 0.165, 1);
}

button:hover {
scale: 1.1;
}
4 changes: 2 additions & 2 deletions webapp/src/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const fields: Record<string, {
"pressure": {
label: "Air Pressure",
icon: "airwave",
unit: "hPa",
sanitise: (value) => (value / 1000).toFixed(3)
unit: "Pa",
sanitise: (value) => value.toString()
},
"temperature": {
label: "Temperature",
Expand Down
8 changes: 3 additions & 5 deletions webapp/src/lib/Metric.svelte
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<script lang="ts">
export let icon: string = '';
export let label: string;
export let value: string | number | false = false;
export let value: string | number = NaN;
export let unit: string = '';
</script>

<div style:text-align={icon ? 'left' : 'right'}>
<span class="material-symbols-sharp">{icon ? icon : ''}</span>
<hgroup>
<h2>{label}</h2>
{#if value != false}
<p>{value} {unit}</p>
{/if}
<h3>{label}</h3>
<p>{value} {unit}</p>
</hgroup>
</div>

Expand Down

0 comments on commit 690c120

Please sign in to comment.