fix/layout-width (#19)
All checks were successful
Update Memento Dev on VPS / deploy (push) Successful in 31s

Reviewed-on: #19
Co-authored-by: GauthierWebDev <gauthier@gauthierdaniels.fr>
Co-committed-by: GauthierWebDev <gauthier@gauthierdaniels.fr>
This commit is contained in:
Gauthier Daniels 2025-04-22 12:19:44 +00:00 committed by Gauthier Daniels
parent eddc48d284
commit 4b80637481
6 changed files with 26 additions and 24 deletions

View File

@ -42,7 +42,7 @@ export default function Callout(props: {
return (
<div
class={clsx(
"my-8 flex flex-col rounded-3xl p-6",
"my-8 flex flex-col w-full rounded-3xl p-6",
styles[props.type || "note"].container,
{ "cursor-pointer": props.collapsible },
)}

View File

@ -111,7 +111,7 @@ export function PrevNextLinks() {
if (getNeighboringLinks().length === 0) return null;
return (
<dl class="mt-12 flex gap-4 border-t border-slate-200 pt-6">
<dl class="mt-12 mx-4 lg:mr-0 flex gap-4 border-t border-slate-200 pt-6">
{getNeighboringLinks()[0] && (
<PageLink
dir="previous"

View File

@ -72,6 +72,8 @@ export function SmoothScroll(props: SmoothScrollProps) {
const handleWheel = (event: WheelEvent) => {
if (isMobile()) return;
if (event.ctrlKey) return;
if (event.metaKey) return;
const hoveredElement = document.elementFromPoint(
event.clientX,

View File

@ -131,25 +131,25 @@ export function Snippet(props: SnippetProps) {
</div>
</nav>
{selectedTab() && (
<div class="mt-6">
{selectedTab().code && (
<For each={props.snippets}>
{(tab) => (
<div class={clsx("mt-6", isActive(tab) ? "block" : "hidden")}>
{tab.code && (
<Highlight
class={clsx(
"!pt-0 !px-1 max-h-96 overflow-auto mb-2",
props.dark && "dark text-white",
)}
language={(selectedTab() as SnippetTab).codeLanguage}
withLineNumbers={(selectedTab() as SnippetTab).withLineNumbers}
language={tab.codeLanguage}
withLineNumbers={tab.withLineNumbers}
>
{(selectedTab() as SnippetTab).code}
{tab.code}
</Highlight>
)}
{!selectedTab().code && (
<div class="pb-1">{(selectedTab() as CommonTab).children}</div>
)}
{!tab.code && <div class="pb-1">{tab.children}</div>}
</div>
)}
</For>
</div>
</div>
);

View File

@ -25,7 +25,7 @@ export function DocsLayout(props: DocsLayoutProps) {
<div class="flex">
<main
id="article-content"
class="max-w-2xl min-w-0 flex-auto px-4 py-16 lg:max-w-none lg:pr-0 lg:pl-8 xl:px-16 grow"
class="max-w-2xl lg:max-w-none w-10 min-w-0 flex-auto px-4 py-16 lg:pr-0 lg:pl-8 xl:px-16 grow"
>
<article>
<DocsHeader
@ -34,12 +34,12 @@ export function DocsLayout(props: DocsLayoutProps) {
/>
<Prose>{props.children}</Prose>
</article>
<PrevNextLinks />
</main>
<TableOfContents />
</div>
<PrevNextLinks />
<LatestDocs />
</>
);

View File

@ -8,7 +8,7 @@ export function LatestDocs() {
const data = useData<Data>();
return (
<section class="bg-violet-200 rounded-md p-4 m-4 lg:m-6">
<section class="bg-violet-200 rounded-md p-4 m-4 lg:mr-0">
<h2 class="font-display text-3xl tracking-tight text-slate-900 text-center">
Dernières documentations
</h2>