diff --git a/lint-staged.config.mjs b/lint-staged.config.mjs index 1b56c8b9..28dbf75f 100644 --- a/lint-staged.config.mjs +++ b/lint-staged.config.mjs @@ -1,3 +1,5 @@ +import process from 'node:process'; + /** @type {import('lint-staged').Configuration} */ export default { '**/*': (files) => `prettier --write --ignore-unknown ${files.join(' ')}`, @@ -6,7 +8,7 @@ export default { `pnpm remark ${files.join(' ')} --ext mdx --frail --no-stdout --quiet`, ], 'examples/**/*.{java,gradle}': () => [ - `./examples/gradlew -p examples spotlessApply`, + `./examples/gradlew${process.platform === 'win32' ? '.bat' : ''} -p examples spotlessApply`, ], 'src/data/glossary.ts': () => [ 'pnpm generate:glossary', diff --git a/public/hardware-intro/spark-max-motor-controller.webp b/public/hardware-intro/spark-max-motor-controller.webp new file mode 100644 index 00000000..339a8ec4 Binary files /dev/null and b/public/hardware-intro/spark-max-motor-controller.webp differ diff --git a/public/hardware-intro/talonfx-motor-controller.webp b/public/hardware-intro/talonfx-motor-controller.webp new file mode 100644 index 00000000..8329aa86 Binary files /dev/null and b/public/hardware-intro/talonfx-motor-controller.webp differ diff --git a/src/components/ContentCard.astro b/src/components/ContentCard.astro new file mode 100644 index 00000000..182308c0 --- /dev/null +++ b/src/components/ContentCard.astro @@ -0,0 +1,83 @@ +--- +import type { HTMLAttributes } from 'astro/types'; + +interface Props extends Omit, 'title'> { + title: string; + description?: string; + eyebrow?: string; + href: string; +} + +const { title, description, eyebrow, href, ...attributes } = Astro.props; +--- + + + {eyebrow &&

{eyebrow}

} +

{title}

+ {description &&

{description}

} + + +
+ + diff --git a/src/components/ContentTitleBar.astro b/src/components/ContentTitleBar.astro new file mode 100644 index 00000000..21cc1909 --- /dev/null +++ b/src/components/ContentTitleBar.astro @@ -0,0 +1,48 @@ +--- +interface Props { + label?: string; + title: string; + description?: string; +} + +const { label, title, description } = Astro.props; +--- + +
+ {label &&

{label}

} +

{title}

+ {description &&

{description}

} +
+ + diff --git a/src/config/sidebarConfig.ts b/src/config/sidebarConfig.ts index 478ac46f..d5f556c4 100644 --- a/src/config/sidebarConfig.ts +++ b/src/config/sidebarConfig.ts @@ -313,9 +313,19 @@ export const sidebarSections: Record = { { label: 'Resources', items: [ - { label: 'Overview', slug: 'resources' }, - { label: 'Glossary', slug: 'resources/glossary' }, - { label: 'Documentation', slug: 'resources/docs' }, + { label: 'Overview', slug: 'resources/overview' }, + { + label: 'Glossary', + slug: 'resources/glossary', + }, + { + label: 'Hardware', + slug: 'resources/hardware-intro', + }, + { + label: 'Documentation', + slug: 'resources/docs', + }, ], }, ], diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 0e308db8..433fa3d9 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -28,6 +28,12 @@ import HomeCard from '../../components/HomeCard.astro'; icon="book" description="A guide for educators implementing the FRCSoftware.org Learning Course." /> + + + + + + + + + diff --git a/src/data/glossary.ts b/src/data/glossary.ts index 7f7f90b5..d8453486 100644 --- a/src/data/glossary.ts +++ b/src/data/glossary.ts @@ -99,6 +99,16 @@ export const glossaryTerms: GlossaryTerm[] = [ definition: 'GitHub is like Google Drive, but for code. It hosts git repositories and allows for improved collaboration on projects through pull requests and issues', }, + { + term: 'Heading', + definition: + 'The direction the robot is pointed, usually expressed as an angle in degrees', + }, + { + term: 'Odometry', + definition: + 'Using sensors on the robot to create an estimate of the pose of the robot on the field.', + }, ]; /** diff --git a/src/starlightOverrides/Header.astro b/src/starlightOverrides/Header.astro index 47496c9b..0fd76d1d 100644 --- a/src/starlightOverrides/Header.astro +++ b/src/starlightOverrides/Header.astro @@ -13,7 +13,7 @@ const navLinks = [ { href: '/learning-course/', label: 'Learning Course' }, { href: '/educators-guide/introduction/', label: "Educator's Guide" }, { href: '/best-practices/overview', label: 'Best Practices' }, - { href: '/resources/docs', label: 'Other Resources' }, // TODO: update to '/resources/overview' after merging pr #104 + { href: '/resources/overview', label: 'Other Resources' }, { href: '/contribution/', label: 'Contribution' }, ];