This commit is contained in:
parent
ae10c14cc8
commit
5a9a02b772
3 changed files with 45 additions and 42 deletions
|
@ -20,7 +20,10 @@ export default function Chat() {
|
|||
setUsername(`User${randomNum}`);
|
||||
}
|
||||
|
||||
const ws = new WebSocket(`ws://${globalThis.location.host}/api/chat`);
|
||||
const wsProtocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
||||
const ws = new WebSocket(
|
||||
`${wsProtocol}//${globalThis.location.host}/api/chat`,
|
||||
);
|
||||
|
||||
ws.onopen = () => {
|
||||
console.log("Connected to chat");
|
||||
|
|
|
@ -53,7 +53,8 @@ export default function NavigationBar({ currentPath }: NavigationBarProps) {
|
|||
isScrolling.value ? "opacity-30" : "opacity-100"
|
||||
} ${isVisible.value ? "translate-y-0" : "translate-y-20"}`}
|
||||
>
|
||||
<ul class="menu menu-horizontal bg-base-200 rounded-box p-2 shadow-lg flex flex-nowrap whitespace-nowrap overflow-x-auto">
|
||||
<div class="overflow-visible">
|
||||
<ul class="menu menu-horizontal bg-base-200 rounded-box p-2 shadow-lg flex flex-nowrap whitespace-nowrap">
|
||||
<li class="mx-1">
|
||||
<a href="/" class={currentPath === "/" ? "menu-active" : ""}>
|
||||
<div class="tooltip" data-tip="Home">
|
||||
|
@ -96,5 +97,6 @@ export default function NavigationBar({ currentPath }: NavigationBarProps) {
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -3,14 +3,12 @@ import { join } from "@std/path";
|
|||
|
||||
const POSTS_DIR = "./posts";
|
||||
|
||||
// This is what gets parsed from the post front matter
|
||||
interface FrontMatter {
|
||||
title: string;
|
||||
published_at: string;
|
||||
blurb: string;
|
||||
}
|
||||
|
||||
// This is what gets used for rendering
|
||||
export interface Post {
|
||||
slug: string;
|
||||
title: string;
|
||||
|
|
Loading…
Add table
Reference in a new issue