refactor #5
@ -1,4 +1,4 @@
|
|||||||
import { useId } from "react";
|
import React, { useId } from "react";
|
||||||
|
|
||||||
export function HeroBackground(props: React.ComponentPropsWithoutRef<"svg">) {
|
export function HeroBackground(props: React.ComponentPropsWithoutRef<"svg">) {
|
||||||
const id = useId();
|
const id = useId();
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { PluginsIcon } from "@syntax/icons/PluginsIcon";
|
|||||||
import { PresetsIcon } from "@syntax/icons/PresetsIcon";
|
import { PresetsIcon } from "@syntax/icons/PresetsIcon";
|
||||||
import { ThemingIcon } from "@syntax/icons/ThemingIcon";
|
import { ThemingIcon } from "@syntax/icons/ThemingIcon";
|
||||||
import { WarningIcon } from "@syntax/icons/WarningIcon";
|
import { WarningIcon } from "@syntax/icons/WarningIcon";
|
||||||
import { useId } from "react";
|
import React, { useId } from "react";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
|
||||||
const icons = {
|
const icons = {
|
||||||
|
|||||||
@ -1,11 +1,6 @@
|
|||||||
function LogomarkPaths() {
|
import React from "react";
|
||||||
// return (
|
|
||||||
// <g fill="none" stroke="#38BDF8" strokeLinejoin="round" strokeWidth={3}>
|
|
||||||
// <path d="M10.308 5L18 17.5 10.308 30 2.615 17.5 10.308 5z" />
|
|
||||||
// <path d="M18 17.5L10.308 5h15.144l7.933 12.5M18 17.5h15.385L25.452 30H10.308L18 17.5z" />
|
|
||||||
// </g>
|
|
||||||
// );
|
|
||||||
|
|
||||||
|
function LogomarkPaths() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<defs>
|
<defs>
|
||||||
@ -33,25 +28,6 @@ function LogomarkPaths() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function LogoWithText(props: React.ComponentPropsWithoutRef<"svg">) {
|
|
||||||
return (
|
|
||||||
<svg viewBox="0 0 231 38" {...props}>
|
|
||||||
<LogomarkPaths />
|
|
||||||
<text
|
|
||||||
className="hidden lg:block fill-zinc-900 dark:fill-zinc-100"
|
|
||||||
fontFamily="Inter Variable, sans-serif"
|
|
||||||
fontSize={24}
|
|
||||||
fontWeight="bold"
|
|
||||||
letterSpacing="-.02em"
|
|
||||||
x={74}
|
|
||||||
y={26}
|
|
||||||
>
|
|
||||||
Memento Dev
|
|
||||||
</text>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function Logo(props: React.ComponentPropsWithoutRef<"svg">) {
|
export function Logo(props: React.ComponentPropsWithoutRef<"svg">) {
|
||||||
return (
|
return (
|
||||||
<svg viewBox="0 0 58 38" {...props}>
|
<svg viewBox="0 0 58 38" {...props}>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Suspense, useCallback, useEffect, useState } from "react";
|
import React, { Suspense, useCallback, useEffect, useState } from "react";
|
||||||
import { usePageContext } from "vike-react/usePageContext";
|
import { usePageContext } from "vike-react/usePageContext";
|
||||||
import { Dialog, DialogPanel } from "@headlessui/react";
|
import { Dialog, DialogPanel } from "@headlessui/react";
|
||||||
import { Navigation } from "@syntax/Navigation";
|
import { Navigation } from "@syntax/Navigation";
|
||||||
@ -32,11 +32,12 @@ function CloseOnNavigation({ close }: { close: () => void }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function MobileNavigation() {
|
export function MobileNavigation() {
|
||||||
let [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
let close = useCallback(() => setIsOpen(false), [setIsOpen]);
|
const close = useCallback(() => setIsOpen(false), [setIsOpen]);
|
||||||
|
|
||||||
function onLinkClick(event: React.MouseEvent<HTMLAnchorElement>) {
|
function onLinkClick(event: React.MouseEvent<HTMLAnchorElement>) {
|
||||||
let link = event.currentTarget;
|
const link = event.currentTarget;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
link.pathname + link.search + link.hash ===
|
link.pathname + link.search + link.hash ===
|
||||||
window.location.pathname + window.location.search + window.location.hash
|
window.location.pathname + window.location.search + window.location.hash
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { ChevronDownIcon, ChevronUpIcon } from "@heroicons/react/24/solid";
|
import { ChevronDownIcon, ChevronUpIcon } from "@heroicons/react/24/solid";
|
||||||
import { usePageContext } from "vike-react/usePageContext";
|
import { usePageContext } from "vike-react/usePageContext";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
import { Link } from "@/components/common/Link";
|
import { Link } from "@/components/common/Link";
|
||||||
import { navigation } from "@/lib/navigation";
|
import { navigation } from "@/lib/navigation";
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
|
||||||
type NavigationItemProps = {
|
type NavigationItemProps = {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { usePageContext } from "vike-react/usePageContext";
|
import { usePageContext } from "vike-react/usePageContext";
|
||||||
import { Link } from "@/components/common/Link";
|
import { Link } from "@/components/common/Link";
|
||||||
import { navigation } from "@/lib/navigation";
|
import { navigation } from "@/lib/navigation";
|
||||||
|
import React from "react";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
|
||||||
function ArrowIcon(props: React.ComponentPropsWithoutRef<"svg">) {
|
function ArrowIcon(props: React.ComponentPropsWithoutRef<"svg">) {
|
||||||
|
|||||||
@ -8,7 +8,7 @@ export function Prose<T extends React.ElementType = "div">({
|
|||||||
}: React.ComponentPropsWithoutRef<T> & {
|
}: React.ComponentPropsWithoutRef<T> & {
|
||||||
as?: T;
|
as?: T;
|
||||||
}) {
|
}) {
|
||||||
let Component = as ?? "div";
|
const Component = as ?? "div";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Component
|
<Component
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user