Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework tracks grouping/presentation #1170

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion common-docs/content/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title="Help us doc!"
description="This is a [🅷🆄🅶🅾](https://gohugo.io/)-based platform called [🌱common](https://github.com/CodeYourFuture/curriculum/tree/main/common-theme)"
map=["theme", "content", "community"]
menus_to_map=["theme", "content", "community"]
menu=["syllabus"]
+++
7 changes: 5 additions & 2 deletions common-docs/content/common-theme/front-matter/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ src="common-theme/front-matter/blocks/blocks"
name="Emoji"
src="common-theme/front-matter/blocks/emoji"
[[blocks]]
name="Map"
src="common-theme/front-matter/blocks/map"
name="Menu map"
src="common-theme/front-matter/blocks/menu-map"
[[blocks]]
name="Taxonomy map"
src="common-theme/front-matter/blocks/taxonomy-map"
[[blocks]]
name="Menus, menu_level"
src="common-theme/front-matter/blocks/menu"
Expand Down
17 changes: 0 additions & 17 deletions common-docs/content/common-theme/front-matter/blocks/map/index.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
+++
title = 'Menu map'
time = 2
emoji= '🗺️'
[build]
render = 'never'
list = 'local'
publishResources = false
+++

A menu map is an ordered slice of menus. It's to show a "map" view of the syllabus, broken down into grouped modules. As with everything in this design, the point is to clarify what happens and in what order.

It's just for the index page, and the front matter is a list of the menu names that should be included in the map, in the order they should appear.

If you want to attach metadata to each menu item (e.g. to add a description), you probably want a Taxonomy map.

```toml
menus_to_map = ["menuName", "menuName"]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
+++
title = 'Taxonomy map'
time = 2
emoji= '🗺️'
[build]
render = 'never'
list = 'local'
publishResources = false
+++

A taxonomy map is an ordered slice of terms within a taxonomy. It's to show a "map" view of the syllabus, broken down into grouped modules, with extra per-module metadata attached to the term. As with everything in this design, the point is to clarify what happens and in what order.

It's just for the index page, and the front matter is a list of the menu names that should be included in the map, in the order they should appear.

```toml
taxonomy_to_map = "modules"
```
3 changes: 3 additions & 0 deletions common-theme/assets/styles/04-components/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
animation: text-appear cubic-bezier(0.25, 1.375, 0.25, 1) 0.5s forwards;
}
}
&__prereqs {
// TODO: Style this nicely
}
&__cta {
display: flex;
margin: var(--theme-spacing--1) auto;
Expand Down
6 changes: 4 additions & 2 deletions common-theme/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
{{ . }}
</section>
{{ end }}
{{ if .Params.map }}
{{ partial "map.html" . }}
{{ if .Params.menus_to_map }}
{{ partial "menu-map.html" . }}
{{ else if .Params.taxonomy_to_map }}
{{ partial "taxonomy-map.html" . }}
{{ else }}
<ol class="c-timeline c-timeline--card">
{{- range site.Menus.syllabus }}
Expand Down
11 changes: 9 additions & 2 deletions common-theme/layouts/partials/card.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{{ $BaseURL := .Page.Parent.Permalink }}
<a class="c-card" href="{{ relURL .URL }}">
<a class="c-card" href="{{ relURL .Page.RelPermalink }}">
<h3 class="c-card__title">{{ .Name }}</h3>
{{ with .Page.Description }}
<p class="c-card__description">{{ . }}</p>
{{ end }}
{{ if .Page.Params.Prerequisites }}
<ul class="c-card__prereqs">
{{ range .Page.Params.Prerequisites }}
<li class="c-card__prereq">{{ . }}</li>
{{ end }}
</ul>
</p>
{{ end }}
<!-- Display emoji -->
<div class="c-card__image c-emoji">
{{ .Page.Params.emoji | default "🤖" }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ with .Params.map }}
{{ with .Params.menus_to_map }}
<div class="c-map">
<h1 class="e-heading c-map__start is-none--lt-container">👉🏾</h1>
{{ range $i, $currentMapSectionName := . }}
Expand Down
44 changes: 44 additions & 0 deletions common-theme/layouts/partials/taxonomy-map.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<div class="c-map">
<h1 class="e-heading c-map__start is-none--lt-container">👉🏾</h1>
<div style="height: 200px; clear: both;"></div>

{{ $taxonomy_to_map := .Params.taxonomy_to_map }}

{{/* You can't ask for a taxonomy to be sorted by weight, so we need to get weights and iterate ourselves - see https://discourse.gohugo.io/t/list-custom-taxonomy-terms-in-a-specific-order-not-alphabetical/18145/5 */}}
{{ $taxonomy := $.Site.GetPage (printf "/%s" $taxonomy_to_map) }}
{{ range $termPage := $taxonomy.Pages.ByWeight }}
{{ $termName := $termPage.Name }}
{{ $termTitle := $termPage.Params.Title }}
{{ $values := index (index site.Taxonomies $taxonomy_to_map) $termName }}
<section class="c-map__block">
<h2 class="e-heading c-map__title">
{{ $termTitle }}
</h2>
{{ $termPage.Params.Description }}

{{ if $termPage.Params.details}}
<dl>
{{ range $details := $termPage.Params.details}}
<dt>{{ $details.name }}</dt>
<dd>{{ $details.value }}</dd>
{{ end }}
</dl>
{{ end }}
<ol class="c-map__timeline">
{{/* Check if a menu for the current map section exists */}}
{{ if $values }}
{{/* Range over the items in the menu */}}
{{ range $iterator, $value := $values }}
<li
class="c-map__stop"
style="--layer:{{ sub (len $values) (add $iterator 1) }}">
{{ partial "card.html" $value.Page }}
</li>
{{ end }}
{{ else }}
<li>No items found for {{ $termTitle }}</li>
{{ end }}
</ol>
</section>
{{ end }}
</div>
2 changes: 1 addition & 1 deletion org-cyf-guides/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ description = 'A collection of guides, references, resources that do not belong
emoji= '📚'
menu=["syllabus"]
weight=1
map=['volunteers', 'learners', 'everyone']
menus_to_map=['volunteers', 'learners', 'everyone']
+++
2 changes: 1 addition & 1 deletion org-cyf-itd/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
title="Intro to Digital"
description="How to participate in the Intro to Digital programme as a learner or teacher"
menu="main"
map=['start here', 'steps', 'workshops']
menus_to_map=['start here', 'steps', 'workshops']
+++
2 changes: 1 addition & 1 deletion org-cyf-itp/content/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title="Intro to Programming"
map=["start here", "programming", "next steps"]
menus_to_map=["start here", "programming", "next steps"]
description="New? Lost? [Quickstart](how-this-works/prep/#overview)"
emoji= "🧑🏿‍🏫"
+++
2 changes: 1 addition & 1 deletion org-cyf-launch/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ title = 'The Launch'
description = 'Work together in a cross functional Agile team to design, develop, and deliver a unique full stack web application'
layout = 'module'
emoji= '🚀'
map = ['apply', 'develop', 'demo']
menus_to_map = ['apply', 'develop', 'demo']
weight='9'
+++
4 changes: 2 additions & 2 deletions org-cyf-launch/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.22.6
require (
github.com/CodeYourFuture/CYF-PD v1.0.1-0.20240721130916-d70fc853a278 // indirect
github.com/CodeYourFuture/CYF-Projects/micro-front-end v0.0.0-20240802103347-3eb0ebf8ad9b // indirect
github.com/CodeYourFuture/curriculum/common-content v0.0.0-20240818070728-e8702788f7cb // indirect
github.com/CodeYourFuture/curriculum/common-theme v0.0.0-20240818070728-e8702788f7cb // indirect
github.com/CodeYourFuture/curriculum/common-content v0.0.0-20241008095008-281a5517463f // indirect
github.com/CodeYourFuture/curriculum/common-theme v0.0.0-20241008095008-281a5517463f // indirect
github.com/CodeYourFuture/curriculum/org-cyf-guides v0.0.0-20240820155314-7287ff7c75f9 // indirect
github.com/CodeYourFuture/curriculum/org-cyf-theme v0.0.0-20240818070728-e8702788f7cb // indirect
)
Expand Down
2 changes: 1 addition & 1 deletion org-cyf-piscine/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ description = 'In teams and on your own, build working software with tests. Expl
layout = 'module'
emoji= '🐠'
menu = ['syllabus', 'next steps']
map=['entry', 'sprints', 'assessment']
menus_to_map=['entry', 'sprints', 'assessment']
+++
4 changes: 2 additions & 2 deletions org-cyf-piscine/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/CodeYourFuture/curriculum/org-cyf-piscine
go 1.22.6

require (
github.com/CodeYourFuture/curriculum/common-content v0.0.0-20240121151641-e52b73ad527d // indirect
github.com/CodeYourFuture/curriculum/common-theme v0.0.0-20240121151641-e52b73ad527d // indirect
github.com/CodeYourFuture/curriculum/common-content v0.0.0-20241008095008-281a5517463f // indirect
github.com/CodeYourFuture/curriculum/common-theme v0.0.0-20241008095008-281a5517463f // indirect
github.com/CodeYourFuture/curriculum/org-cyf-theme v0.0.0-20240818070728-e8702788f7cb // indirect
)

Expand Down
2 changes: 1 addition & 1 deletion org-cyf-sdc/content/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title="Software Development Course"
map=["start here", "SDC", "tracks"]
menus_to_map=["start here", "SDC", "tracks"]
description="Alert: this course is not yet available. Content is incomplete."
emoji= "🧑🏾‍🔧"
+++
Expand Down
2 changes: 1 addition & 1 deletion org-cyf-tracks/content/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title="Tracks"
map=["start here", "from itp", "from sdc"]
taxonomy_to_map = "track_kinds"
description="Short, focused courses walking you towards specific careers"
emoji= "👣"
+++
2 changes: 1 addition & 1 deletion org-cyf-tracks/content/cloud/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ title = 'Cloud'
description = 'Deploy and manage cloud infrastructure; explore containers, pipelines, load balancing, traffic, integration and security; define infrastructure as code'
layout = 'module'
emoji= '☁️'
menu = 'from sdc'
track_kinds = ['jobs-after-sdc']
+++
3 changes: 2 additions & 1 deletion org-cyf-tracks/content/coming-soon/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title = 'Coming Soon'
description = 'ITP tracks are coming soon...'
layout = 'module'
emoji= '👷🏽‍♀️'
menu = "from itp"
track_kinds = ['jobs-after-itp']

+++

## In development:
Expand Down
2 changes: 1 addition & 1 deletion org-cyf-tracks/content/portfolio/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ title = 'Portfolio'
description = 'Build great projects; work in teams; polish our profiles; get great jobs in tech'
layout = 'module'
emoji= '🧑🏾‍🚀'
menu = 'from sdc'
track_kinds = ['jobs-after-sdc']
+++
3 changes: 2 additions & 1 deletion org-cyf-tracks/content/react/_index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
+++
title = 'React'
description = 'Explore frameworks, libraries, and declarative programming with React; Develop unit testing with Testing Library; Build a dynamic web application in an Agile team'
prerequisites = ["ITP"]
layout = 'module'
emoji= '🪄'
menu = 'from sdc'
track_kinds = ['self-study']
weight='6'
+++
11 changes: 11 additions & 0 deletions org-cyf-tracks/content/track_kinds/jobs-after-itp/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
title = "Jobs after ITP"
weight = 2
description = "These are course materials targeting specific jobs."
[[details]]
name = "When"
value = "When a job requiring one of these tracks is available, CYF will announce when the track will run."
[[details]]
name = "Who"
value = "You must have completed the Introduction to Programming course, be enrolled as a trainee, and want the job it's targeting. If you are planning to do the Software Development Course, you probably want to prepare for the Piscine and SDC rather than taking one of these tracks."
+++
11 changes: 11 additions & 0 deletions org-cyf-tracks/content/track_kinds/jobs-after-sdc/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
title = "Jobs after SDC"
weight = 3
description = "These are course materials targeting specific jobs."
[[details]]
name = "When"
value = "When a job requiring one of these tracks is available, CYF will announce when the track will run."
[[details]]
name = "Who"
value = "You must have completed the Software Development Course, be enrolled as a trainee, and want the job it's targeting."
+++
8 changes: 8 additions & 0 deletions org-cyf-tracks/content/track_kinds/self-study/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
+++
title = "Self-study"
weight = 1
description = "These are are course materials introducing topics which you can study on your own or in a group. They are not targeted at specific jobs, but can help broaden your knowledge."
[[details]]
name = "When"
value = "You can study these tracks any time. They list what you need to know before starting."
+++
3 changes: 3 additions & 0 deletions org-cyf-tracks/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ baseURL = "https://tracks.codeyourfuture.io/"
[[module.imports.mounts]]
source = "content"
target = "content/how-this-works"

[taxonomies]
track_kind = "track_kinds"
2 changes: 1 addition & 1 deletion org-cyf/content/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title="Our Courses"
map=["start here", "selection", "trainees", "fellowships"]
menus_to_map=["start here", "selection", "trainees", "fellowships"]
description="Free training for good jobs in tech [📅 2024/25](https://docs.google.com/spreadsheets/d/1qNxf44_vbNKU1KeFozGX7Kt1QxmTtU6Bf9tOh1sTUuc/edit?gid=1346767713#gid=1346767713)"
emoji= "🧑🏿‍🏫👨🏽‍🎓"
+++
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ with .Params.map }}
{{ with .Params.menus_to_map }}
<div class="c-map">
<h1 class="e-heading c-map__start is-none--lt-container">👉🏾</h1>
{{ range $index, $menu := . }}
Expand Down
Loading