fix: design tweaks to toasted skin, lint rule tweaks (#44)

This commit is contained in:
Sam Potts
2025-10-09 10:21:18 +11:00
committed by GitHub
parent 5cb93a14a7
commit 3a0767c340
34 changed files with 434 additions and 463 deletions
+5 -10
View File
@@ -37,8 +37,7 @@ export function Selectors({ currentFramework, currentStyle }: SelectorProps) {
const firstGuide = findFirstGuide(newFramework, getDefaultStyle(newFramework));
if (firstGuide) {
navigate(`/docs/framework/${newFramework}/style/${getDefaultStyle(newFramework)}/${firstGuide}/`);
}
else {
} else {
navigate('/docs/');
}
return;
@@ -50,8 +49,7 @@ export function Selectors({ currentFramework, currentStyle }: SelectorProps) {
const firstGuide = findFirstGuide(newFramework, getDefaultStyle(newFramework));
if (firstGuide) {
navigate(`/docs/framework/${newFramework}/style/${getDefaultStyle(newFramework)}/${firstGuide}/`);
}
else {
} else {
navigate('/docs/');
}
return;
@@ -65,8 +63,7 @@ export function Selectors({ currentFramework, currentStyle }: SelectorProps) {
const firstGuide = findFirstGuide(newFramework, getDefaultStyle(newFramework));
if (firstGuide) {
navigate(`/docs/framework/${newFramework}/style/${getDefaultStyle(newFramework)}/${firstGuide}/`);
}
else {
} else {
navigate('/docs/');
}
return;
@@ -93,8 +90,7 @@ export function Selectors({ currentFramework, currentStyle }: SelectorProps) {
const firstGuide = findFirstGuide(currentFramework, newStyle);
if (firstGuide) {
navigate(`/docs/framework/${currentFramework}/style/${newStyle}/${firstGuide}/`);
}
else {
} else {
navigate('/docs/');
}
return;
@@ -108,8 +104,7 @@ export function Selectors({ currentFramework, currentStyle }: SelectorProps) {
const firstGuide = findFirstGuide(currentFramework, newStyle);
if (firstGuide) {
navigate(`/docs/framework/${currentFramework}/style/${newStyle}/${firstGuide}/`);
}
else {
} else {
navigate('/docs/');
}
return;
+1 -2
View File
@@ -31,8 +31,7 @@ async function getGitLastModifiedDate(filePath: string): Promise<Date | null> {
if (!log.latest) return null;
return new Date(log.latest.date);
}
catch {
} catch {
return null;
}
}
+3 -6
View File
@@ -92,8 +92,7 @@ export function findFirstGuide(
// Recursively search section contents
const guide = findFirstGuide(framework, style, item.contents);
if (guide) return guide;
}
else {
} else {
// It's a Guide, return its slug
return item.slug;
}
@@ -118,8 +117,7 @@ export function getAllGuideSlugs(sidebarToExtract: Sidebar = sidebar): string[]
if (isSection(item)) {
// Recursively get slugs from section contents
slugs.push(...getAllGuideSlugs(item.contents));
}
else {
} else {
// It's a Guide, add its slug
slugs.push(item.slug);
}
@@ -144,8 +142,7 @@ export function findGuideBySlug(
// Recursively search section contents
const guide = findGuideBySlug(slug, item.contents);
if (guide) return guide;
}
else if (item.slug === slug) {
} else if (item.slug === slug) {
// Found the guide
return item;
}