File size: 1,446 Bytes
7ee5f8f 0a9d77b 7ee5f8f 7e2111f 7ee5f8f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
<script lang="ts">
import { activeTab } from "./store.js";
import ModelsView from "./components/ModelsView.svelte";
import ScenesView from "./components/ScenesView.svelte";
function goHome() {
window.location.href = "/";
}
</script>
<div class="container">
<div on:pointerdown={goHome} class="banner">
<h1>IGF</h1>
<p>Comparative 3D Research Browser</p>
</div>
<div class="tabs">
<button on:click={() => activeTab.set("Models")} class={$activeTab === "Models" ? "active" : ""}>Models</button>
<button on:click={() => activeTab.set("Scenes")} class={$activeTab === "Scenes" ? "active" : ""}>Scenes</button>
</div>
{#if $activeTab === "Models"}
<ModelsView />
{:else}
<ScenesView />
{/if}
</div>
<style>
.tabs {
display: flex;
justify-content: left;
margin-top: 10px;
margin-bottom: 10px;
gap: 10px;
width: 100%;
}
.tabs button {
background-color: #1a1b1e;
color: #ddd;
border: none;
outline: none;
padding: 10px 10px 10px 10px;
font-family: "Roboto", sans-serif;
font-size: 14px;
font-weight: 600;
transition: background-color 0.2s ease;
}
.tabs button:hover {
cursor: pointer;
background-color: #555;
}
.tabs button.active {
background-color: #444;
}
</style>
|