diff --git a/public/getting-started/forking-and-cloning/cloning.webm b/public/getting-started/forking-and-cloning/cloning.webm new file mode 100644 index 0000000..b95b2b2 Binary files /dev/null and b/public/getting-started/forking-and-cloning/cloning.webm differ diff --git a/public/getting-started/forking-and-cloning/forking.webm b/public/getting-started/forking-and-cloning/forking.webm new file mode 100644 index 0000000..001e5ed Binary files /dev/null and b/public/getting-started/forking-and-cloning/forking.webm differ diff --git a/src/components/ContentFigure.astro b/src/components/ContentFigure.astro index b6ace2f..ecee7a8 100644 --- a/src/components/ContentFigure.astro +++ b/src/components/ContentFigure.astro @@ -78,6 +78,11 @@ function isYouTubeUrl(source: string | ImageMetadata): boolean { return source.includes('youtube.com') || source.includes('youtu.be'); } +// Check if src is a local/remote video file URL +function isVideoFile(url: string): boolean { + return /\.(webm|mp4|ogg)(\?|#|$)/i.test(url); +} + // Extract video ID from YouTube URL function extractVideoId(videoUrl: string): string { // YouTube watch URL @@ -120,13 +125,14 @@ function getOptimizedImage(srcPath: string): ImageMetadata | null { return null; } -const isVideo = isYouTubeUrl(src); -const videoId = isVideo && typeof src === 'string' ? extractVideoId(src) : ''; -const embedUrl = isVideo ? `https://www.youtube.com/embed/${videoId}?rel=0&controls=1&showinfo=0&vq=hd1080` : ''; +const isYouTubeVideo = isYouTubeUrl(src); +const isLocalVideo = !isYouTubeVideo && isVideoFile(src); +const videoId = isYouTubeVideo ? extractVideoId(src) : ''; +const embedUrl = isYouTubeVideo ? `https://www.youtube.com/embed/${videoId}?rel=0&controls=1&showinfo=0&vq=hd1080` : ''; // Determine the image source - either already ImageMetadata, or resolve from string path let optimizedImage: ImageMetadata | null = null; -if (!isVideo) { +if (!isYouTubeVideo && !isLocalVideo) { if (isImageMetadata) { // Already an ImageMetadata object from glob import optimizedImage = src as ImageMetadata; @@ -140,7 +146,7 @@ const hasCaption = Astro.slots.has('default'); ---
- {isVideo ? ( + {isYouTubeVideo ? (
+ ) : isLocalVideo ? ( +
+ +
) : (
{optimizedImage ? ( @@ -215,6 +235,19 @@ const hasCaption = Astro.slots.has('default'); border: none; } + .content-figure-video video { + position: absolute; + top: 0; + left: 0; + width: 100% !important; + height: 100% !important; + max-width: none !important; + max-height: none !important; + display: block; + object-fit: contain; + object-position: center; + } + /* Caption styles - matches Slides component */ .content-figure-caption { font-family: 'Inter', system-ui, sans-serif; diff --git a/src/config/sidebarConfig.ts b/src/config/sidebarConfig.ts index 80d8480..9642d0b 100644 --- a/src/config/sidebarConfig.ts +++ b/src/config/sidebarConfig.ts @@ -52,16 +52,29 @@ export const sidebarSections: Record = { }, ], - // Resources section (content lives at /resources but navbar says "Other Resources") - '/resources': [ + // Getting Started section + '/getting-started': [ { - label: 'Resources', + label: 'Getting Started', items: [ - { label: 'Overview', slug: 'resources' }, - { label: 'Glossary', slug: 'resources/glossary' }, + { label: 'Intro to Programmming', slug: 'getting-started/intro-to-prog' }, + { label: 'Required Tools', slug: 'getting-started/required-tools' }, + { label: 'VS Code Overview', slug: 'getting-started/vscode-overview' }, + { label: 'Forking and Cloning', slug: 'getting-started/forking-and-cloning' }, ], }, ], + + // Resources section (content lives at /resources but navbar says "Other Resources") + // '/resources': [ + // { + // label: 'Resources', + // items: [ + // { label: 'Overview', slug: 'resources' }, + // { label: 'Glossary', slug: 'resources/glossary' }, + // ], + // }, + // ], }; /** diff --git a/src/content/docs/contribution/contributors.mdx b/src/content/docs/contribution/contributors.mdx index 4d65d6f..4d04e07 100644 --- a/src/content/docs/contribution/contributors.mdx +++ b/src/content/docs/contribution/contributors.mdx @@ -1,6 +1,8 @@ --- title: Website Contributors description: Contributor information for FRCSoftware.org +prev: contribution/styleguide +next: contribution/roadmap --- import Aside from '../../../components/Aside.astro'; diff --git a/src/content/docs/contribution/methodsOfContributing.mdx b/src/content/docs/contribution/methodsOfContributing.mdx index a538b4e..0d3b33d 100644 --- a/src/content/docs/contribution/methodsOfContributing.mdx +++ b/src/content/docs/contribution/methodsOfContributing.mdx @@ -1,6 +1,8 @@ --- title: Methods of Contributing description: A guide to publicly contributing to the website, including setting up an IDE and local preview for editing. +prev: false +next: /contribution/styleguide --- import Aside from '../../../components/Aside.astro'; diff --git a/src/content/docs/contribution/roadmap.mdx b/src/content/docs/contribution/roadmap.mdx index 98cb63f..74a8e21 100644 --- a/src/content/docs/contribution/roadmap.mdx +++ b/src/content/docs/contribution/roadmap.mdx @@ -1,6 +1,8 @@ --- title: Website Roadmap description: Roadmap information for FRCSoftware.org +prev: contribution/contributors +next: false --- ## Roadmap diff --git a/src/content/docs/contribution/styleguide.mdx b/src/content/docs/contribution/styleguide.mdx index 499da21..f676258 100644 --- a/src/content/docs/contribution/styleguide.mdx +++ b/src/content/docs/contribution/styleguide.mdx @@ -1,6 +1,8 @@ --- title: Contribution Style Guide description: The style guide for contribution according to the goals of the website. +prev: contribution/methodsofcontributing +next: contribution/contributors --- import Aside from '../../../components/Aside.astro'; diff --git a/src/content/docs/getting-started/forking-and-cloning.mdx b/src/content/docs/getting-started/forking-and-cloning.mdx new file mode 100644 index 0000000..1d0c3a1 --- /dev/null +++ b/src/content/docs/getting-started/forking-and-cloning.mdx @@ -0,0 +1,18 @@ +--- +title: Forking and Cloning +description: A guide to forking and cloning a GitHub repository for your work +prev: getting-started/vscode-overview +next: false +--- + +import ContentFigure from '../../../components/ContentFigure.astro'; + +## Forking +Before beginning, it's necessary to create your own fork of the exercises repository. Before doing so, you need to have followed the instructions in the "Required Tools" section. To do so, go to the [exercises repository](https://github.com/frcsoftware/exercises) and click the "Fork" button in the top right corner. This will create a copy of the repository under your own GitHub account, allowing you to make changes without affecting the original repository. + + + +## Cloning +To clone the repository you just created, open VS Code. Then, copy the URL of the repository you just forked. In VS Code, open the version control sidebar (top left), and select "Clone Repository". Paste the URL of your forked repository and select a local directory where you want it to be located. This will create a local copy of the repository on your machine, allowing you to work on the exercises. + + \ No newline at end of file diff --git a/src/content/docs/getting-started/intro-to-prog.mdx b/src/content/docs/getting-started/intro-to-prog.mdx new file mode 100644 index 0000000..9999245 --- /dev/null +++ b/src/content/docs/getting-started/intro-to-prog.mdx @@ -0,0 +1,8 @@ +--- +title: Intro to Programming +description: Coming soon! +prev: false +next: getting-started/required-tools +--- + +Coming soon! diff --git a/src/content/docs/getting-started/required-tools.mdx b/src/content/docs/getting-started/required-tools.mdx new file mode 100644 index 0000000..c41b099 --- /dev/null +++ b/src/content/docs/getting-started/required-tools.mdx @@ -0,0 +1,23 @@ +--- +title: Required Tools for Development +description: Installing all the necessary software for completing this course and programming in FRC +prev: getting-started/intro-to-prog +next: false +--- + +## WPILib tools + +The first tool that needs to be installed is the WPILib tool package. To do so, follow the +instructions linked [here](https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/wpilib-setup.html). + +If you intend to control a physical robot, you may also need to install the game tools. Instructions can be found [here](https://docs.wpilib.org/en/stable/docs/zero-to-robot/step-2/frc-game-tools.html), +but this is not necessary at this point in time. + +## git + +Git can be installed using the instructions located [here](https://git-scm.com/install/). + +## Creating a GitHub account + +For many of the lessons on this website, it will be necessary to have a GitHub account. One can be can be created [here](https://github.com/signup). +It's also recommended to sign up for the [GitHub student developer pack](https://education.github.com/pack), this will give you access to a variety of resources. \ No newline at end of file diff --git a/src/content/docs/getting-started/vscode-overview.mdx b/src/content/docs/getting-started/vscode-overview.mdx new file mode 100644 index 0000000..74fc737 --- /dev/null +++ b/src/content/docs/getting-started/vscode-overview.mdx @@ -0,0 +1,8 @@ +--- +title: VS Code Overview +description: Coming soon! +prev: getting-started/required-tools +next: getting-started/forking-and-cloning +--- + +Coming soon! diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index c57c3b6..97f97a0 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -10,7 +10,7 @@ hero: html: 'FRCSoftware.org logo' actions: - text: Start Learning - link: /learning-course/ + link: /getting-started/intro-to-prog --- @@ -29,4 +29,10 @@ import HomeCard from '../../components/HomeCard.astro'; icon="wrench" description="Help contribute! Since FRCSoftware.org is in such an early stage right now, we are in need of contributors." /> +
diff --git a/src/content/docs/resources/glossary.mdx b/src/content/docs/resources/glossary.mdx index d6eef3f..3dce7b8 100644 --- a/src/content/docs/resources/glossary.mdx +++ b/src/content/docs/resources/glossary.mdx @@ -37,3 +37,6 @@ We know it can be hard learning each and every term thrown around in FRC program **Magnetic Encoder** : An encoder that uses magnetic fields to measure position or motion. + +**Repository** +: A storage location for software packages, often used in version control systems like Git. Repositories are just folders that contain files and subfolders, and they can be hosted on platforms like GitHub to facilitate collaboration and version tracking. \ No newline at end of file diff --git a/src/starlightOverrides/Header.astro b/src/starlightOverrides/Header.astro index 0bd9e68..e9f54b2 100644 --- a/src/starlightOverrides/Header.astro +++ b/src/starlightOverrides/Header.astro @@ -10,14 +10,15 @@ const props = Astro.props; const navLinks = [ { href: "/", label: "Home" }, -// { href: "/feature-guide/", label: "Website Feature Guide" }, + { href: "/feature-guide/", label: "Website Feature Guide" }, + { href: "/getting-started/intro-to-prog/", label: "Getting Started" }, // { href: "/learning-course/", label: "Learning Course" }, // { href: "/educators-guide/introduction/", label: "Educator's Guide" }, // { href: "/design-handbook/", label: "Design Handbook" }, // { href: "/mechanism-examples/", label: "Mechanism Examples" }, // { href: "/best-practices/", label: "Best Practices" }, // { href: "/resources/", label: "Other Resources" }, -// { href: "/contribution/methodsofcontributing/", label: "Contribution" }, + { href: "/contribution/methodsofcontributing/", label: "Contribution" }, ]; const currentPath = Astro.url.pathname; diff --git a/src/starlightOverrides/Hero.astro b/src/starlightOverrides/Hero.astro index ecea9e2..c3e3f78 100644 --- a/src/starlightOverrides/Hero.astro +++ b/src/starlightOverrides/Hero.astro @@ -29,11 +29,6 @@ if (image) { } } -// Check if this is the home page (splash template) -const isHomePage = data.template === 'splash'; - -// Kickoff 2026: January 10th, 2026 at 1:30 PM ET = January 10th, 2026 at 18:30 UTC -const kickoffDate = "2026-01-10T18:30:00Z"; ---
@@ -70,154 +65,7 @@ const kickoffDate = "2026-01-10T18:30:00Z";
-{isHomePage && ( -
-
-
Kickoff 2026
-
-
- -- - Days -
-
:
-
- -- - Hours -
-
:
-
- -- - Min -
-
:
-
- -- - Sec -
-
- -
-
-)} - - - diff --git a/src/styles/global.css b/src/styles/global.css index 38b9f0a..3997005 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -93,8 +93,8 @@ text-align: center; } -.sl-markdown-content figure img, -.sl-markdown-content figure video { +.sl-markdown-content figure:not(.content-figure) img, +.sl-markdown-content figure:not(.content-figure) video { max-width: 100%; max-height: 50vh; width: auto !important;