feat: Initialize SvelteKit project, add tsconfig.json, and introduce a new Calculator.svelte component.
This commit is contained in:
44
hdyc-svelte/src/routes/+page.svelte
Normal file
44
hdyc-svelte/src/routes/+page.svelte
Normal file
@@ -0,0 +1,44 @@
|
||||
<script lang="ts">
|
||||
import { getCategoriesWithCounts, calculators } from '$lib/data/calculators';
|
||||
import CategoryCard from '$lib/components/CategoryCard.svelte';
|
||||
import SearchBar from '$lib/components/SearchBar.svelte';
|
||||
|
||||
const cats = getCategoriesWithCounts();
|
||||
const totalCalculators = calculators.length;
|
||||
const totalCategories = cats.length;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>HowDoYouConvert.com — Free Unit Conversion Calculators</title>
|
||||
<meta name="description" content="Convert between hundreds of units instantly. Free online calculators for length, weight, temperature, volume, area, speed, energy, power, data and more." />
|
||||
</svelte:head>
|
||||
|
||||
<section class="hero">
|
||||
<h1>How Do You Convert?</h1>
|
||||
<p>Instant, bidirectional unit conversions — no ads, no clutter, just answers.</p>
|
||||
<div class="search-center">
|
||||
<SearchBar />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="stats-row">
|
||||
<div class="stat">
|
||||
<div class="stat-num">{totalCalculators}</div>
|
||||
<div class="stat-label">Converters</div>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<div class="stat-num">{totalCategories}</div>
|
||||
<div class="stat-label">Categories</div>
|
||||
</div>
|
||||
<div class="stat">
|
||||
<div class="stat-num">0ms</div>
|
||||
<div class="stat-label">Load Time</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="section-heading">Browse by Category</h2>
|
||||
<div class="category-grid">
|
||||
{#each cats as cat}
|
||||
<CategoryCard icon={cat.icon} label={cat.label} href="/category/{cat.key}" />
|
||||
{/each}
|
||||
</div>
|
||||
Reference in New Issue
Block a user