Skip to content

Commit

Permalink
Merge branch 'refactor' of github.com:morganstanley/cpx-training into…
Browse files Browse the repository at this point in the history
… refactor
  • Loading branch information
mimiflynn committed Nov 9, 2023
2 parents 8b9b6c3 + 7652dba commit 6958158
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 80 deletions.
36 changes: 36 additions & 0 deletions site/content/exercises/circuitpython/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
order: 1
title: CircuitPython
---

<Hero
title="Maker Magic"
subtitle="Design Your Own Blueprint for Community Tech Empowerment"
image="../../images/learning.jpg"
/>
<article className="content">
<img
src="../../images/circuitpython/mu.png"
alt="Mu Blink"
className="makecode"
/>
<h2>Introduction to CircuitPython - Level 1</h2>
This is the original single day workshop with Circuit Playground
Express and CircuitPython. Includes an overview of the board's
sensors and lights through code. Allows students to dig into an
aspect of the device they enjoy for an afternoon of exploration.

<Link to={`/exercises/circuitpython/level-1/`}>
Go to exercises
</Link>

<h2>Programming with CircuitPython - Level 2</h2>
This course builds on the original single day workshop with Circuit
Playground Express and CircuitPython to fill out the student's
understanding of basic programming concepts.

<Link to={`/exercises/circuitpython/level-2/`}>
Go to exercises
</Link>

</article>
2 changes: 1 addition & 1 deletion site/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ exports.createPages = async ({ graphql, actions }) => {

function getTemplate(category) {
return category
? category.includes('exercise')
? category.includes('exercises')
? exerciseTemplate
: pageTemplate
: pageTemplate;
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import SummaryCard from './summary-card';

const shortcodes = { Hero, Link, SummaryCard };

function Layout({ location, title, children }) {
function Layout({ location, children }) {
return (
<div className="main">
<header className="header-main">
Expand Down
74 changes: 0 additions & 74 deletions site/src/pages/exercises/circuitpython/index.js

This file was deleted.

4 changes: 2 additions & 2 deletions site/src/pages/exercises/circuitpython/level-1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Seo from '../../../../components/seo';
import '../../../../styles/global.css';
import '../../../../styles/style.css';

const BlogIndex = ({ data, location }) => {
const CPXLevel1Index = ({ data, location }) => {
const siteTitle = data.site.siteMetadata.title;
const exercises = data.allMdx.nodes;

Expand Down Expand Up @@ -74,7 +74,7 @@ const BlogIndex = ({ data, location }) => {
);
};

export default BlogIndex;
export default CPXLevel1Index;

export const pageQuery = graphql`
query {
Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/exercises/circuitpython/level-2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Seo from '../../../../components/seo';
import '../../../../styles/global.css';
import '../../../../styles/style.css';

const BlogIndex = ({ data, location }) => {
const BlogICPXLevel2Indexndex = ({ data, location }) => {
const siteTitle = data.site.siteMetadata.title;
const exercises = data.allMdx.nodes;

Expand Down Expand Up @@ -70,7 +70,7 @@ const BlogIndex = ({ data, location }) => {
);
};

export default BlogIndex;
export default BlogICPXLevel2Indexndex;

export const pageQuery = graphql`
query {
Expand Down

0 comments on commit 6958158

Please sign in to comment.