Skip to content

Commit

Permalink
test logo
Browse files Browse the repository at this point in the history
i'm clearly not a designer
  • Loading branch information
Vahor committed Apr 29, 2024
1 parent 27e923d commit 2007c9a
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 9 deletions.
Binary file added public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
15 changes: 15 additions & 0 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/app/favicon.ico
Binary file not shown.
6 changes: 6 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ export const metadata: Metadata = {
locale: "fr_FR",
siteName: "Vahor",
},
icons: [
{ rel: "icon", url: "/favicon.ico" },
{ rel: "apple-touch-icon", url: "/apple-icon.png" },
{ rel: "icon", sizes: "192x192", url: "/android-chrome-192x192.png" },
{ rel: "icon", sizes: "512x512", url: "/android-chrome-512x512.png" },
],
};

export const viewport: Viewport = {
Expand Down
8 changes: 4 additions & 4 deletions src/app/tag/[tag]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ export default function TagPage({ params }: PageProps) {
.toSorted((a, b) => b.datePublished.localeCompare(a.datePublished));

return (
<div className="grid sm:grid-cols-4 gap-4 container">
<nav className="flex gap-2 flex-col col-span-4 sm:col-span-1 max-h-64 sm:max-h-none overflow-y-auto">
<div className="grid md:grid-cols-4 gap-4 container">
<nav className="flex gap-2 flex-col col-span-4 md:col-span-1 max-h-64 md:max-h-none overflow-y-auto">
{allTags.map((tag) => {
const active = tag === params.tag;
return (
<Link key={tag} href={`/tag/${tag}`} className="w-full sm:w-max ">
<Link key={tag} href={`/tag/${tag}`} className="w-full md:w-max ">
<Button
disabled={active}
className="capitalize w-full justify-start"
Expand All @@ -43,7 +43,7 @@ export default function TagPage({ params }: PageProps) {
})}
</nav>

<main className="col-span-4 sm:col-span-3 px-3">
<main className="col-span-4 md:col-span-3">
<h1 className="text-3xl font-semibold text-black dark:text-white capitalize">
{params.tag}
</h1>
Expand Down
5 changes: 3 additions & 2 deletions src/components/header/header.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { HEADER_LINKS } from "@/lib/constants";
import Link from "next/link";
import { Logo } from "./logo";
import { SearchMenu } from "./search";
import { ThemeSwitcher } from "./theme-switcher";

export function Header() {
return (
<header className="py-4 sm:py-8 px-8 max-w-screen-xl mx-auto">
<div id="maybe-a-logo-one-day" />
<header className="py-4 sm:py-8 px-8 max-w-screen-xl mx-auto flex items-center justify-between">
<Logo />
<div className="flex justify-end gap-3 items-center">
<nav className="flex gap-6">
{HEADER_LINKS.map(({ label, href }) => (
Expand Down
31 changes: 31 additions & 0 deletions src/components/header/logo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"use client";

import { useTheme } from "next-themes";
import Image from "next/image";
import Link from "next/link";
import { useEffect, useState } from "react";
import darkLogo from "../../../public/logo-dark.svg";
import whiteLogo from "../../../public/logo-white.svg";

export function Logo() {
const { resolvedTheme: theme } = useTheme();
const [mounted, setMounted] = useState(false);

useEffect(() => {
setMounted(true);
}, []);

return (
<Link href="/" className="flex items-center gap-2 cursor-pointer shrink-0">
<Image
src={mounted && theme === "dark" ? darkLogo : whiteLogo}
alt="Logo"
width={28}
className="transform hover:rotate-12 transition-transform -ml-2 w-[28px] h-[28px]"
/>
<span className="hidden sm:inline text-dark dark:text-white font-semibold text-lg">
Vahor
</span>
</Link>
);
}
3 changes: 0 additions & 3 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ const config = {
DEFAULT: "1rem",
md: "4rem",
},
screens: {
"2xl": "1400px",
},
},
fontFamily: {
mono: ["var(--font-mono)"],
Expand Down

0 comments on commit 2007c9a

Please sign in to comment.