Skip to content

Commit 5050dcf

Browse files
committed
Add proof of concept Codewars workshops
Tony has been developing these, here's a proof of concept for embedding them into the curriculum. Long-term we may want a custom generator that does closer integration into the static site generator, but for now iframing things in works fine.
1 parent 2cba88b commit 5050dcf

File tree

8 files changed

+44
-7
lines changed

8 files changed

+44
-7
lines changed

common-theme/assets/styles/04-components/block.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,9 @@
7979
color: var(--theme-color--pop);
8080
}
8181
}
82+
83+
&--codewars-workshop iframe {
84+
width: 100%;
85+
height: 90vh;
86+
}
8287
}

common-theme/layouts/partials/block/block.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
{{ partial "block/slide.html" . }}
2121
{{ else if eq $blockData.type "link" }}
2222
{{ partial "block/link.html" . }}
23+
{{ else if eq $blockData.type "codewars-workshop" }}
24+
{{ partial "block/codewars-workshop.html" . }}
2325
{{ else }}
2426
{{ errorf "Unrecognized block type %s" $blockData.type }}
2527
{{ end }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{ $blockData := .Page.Scratch.Get "blockData" }}
2+
3+
<section
4+
class="c-block c-block--{{ $blockData.type }}"
5+
aria-labelledby="{{ $blockData.name | urlize }}">
6+
<header class="c-block__header">
7+
<h2 class="c-block__title e-heading__2" id="{{ $blockData.name | urlize }}">
8+
<a href="{{ $blockData.sot }}">🔗 {{ $blockData.name }}</a>
9+
</h2>
10+
11+
{{ partial "time.html" . }}
12+
</header>
13+
14+
<p>In groups, we will work through this Codewars problem. Split into groups, one per volunteer.</p>
15+
16+
<p>Remember: Our goals are to: Understand the problem and make a plan to solve it. These are more important steps than actually writing the code (though we should do that too, after we have a plan).</p>
17+
18+
<iframe src="{{ $blockData.sot }}"></iframe>
19+
</section>

common-theme/layouts/partials/block/data.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@
6464
{{/* TODO pull time from commented out front matter in Github readmes */}}
6565
{{ end }}
6666

67+
{{ if "codewars-workshops." | in $src }}
68+
{{ .Scratch.SetInMap "blockData" "type" "codewars-workshop" }}
69+
{{ end }}
70+
6771
{{/* TODO get rid of the old way of bringing in cyf pd and remove hardcoded CYF stuff here */}}
6872
{{ if or ("cyf-pd.netlify.app" | in $src) ("/pd/"| in $src) }}
6973
{{ .Scratch.SetInMap "blockData" "type" "pd" }}

org-cyf-itp/content/structuring-data/sprints/1/day-plan/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ time=10
1212
name="Energiser: Popcorn"
1313
src="energisers/popcorn-screen-share"
1414
[[blocks]]
15-
name="Javascript Test Your Understanding"
16-
src="https://github.com/CodeYourFuture/CYF-Workshops/tree/main/js1-wk1-eval"
15+
name="Problem Solving Workshop"
16+
src="https://codewars-workshops.codeyourfuture.io/problem-01/"
1717
time=65
1818
[[blocks]]
1919
name="Morning break"

org-cyf-itp/content/structuring-data/sprints/2/day-plan/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ name="Morning orientation"
1313
src="blocks/morning-orientation"
1414
time=15
1515
[[blocks]]
16-
name="Questions and Review Workshop"
17-
src="https://github.com/CodeYourFuture/CYF-Workshops/tree/main/questions-and-reviews"
16+
name="Problem Solving Workshop"
17+
src="https://codewars-workshops.codeyourfuture.io/problem-02/"
1818
time=60
1919
[[blocks]]
2020
name="Morning break"

org-cyf-itp/content/structuring-data/sprints/3/day-plan/index.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ time=20
1515
[[blocks]]
1616
name="Workshop:Playing Computer"
1717
src="https://github.com/CodeYourFuture/CYF-Workshops/tree/main/playing-computer"
18-
time=140
18+
time=65
19+
[[blocks]]
20+
name="Morning break"
21+
src="blocks/morning-break"
22+
[[blocks]]
23+
name="Problem Solving Workshop"
24+
src="https://codewars-workshops.codeyourfuture.io/problem-03/"
25+
time=60
1926
[[blocks]]
2027
name="lunch"
2128
src="blocks/lunch"

org-cyf-itp/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ go 1.24.5
44

55
require (
66
github.com/CodeYourFuture/CYF-PD v1.0.1-0.20240905150045-7be086ff6886 // indirect
7-
github.com/CodeYourFuture/curriculum/common-content v0.0.0-20241022142707-ee3974f18eb2 // indirect
8-
github.com/CodeYourFuture/curriculum/common-theme v0.0.0-20241022142707-ee3974f18eb2 // indirect
7+
github.com/CodeYourFuture/curriculum/common-content v0.0.0-20250801130816-705636729ea4 // indirect
8+
github.com/CodeYourFuture/curriculum/common-theme v0.0.0-20250801130816-705636729ea4 // indirect
99
github.com/CodeYourFuture/curriculum/org-cyf-guides v0.0.0-20241022142707-ee3974f18eb2 // indirect
1010
github.com/CodeYourFuture/curriculum/org-cyf-how-this-works v0.0.0-20241022142707-ee3974f18eb2 // indirect
1111
github.com/CodeYourFuture/curriculum/org-cyf-piscine v0.0.0-20241022142707-ee3974f18eb2 // indirect

0 commit comments

Comments
 (0)