elegant-cli
Advanced tools
Comparing version 3.0.0-innovators.10 to 3.0.0-innovators.11
{ | ||
"name": "elegant-cli", | ||
"version": "3.0.0-innovators.10", | ||
"version": "3.0.0-innovators.11", | ||
"description": "Elegant is the easiest way to create a new static website or blog, and publish it online. No need for databases, external services, or complicated server setups.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -1,31 +0,7 @@ | ||
import Link from 'next/link' | ||
import { useRouter } from 'next/router' | ||
import { createContext, forwardRef, useRef } from 'react' | ||
import { useIsomorphicLayoutEffect } from '@/utils/core/Hooks/useIsomorphicLayoutEffect'; | ||
import clsx from 'clsx' | ||
import { Dialog } from '@headlessui/react' | ||
import { createContext } from 'react'; | ||
import { Dialog } from '@headlessui/react'; | ||
import Nav from "@/components/core/Sidebar/Skyline/Nav/Nav"; | ||
export const SidebarContext = createContext() | ||
export const SidebarContext = createContext(); | ||
const NavItem = forwardRef(({ href, children, isActive, isPublished, fallbackHref }, ref) => { | ||
return ( | ||
<li ref={ref} data-active={isActive ? 'true' : undefined}> | ||
<Link | ||
href={isPublished ? href : fallbackHref} | ||
className={clsx('block border-l pl-4 -ml-px', { | ||
'text-primary-500 border-current font-semibold dark:text-primary-400': isActive, | ||
'border-transparent hover:border-slate-400 dark:hover:border-slate-500': !isActive, | ||
'text-slate-700 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-300': | ||
!isActive && isPublished, | ||
'text-slate-400': !isActive && !isPublished, | ||
})} | ||
> | ||
{children} | ||
</Link> | ||
</li> | ||
); | ||
}) | ||
function Wrapper({ allowOverflow, children }) { | ||
@@ -40,4 +16,2 @@ return <div className={allowOverflow ? undefined : 'overflow-hidden'}>{children}</div> | ||
nav, | ||
sidebar, | ||
fallbackHref, | ||
layoutProps: { allowOverflow = true } = {}, | ||
@@ -44,0 +18,0 @@ }) { |
@@ -10,2 +10,3 @@ import Link from 'next/link'; | ||
import ThemeToggle, {ThemeSelect} from '@/components/core/Toggles/ThemeToggle/ThemeToggle'; | ||
import useHeaderStore from '@/utils/core/Hooks/useHeaderStore'; | ||
import Config from "Config"; | ||
@@ -126,4 +127,6 @@ | ||
export function Header({ hasNav = false, navIsOpen, onNavToggle, title, section }) { | ||
let [isOpaque, setIsOpaque] = useState(false) | ||
export function Header({ hasNav = false, navIsOpen, onNavToggle }) { | ||
let [isOpaque, setIsOpaque] = useState(false); | ||
const title = useHeaderStore((state) => state.title); | ||
const section = useHeaderStore((state) => state.section); | ||
@@ -144,3 +147,3 @@ useEffect(() => { | ||
} | ||
}, [isOpaque]) | ||
}, [isOpaque]); | ||
@@ -208,3 +211,3 @@ return <> | ||
<a | ||
href={Config('app.repository')} | ||
href={Config('app.repository')} | ||
className="ml-6 block text-slate-400 hover:text-slate-500 dark:hover:text-slate-300" | ||
@@ -211,0 +214,0 @@ target="_blank" |
@@ -18,3 +18,2 @@ import Link from 'next/link'; | ||
{ title: 'Easy Configuration', href: '/docs/configuration/' }, | ||
{ title: 'Affordable Hosting', href: '/docs/deployment/' }, | ||
{ title: 'Safe & Fast', href: '/blog/2023-04-20-the-future-is-markdown'} | ||
@@ -24,3 +23,2 @@ ], | ||
{ title: 'Google Analytics', href: '/docs/google-analytics/' }, | ||
{ title: 'ConvertKit', href: '/docs/convertkit/' }, | ||
{ title: 'Vercel', href: '/docs/deployment/' }, | ||
@@ -27,0 +25,0 @@ ], |
@@ -38,6 +38,2 @@ import { NavigationSection } from '@/types/Navigation'; | ||
href: "/docs/new-documents" | ||
}, | ||
{ | ||
title: "Deployment", | ||
href: "/docs/deployment" | ||
} | ||
@@ -57,6 +53,2 @@ ] | ||
{ | ||
title: "ConvertKit", | ||
href: "/docs/convertkit" | ||
}, | ||
{ | ||
title: "Google Analytics", | ||
@@ -63,0 +55,0 @@ href: "/docs/google-analytics" |
@@ -25,3 +25,3 @@ import { useState, useEffect, Fragment } from 'react'; | ||
delay: 100, | ||
}) | ||
}); | ||
@@ -105,6 +105,2 @@ // this fixes safari jumping to the bottom of the page | ||
let section = Object.entries(Component.layoutProps?.Layout?.nav ?? {}).find(([, items]) => | ||
items.links.find(({ href }) => href === router.pathname) | ||
)?.[0]; | ||
// set our url | ||
@@ -168,4 +164,2 @@ let url = Config('app.url'); | ||
onNavToggle={(isOpen) => setNavIsOpen(isOpen)} | ||
title={meta.title} | ||
section={section} | ||
/> | ||
@@ -175,3 +169,3 @@ )} | ||
<AnalyticsBody googleAnalyticsID={Config('app.google_analytics_id')}/> | ||
<Component section={section} {...Component.layoutProps} {...pageProps} /> | ||
<Component {...Component.layoutProps} {...pageProps} /> | ||
</Layout> | ||
@@ -178,0 +172,0 @@ </> |
@@ -30,5 +30,3 @@ import clsx from 'clsx'; | ||
<body | ||
className={clsx('antialiased text-slate-500 dark:text-slate-400', { | ||
'bg-white dark:bg-slate-900': !this.props.dangerousAsPath.startsWith('/examples/'), | ||
})} | ||
className="bg-white dark:bg-slate-900 antialiased text-slate-500 dark:text-slate-400" | ||
> | ||
@@ -35,0 +33,0 @@ <Main /> |
@@ -7,3 +7,3 @@ import { useRouter } from 'next/router'; | ||
let pages = documentationNav.flatMap((section) => section.links); | ||
let pageIndex = pages.findIndex((page) => page.href === router.asPath); | ||
let pageIndex = pages.findIndex((page) => page.href === router.asPath.split('#')[0]); | ||
@@ -10,0 +10,0 @@ return { |
@@ -27,3 +27,3 @@ import { unified } from 'unified'; | ||
.use(remarkHtml) | ||
.use(remarkRehype) | ||
.use(remarkRehype, {allowDangerousHtml: true}) | ||
.use(rehypeRewrite, { | ||
@@ -79,3 +79,3 @@ rewrite: (node) => { | ||
}) | ||
.use(rehypeStringify) | ||
.use(rehypeStringify, {allowDangerousHtml: true}) | ||
.process(content); | ||
@@ -82,0 +82,0 @@ |
@@ -8,3 +8,5 @@ import { Node } from "unist"; | ||
export function toc(root: Node) { | ||
let options = new NormalizedOptions; | ||
let options: Options = { | ||
headings: ['h1', 'h2'] | ||
}; | ||
@@ -15,5 +17,5 @@ // Find the <main> or <body> element | ||
// Find all heading elements | ||
let headings = findHeadings(mainNode, options); | ||
let headings = findHeadings(mainNode, options as NormalizedOptions); | ||
return CreateTocList(headings); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27363003
461
77020