Compare commits
No commits in common. "435cfff1c16c66c0326c10c9a3554381b973263b" and "4cab7bb6eda337757f5f846d4c5e3b1e4fbc0490" have entirely different histories.
435cfff1c1
...
4cab7bb6ed
@ -1,4 +1,3 @@
|
||||
import type { NavigationSubItem } from "@/libs/navigation";
|
||||
import type { JSX } from "solid-js";
|
||||
|
||||
import { usePageContext } from "vike-solid/usePageContext";
|
||||
@ -22,8 +21,7 @@ type PageLinkProps = Omit<JSX.IntrinsicElements["div"], "dir" | "title"> & {
|
||||
};
|
||||
|
||||
function PageLink(props: PageLinkProps) {
|
||||
const getPageCategory = () =>
|
||||
navigation.find((section) => {
|
||||
const pageCategory = navigation.find((section) => {
|
||||
return section.links.some(
|
||||
(link) =>
|
||||
link.href === props.href ||
|
||||
@ -45,9 +43,9 @@ function PageLink(props: PageLinkProps) {
|
||||
)}
|
||||
>
|
||||
<p class="flex flex-col gap-0">
|
||||
{getPageCategory() && (
|
||||
{pageCategory && (
|
||||
<span class="text-violet-600 text-sm mb-1 leading-3">
|
||||
{getPageCategory()?.title}
|
||||
{pageCategory.title}
|
||||
</span>
|
||||
)}
|
||||
<span class="leading-4">{props.title}</span>
|
||||
@ -89,23 +87,13 @@ export function PrevNextLinks() {
|
||||
return [previousPage, nextPage];
|
||||
};
|
||||
|
||||
if (getNeighboringLinks().length === 0) return null;
|
||||
const [previousPage, nextPage] = getNeighboringLinks();
|
||||
if (!nextPage && !previousPage) return null;
|
||||
|
||||
return (
|
||||
<dl class="mt-12 flex gap-4 border-t border-slate-200 pt-6">
|
||||
{getNeighboringLinks()[0] && (
|
||||
<PageLink
|
||||
dir="previous"
|
||||
{...(getNeighboringLinks()[0] as NavigationSubItem)}
|
||||
/>
|
||||
)}
|
||||
|
||||
{getNeighboringLinks()[1] && (
|
||||
<PageLink
|
||||
class="ml-auto text-right"
|
||||
{...(getNeighboringLinks()[1] as NavigationSubItem)}
|
||||
/>
|
||||
)}
|
||||
{previousPage && <PageLink dir="previous" {...previousPage} />}
|
||||
{nextPage && <PageLink class="ml-auto text-right" {...nextPage} />}
|
||||
</dl>
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
import type { JSXElement } from "solid-js";
|
||||
|
||||
// import { TableOfContents } from "@/partials/TableOfContents";
|
||||
import { TableOfContents } from "@/partials/TableOfContents";
|
||||
import { PrevNextLinks } from "@/components/PrevNextLinks";
|
||||
import { usePageContext } from "vike-solid/usePageContext";
|
||||
import { clientOnly } from "vike-solid/clientOnly";
|
||||
import { clock } from "solid-heroicons/outline";
|
||||
import { navigation } from "@/libs/navigation";
|
||||
import { Prose } from "@/components/Prose";
|
||||
@ -13,10 +12,6 @@ type DocsLayoutProps = {
|
||||
children: JSXElement;
|
||||
};
|
||||
|
||||
const TableOfContents = clientOnly(
|
||||
async () => (await import("@/partials/TableOfContents")).TableOfContents,
|
||||
);
|
||||
|
||||
export function DocsLayout(props: DocsLayoutProps) {
|
||||
const pageContext = usePageContext();
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import type { SectionCache } from "@/services/DocCache";
|
||||
import type { PageContext } from "vike/types";
|
||||
|
||||
import { useConfig } from "vike-solid/useConfig";
|
||||
@ -8,7 +9,6 @@ export type Data = Awaited<ReturnType<typeof data>>;
|
||||
|
||||
export async function data(pageContext: PageContext) {
|
||||
const config = useConfig();
|
||||
await docCache.waitingForCache(20000);
|
||||
|
||||
const {
|
||||
exports: { frontmatter },
|
||||
@ -28,13 +28,6 @@ export async function data(pageContext: PageContext) {
|
||||
|
||||
const doc = docCache.get(cachePathname);
|
||||
|
||||
if (!doc) {
|
||||
console.error(
|
||||
`DocCache: No doc found for ${cachePathname}. This is a bug!`,
|
||||
"Please report it to the maintainers.",
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
sections: doc?.sections || [],
|
||||
frontmatter,
|
||||
|
||||
@ -12,12 +12,14 @@ Découvre donc de bons conseils pour t'aider à te préparer au mieux !
|
||||
|
||||
## Certifications couvertes sur le Memento
|
||||
|
||||
<QuickLinks.QuickLink
|
||||
<QuickLinks>
|
||||
<QuickLinks.QuickLink
|
||||
title="DWWM"
|
||||
description="Titre professionnel Développeur Web et Web Mobile"
|
||||
href="certifications/dwwm"
|
||||
href="./dwwm"
|
||||
icon="presets"
|
||||
/>
|
||||
/>
|
||||
</QuickLinks>
|
||||
|
||||
## Certifications en cours de rédaction
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user