refactor(website): change Github to GitHub

This commit is contained in:
LukaDev 2024-09-29 14:51:22 +02:00
parent 1913fe815c
commit 3c7c722405
4 changed files with 15 additions and 15 deletions

View file

@ -1,10 +1,10 @@
<script lang="ts">
import GitHub from "$lib/components/GitHub.svelte"
import Logo from "$lib/components/Logo.svelte"
import Github from "$lib/components/Github.svelte"
import Search from "./Search.svelte"
import { Dialog } from "bits-ui"
import { Menu, X } from "lucide-svelte"
import { fade, fly } from "svelte/transition"
import Search from "./Search.svelte"
</script>
<Dialog.Root>
@ -17,7 +17,7 @@
<Dialog.Title class="sr-only">Menu</Dialog.Title>
<div transition:fade={{ duration: 200 }} class="bg-background">
<div class="relative z-50 flex h-14 flex-shrink-0 items-center justify-between px-4">
<Logo class="h-7 text-primary" />
<Logo class="text-primary h-7" />
<Dialog.Close>
<span class="sr-only">close menu</span>
<X aria-hidden="true" />
@ -28,13 +28,13 @@
</div>
</div>
<div
class="flex flex-grow flex-col overflow-hidden bg-background"
class="bg-background flex flex-grow flex-col overflow-hidden"
transition:fade={{ duration: 200 }}
>
<nav class="flex h-full flex-col px-4 pt-2" transition:fly={{ y: "-2%", duration: 200 }}>
<div class="flex flex-grow flex-col border-y py-3">
{#snippet item(href: string, text: string)}
<a {href} class="flex h-10 items-center rounded px-3 hover:bg-card/50">{text}</a>
<a {href} class="hover:bg-card/50 flex h-10 items-center rounded px-3">{text}</a>
{/snippet}
{@render item("/docs", "Documentation")}
@ -42,7 +42,7 @@
</div>
<div class="flex items-center py-5">
<a href="https://github.com/daimond113/pesde" target="_blank" rel="noreferrer noopener">
<Github class="size-6" />
<GitHub class="size-6" />
</a>
</div>
</nav>

View file

@ -1,27 +1,27 @@
<script>
import GitHub from "$lib/components/GitHub.svelte"
import Logo from "$lib/components/Logo.svelte"
import Github from "$lib/components/Github.svelte"
import Hamburger from "./Hamburger.svelte"
import Search from "./Search.svelte"
</script>
<header class="pt-14 sm:pt-16">
<div class="fixed inset-x-0 top-0 z-50 bg-background/80 backdrop-blur">
<div class="bg-background/80 fixed inset-x-0 top-0 z-50 backdrop-blur">
<div class="mx-auto flex h-14 max-w-screen-lg items-center justify-between px-4 sm:h-16">
<a href="/">
<Logo class="h-7 text-primary sm:h-9" />
<Logo class="text-primary h-7 sm:h-9" />
</a>
<div class="hidden w-full max-w-80 sm:flex">
<Search />
</div>
<div class="hidden items-center space-x-6 sm:flex [&_a:hover]:text-heading [&_a]:transition">
<div class="[&_a:hover]:text-heading hidden items-center space-x-6 sm:flex [&_a]:transition">
<nav class="flex items-center space-x-6 font-medium">
<a href="/docs">Docs</a>
<a href="/policies">Policies</a>
</nav>
<a href="https://github.com/daimond113/pesde" target="_blank" rel="noreferrer noopener">
<Github class="size-6" />
<GitHub class="size-6" />
</a>
</div>
<div class="flex items-center sm:hidden">

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { page } from "$app/stores"
import Github from "$lib/components/Github.svelte"
import GitHub from "$lib/components/GitHub.svelte"
import type { TargetInfo } from "$lib/registry-api"
import { BinaryIcon, Globe, Icon, LibraryIcon, Mail } from "lucide-svelte"
import type { ComponentType } from "svelte"
@ -22,7 +22,7 @@
const repositoryUrl = $derived(
data.pkg.repository !== undefined ? new URL(data.pkg.repository) : undefined,
)
const isGithub = $derived(repositoryUrl?.hostname === "github.com")
const isGitHub = $derived(repositoryUrl?.hostname === "github.com")
const githubRepo = $derived(
repositoryUrl?.pathname
.split("/")
@ -74,8 +74,8 @@
target="_blank"
rel="noreferrer noopener"
>
{#if isGithub}
<Github class="text-primary size-5" />
{#if isGitHub}
<GitHub class="text-primary size-5" />
<span>
{githubRepo}
</span>