Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/website-feature-guide/slide1.png

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/website-feature-guide/slide2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
167 changes: 167 additions & 0 deletions src/components/CourseSection.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
---
import ContentFigure from './ContentFigure.astro';

interface Props {
title: string;
href: string;
image?: string;
imageAlt?: string;
imageSide?: 'left' | 'right';
underConstruction?: boolean;
}

const {
title,
href,
image,
imageAlt = title,
imageSide = 'right',
underConstruction = false,
} = Astro.props;

const hasImage = Boolean(image);
---

<section
class:list={[
'course-section',
hasImage && `image-${imageSide}`,
!hasImage && 'no-image',
]}
>
{
hasImage && imageSide === 'left' && (
<div class="course-section-image">
<ContentFigure src={image!} alt={imageAlt} />
</div>
)
}

<div class="course-section-content">
<h3 class="course-section-title">
<a href={href}>{title}</a>
{
underConstruction && (
<span class="under-construction">
{' '}
(Under Construction)
</span>
)
}
</h3>
<ul class="course-section-list">
<slot />
</ul>
</div>

{
hasImage && imageSide === 'right' && (
<div class="course-section-image">
<ContentFigure src={image!} alt={imageAlt} />
</div>
)
}
</section>

<style>
.course-section {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(10rem, 17.5rem);
gap: 2rem;
align-items: center;
margin: 1.5rem 0;
padding-top: 1.5rem;
border-top: 1px solid var(--sl-color-gray-5);
}

.course-section.image-left {
grid-template-columns: minmax(10rem, 17.5rem) minmax(0, 1fr);
}

.course-section.no-image {
display: block;
}

.course-section-content {
max-width: 34rem;
}

.course-section.image-left .course-section-content {
justify-self: end;
text-align: right;
}

.course-section.no-image .course-section-content {
max-width: 42rem;
}

.course-section-image {
width: min(100%, 17.5rem);
}

.course-section.image-right .course-section-image {
justify-self: end;
}

.course-section-title {
margin-top: 0;
margin-bottom: 0.75rem;
color: var(--accent-color, #43a047);
}

.course-section-title a {
color: var(--accent-color, #43a047);
text-decoration: none;
}

.course-section-title a:hover {
text-decoration: underline;
}

.under-construction {
color: var(--accent-color, #43a047);
font-weight: normal;
}

.course-section-list {
margin: 0;
padding-left: 1.25rem;
}

.course-section.image-left .course-section-list {
direction: rtl;
list-style-position: outside;
padding-right: 1.25rem;
padding-left: 0;
}

.course-section-list :global(li) {
margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
.course-section,
.course-section.image-left {
grid-template-columns: 1fr;
gap: 1rem;
}

.course-section.image-left .course-section-content {
justify-self: auto;
text-align: left;
}

.course-section.image-left .course-section-list {
direction: ltr;
padding-right: 0;
padding-left: 1.25rem;
}

.course-section-image,
.course-section.image-right .course-section-image {
justify-self: auto;
order: -1;
width: min(100%, 17.5rem);
}
}
</style>
153 changes: 152 additions & 1 deletion src/config/sidebarConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,153 @@ export const sidebarSections: Record<string, SidebarSection[]> = {
},
],

// Learning Course section
'/learning-course': [
{
label: 'Learning Course',
items: [
{ label: 'Overview', slug: 'learning-course' },
{
label: 'Feature Guide',
slug: 'learning-course/getting-started/website-feature-guide',
},
{
label: 'Course Setup',
collapsed: true,
items: [
{
label: 'Required Tools',
slug: 'learning-course/getting-started/required-tools',
},
{
label: 'VSCode Overview',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
label: 'VSCode Overview',
label: 'VS Code Overview',

slug: 'learning-course/getting-started/vscode-overview',
},
{
label: 'Forking and Cloning',
slug: 'learning-course/getting-started/forking-and-cloning',
}, // no work
],
},
{
label: 'Stage 0',
collapsed: true,
items: [
{
label: 'Stage 0 Introduction',
slug: 'learning-course/intro-to-java/stage-overview',
},
{
label: 'Intro To Java',
collapsed: true,
items: [
{
label: 'Java Fundamentals',
slug: 'learning-course/intro-to-java/java-fundamentals',
},
{
label: 'Operators',
slug: 'learning-course/intro-to-java/operators',
},
{
label: 'Conditionals',
slug: 'learning-course/intro-to-java/conditionals',
},
{
label: 'Loops',
slug: 'learning-course/intro-to-java/loops',
},
{
label: 'Objects',
slug: 'learning-course/intro-to-java/objects',
},
{
label: 'Methods',
slug: 'learning-course/intro-to-java/methods',
},
],
},
],
},
{
label: 'Stage 1',
collapsed: true,
items: [
{
label: 'Stage 1 Introduction',
slug: 'learning-course/stage-1a-commands/overview',
},
{
label: '1A',
collapsed: true,
items: [
{
label: 'TBD',
slug: 'stage-1a-commands/command-based-overview',
},
{
label: 'TBD',
slug: 'stage-1a-commands/the-command-body',
},
{
label: 'TBD',
slug: 'stage-1a-commands/commands-and-mechanisms',
},
],
},
{
label: 'Stage 1B: Commands',
collapsed: true,
items: [
{
label: 'Stage 1B Introduction',
slug: 'learning-course/stage1b/overview',
},
{
label: '1B',
collapsed: true,
items: [
{
label: 'The Concepts',
slug: 'stage-1b-commands/command-based-overview',
},
{
label: 'The Body of a Command',
slug: 'stage-1b-commands/the-command-body',
},
{
label: 'Commands & Mechanisms, Pt. 1',
slug: 'stage-1b-commands/commands-and-mechanisms',
},
{
label: 'Triggers and Scheduling',
slug: 'stage-1b-commands/triggers',
},
{
label: 'Commands & Mechanisms, Pt. 2',
slug: 'stage-1b-commands/commands-and-mechanisms-pt2',
},
{
label: 'Exercise - Kitbot Rewrite, Pt. 1',
slug: 'stage-1b-commands/command-based-kitbot',
},
{
label: 'Suppliers in Command-Based',
slug: 'stage-1b-commands/suppliers-in-command-based',
},
{
label: 'Exercise - Kitbot Rewrite, Pt. 2',
slug: 'stage-1b-commands/command-based-kitbot-pt2',
},
],
},
],
},
],
},
],
},
],
// Educator's Guide section
'/educators-guide': [
{
Expand Down Expand Up @@ -94,7 +241,11 @@ export const sidebarSections: Record<string, SidebarSection[]> = {
label: 'Getting Started',
items: [
{
label: 'Intro to Programmming',
label: 'Website Feature Guide',
slug: 'getting-started/website-feature-guide',
},
{
label: 'Intro to Programming',
slug: 'getting-started/intro-to-prog',
},
{
Expand Down
Binary file removed src/content/docs/feature-guide/img/slide1.webp
Binary file not shown.
Binary file removed src/content/docs/feature-guide/img/slide2.webp
Binary file not shown.
8 changes: 0 additions & 8 deletions src/content/docs/getting-started/intro-to-prog.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ hero:
html: '<img src="/favicon.svg" alt="FRCSoftware.org logo" />'
actions:
- text: Start Learning
link: /getting-started/intro-to-prog
link: /learning-course/
---

import HomeCard from '../../components/HomeCard.astro';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ prev: getting-started/vscode-overview
next: false
---

import ContentFigure from '../../../components/ContentFigure.astro';
import ContentFigure from '../../../../components/ContentFigure.astro';

## Forking

Expand Down
Loading
Loading