Skip to content
Merged
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
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ home = ["HTML", "RSS", "JSON"]

[params]
themeVariant = "mcpt"
custom_js_urls = ['//toolness.github.io/p5.js-widget/p5-widget.js']
custom_js_urls = ['/js/p5.min.js', '/js/p5.sound.min.js']

[markup.goldmark.renderer]
unsafe = true
8 changes: 6 additions & 2 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ title = "Home"
---
The learning branch is here to help you through the ICS curriculum while also expanding your world of coding knowledge in an interactive, informative, and (most importantly) fun way!

{{% notice info "Next Event: Game Series - Part I" %}}
Join us this **Thursday 11th** at **4:15pm** for our **Game Dev** series, as you’ll build your very own tower defense game! Get ready for an hour of interactive learning suited for all skill levels, preparing you for our keynote Game Jam during the Winter Break!
{{% /notice %}}

### Jump To:
* [Game Series](game-dev)
* [Game Jam](game-jam)
* [LyonHacks](lyonhacks)
* [Mentorship](mentorship)
* [LyonHacks](lyon-hacks)
* [Mentorship](mentorship)
2 changes: 1 addition & 1 deletion content/game-dev/part-ii/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ weight = 2
### Game Series
# Part II

{{% notice info "Coming to WLMAC on November 25th, 2021!" %}}
{{% notice info "Coming to WLMAC on December 2nd, 2021!" %}}
*Premiere, Interactive, Tower-Defense Game Workshop for Programmers of All Levels...*
{{% /notice %}}

Expand Down
2 changes: 1 addition & 1 deletion content/game-dev/part-iii/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ weight = 3
### Game Series
# Part III

{{% notice info "Coming to WLMAC on December 10th, 2021!" %}}
{{% notice info "Coming to WLMAC on December 16th, 2021!" %}}
*Premiere, Interactive, Tower-Defense Game Workshop for Programmers of All Levels...*
{{% /notice %}}

Expand Down
26 changes: 24 additions & 2 deletions layouts/shortcodes/p5js.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
<!--{{/* {{< p5js >}}p5js code{{< /p5js }}*/}}-->
<script type="text/p5" data-autoplay>{{ .Inner | safeJS }}</script>
{{$id := "unset"}}
{{with .Get "id"}}
{{$id = .}}
{{else}}
{{$id = printf "%s%d" (delimit (shuffle (seq 1 9)) "") now.UnixNano}}
{{end}}

<div class="p5js-container" id="p5js-{{$id}}" title="p5.js widget">
<div class="p5js-canvas" id="p5js-{{$id}}-canvas"></div>
<script style="display: none;">
function sketch{{$id|safeJS}}(p) {
console.log('running sketch {{$id}}');
with (p) {
eval({{.Inner}});
{{$ids := slice "setup" "draw" "preload" "mousePressed" "mouseReleased" "mouseClicked" "mouseMoved" "mouseDragged" "mouseOver" "mouseOut" "keyPressed" "keyTyped" "keyReleased"}}
{{/* NOTE: this is not future-proof because there may be more event functions (eg setup) added later */}}
{{range $ids}}
if (typeof {{.|safeJS}} !== 'undefined') p.{{.|safeJS}} = {{.|safeJS}};
{{end}}
}
}
new p5(sketch{{$id|safeJS}}, 'p5js-{{$id}}-canvas');
</script>
</div>
3 changes: 3 additions & 0 deletions static/js/p5.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions static/js/p5.sound.min.js

Large diffs are not rendered by default.