set up services section, get projects working again, set up netlify config
This commit is contained in:
83
src/lib/components/NavBar.svelte
Normal file
83
src/lib/components/NavBar.svelte
Normal file
@@ -0,0 +1,83 @@
|
||||
<script lang="ts">
|
||||
import type { SearchResult } from '$lib/utils/search';
|
||||
import { searchResults } from '$lib/store';
|
||||
|
||||
let searchQuery = '';
|
||||
|
||||
async function handleSearch() {
|
||||
// const section = window.location.pathname.split('/')[1];
|
||||
const response = await fetch(`/api/poetry/search?q=${encodeURIComponent(searchQuery)}`);
|
||||
if (response.ok) {
|
||||
const data: SearchResult[] = await response.json();
|
||||
searchResults.set(data);
|
||||
} else {
|
||||
console.error('Failed to fetch search results');
|
||||
searchResults.set([]);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col h-screen">
|
||||
<div class="navbar bg-base-300 sticky top-0 z-50">
|
||||
<div class="navbar-start">
|
||||
<div class="dropdown">
|
||||
<div tabindex="-1" class="btn btn-ghost text-primary lg:hidden">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-5 w-5"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M4 6h16M4 12h8m-8 6h16"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<ul
|
||||
tabindex="-1"
|
||||
class="menu menu-sm dropdown-content mt-3 z-10 p-2 shadow bg-base-300 rounded-box w-52"
|
||||
>
|
||||
<li><a href="/thoughts">Thoughts</a></li>
|
||||
<li><a href="/poetry">Poetry</a></li>
|
||||
<li><a href="/projects">Projects</a></li>
|
||||
<li><a href="/services">Services</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="link-primary text-xl" href="/">silentsilas</a>
|
||||
</div>
|
||||
<div class="navbar-end lg:hidden">
|
||||
<div class="form-control">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Search"
|
||||
class="input input-bordered md:w-auto"
|
||||
bind:value={searchQuery}
|
||||
on:input={handleSearch}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-end hidden lg:flex">
|
||||
<div class="form-control">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Search"
|
||||
class="input input-bordered md:w-auto"
|
||||
bind:value={searchQuery}
|
||||
on:input={handleSearch}
|
||||
/>
|
||||
</div>
|
||||
<ul class="menu menu-horizontal px-1">
|
||||
<li><a href="/thoughts">Thoughts</a></li>
|
||||
<li><a href="/poetry">Poetry</a></li>
|
||||
<li><a href="/projects">Projects</a></li>
|
||||
<li><a href="/services">Services</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<slot />
|
||||
</div>
|
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { T, useTask, useThrelte } from '@threlte/core';
|
||||
import { World } from '@threlte/rapier';
|
||||
import { Inspector } from 'three-inspect';
|
||||
import { dev } from '$app/environment';
|
||||
import SpaceSkysphere from './SpaceSkysphere.svelte';
|
||||
import { Group, type Object3DEventMap } from 'three';
|
||||
@@ -35,7 +34,3 @@
|
||||
<slot />
|
||||
</T.Group>
|
||||
</World>
|
||||
|
||||
{#if false}
|
||||
<Inspector />
|
||||
{/if}
|
||||
|
@@ -17,6 +17,8 @@
|
||||
clickHandler();
|
||||
}
|
||||
};
|
||||
|
||||
const isExternal = href.startsWith('http');
|
||||
</script>
|
||||
|
||||
<HTML position.x={position[0]} position.y={position[1]} position.z={position[2]}>
|
||||
@@ -33,6 +35,7 @@
|
||||
isPointerDown = false;
|
||||
isHovering = false;
|
||||
}}
|
||||
target={isExternal ? '_blank' : ''}
|
||||
on:click={onClick}
|
||||
class="bg-green-700 px-3 py-3 text-white opacity-50 hover:opacity-90 active:opacity-100"
|
||||
style="transform: translate(-50%, 50%); display: block;"
|
||||
|
17
src/lib/components/scenes/app/Overlay.svelte
Normal file
17
src/lib/components/scenes/app/Overlay.svelte
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="overlay container" id="overlay">
|
||||
<slot name="overlay" />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.overlay {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: rgba(16, 56, 30, 0.9);
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user