Skip to content

Commit

Permalink
fix: 🎨 update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
doneber committed Mar 11, 2024
1 parent 0cb11f6 commit 7712df8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/components/Navbar.astro
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
import ToggleTheme from './ToggleTheme';
import Logo from './Logo.astro';
import Logo from "./Logo.astro"
import ToggleTheme from "./ToggleTheme"
---
<nav class="container mx-auto flex justify-between p-4">
<a href="/" class="flex gap-2 items-center justify-center hover:underline underline-offset-4">
<Logo class="w-5 mt-1" />
<span>LinkHub</span>
</a>
<ToggleTheme client:only/>
<div class="flex gap-3">
<a class="hover:underline underline-offset-4" href="/contribution">Colaboraciones</a>
<a class="hover:underline underline-offset-4" href="/contribution">Colaboraciones</a>
<a class="hover:underline underline-offset-4" href="/all">Todos los Recursos</a>
<ToggleTheme client:only/>
</div>
</nav>
2 changes: 1 addition & 1 deletion src/components/Tag/Tag.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const Tag = ({ text }: { text: string }) => {
// TODO: Limpiar el "text" o codificarlo para poder pasarlo como query param en la url
return (
<a href={`/search?q=%23${text}`} className="bg-neutral-800 rounded-xl border-[1px] border-[solid] border-neutral-800 text-sm pt-0.5 pb-1 px-3">
<a href={`/search?q=%23${text}`} className="rounded-xl border-[1px] border-[solid] border-neutral-800 bg-neutral-800 px-3 pb-1 pt-0.5 text-sm dark:border-neutral-200 dark:bg-neutral-200 dark:text-neutral-950 dark:hover:bg-neutral-300">
<span className="text-base">{text}</span>
</a>
)
Expand Down
5 changes: 3 additions & 2 deletions src/components/ToggleTheme.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useEffect, useState } from "preact/hooks";


export default function ToggleTheme() {
const [theme, setTheme] = useState(localStorage.getItem("theme") ?? "light");

Expand All @@ -18,6 +17,8 @@ useEffect(() => {
}, [theme]);

return (
<button className="rounded-full border p-1 dark:border-neutral-700" onClick={handleClick}>{theme === "light" ? "🌙" : "🌞"}</button>
<button onClick={handleClick}>
<svg width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 496" data-astro-cid-oemx5le4=""><path fill="currentColor" d="M8,256C8,393,119,504,256,504S504,393,504,256,393,8,256,8,8,119,8,256ZM256,440V72a184,184,0,0,1,0,368Z" transform="translate(-8 -8)" data-astro-cid-oemx5le4=""></path></svg>
</button>
);
}

0 comments on commit 7712df8

Please sign in to comment.