TechDojoPilot Cohort Week 1 · Day 5

Pilot CohortPhase 1Week 1Day 5

CSS, Responsive Design, JavaScript Introduction, Git/GitHub Completion, and Release Gate 1

Your day, about 6 hours

  1. Learn2 hSections 4 to 9
  2. Build2 hSection 10
  3. Flex1 hSelf-rating and journals, section 11
  4. Stand-up1 hLive, 9 pm WAT
01

Daily theme and context

Day 4 produced a real HTML skeleton for the Learner Project Tracker and got it into a GitHub repository using the basic Git loop (init, add, commit, push). Day 5 does four things with that skeleton: makes it look like an actual interface using CSS; gives it one small piece of real behaviour using JavaScript and the DOM; completes the Git/GitHub workflow that Day 4 deliberately left unfinished (branching and pull requests); and closes out Week 1 with Release Gate 1, the week's checkpoint.

This is Week 1 of the Pilot Cohort's six-week Learn phase ("Discover and define"), Day 5 of 30 learning days, and the last day of the week. Day 5 starts at the Friday (20 Nov) 9 pm class; Quest 1 and Release Gate 1 are due by Sunday 22 Nov, 11:59 pm WAT. It has four blocks, about 6 hours, done whenever suits you except the stand-up: Learn (2 hours, covered in full below), Build (2 hours, section 10: the Learner Project Tracker), Flex (1 hour; on Day 5 this is your 2-minute self-rating and journals, section 11), and the live stand-up at 9 pm WAT (1 hour).

02

Learning objectives

By the end of today, the learner should be able to:

  1. Explain CSS selectors, the cascade, specificity, and inheritance, and predict which rule wins when two selectors conflict.
  2. Describe the CSS box model and use Flexbox to lay out a row or column of elements.
  3. Apply a basic responsive design pattern (a media query) so a layout adapts to a smaller screen.
  4. Declare a JavaScript variable, write a small function, and use it to select and change one element on a page through the DOM.
  5. Create a branch, push it, and merge it into main through a pull request on your own repository, using the actual commands and GitHub steps involved.
  6. State, in their own words, the problem their product solves, who the users are, why the selected MVP features matter, how the user journeys work, what HTML, CSS, and JavaScript each contribute, how the browser displays a web page, and how their time estimates compared with the time things actually took.
03

Prerequisite knowledge

Day 4's HTML skeleton, semantic structure, and real GitHub repository with the basic Git loop already working. Day 2's brief preview of browser rendering. Day 1's client/server model and conceptual understanding of Git, GitHub, and open source, and the open-source issue the learner has been tracking since. No prior CSS, JavaScript, or branching/forking/PR experience is assumed; all three start from zero today.

04

TechDojo core lesson

25 minutes

CSS fundamentals: selectors, the cascade, specificity, and inheritance

A CSS rule is a selector (which elements it targets) paired with one or more declarations (what to change about them). When two rules target the same element and conflict, the cascade and specificity decide which one wins: more specific selectors (an ID beats a class, a class beats an element type) win over less specific ones, and when specificity ties, the rule that comes later in the stylesheet wins. Inheritance means some properties (like text color or font) pass down from a parent element to its children automatically, unless a more specific rule overrides them. For the Learner Project Tracker, this is why a general rule styling all <button> elements can be safely overridden by a more specific rule just for the "mark present" button.

When specificity ties, the rule that comes later in the stylesheet wins.

The box model

Every HTML element is rendered as a rectangular box made of four layers, from the inside out: content, padding, border, and margin. Padding is space inside the border; margin is space outside it, separating the element from its neighbors. Getting an element's spacing wrong is almost always a box model issue: padding was confused for margin, or vice versa.

Flexbox

Flexbox is a layout method for arranging a row or column of elements along a single axis, distributing space between them and aligning them, without manual positioning math. Setting display: flex on a container turns its direct children into flex items that can be told to spread out evenly, align to one side, or wrap onto a new line as the container shrinks. This is the tool for laying out things like a navigation bar's links or a row of attendance-status buttons.

Introductory CSS Grid

Where Flexbox lays things out along one axis, Grid lays things out in two dimensions at once, rows and columns together, which suits a full page layout (header, sidebar, main content, footer) better than Flexbox does. Today's exposure is deliberately brief: knowing Grid exists, what problem it solves differently from Flexbox, and being able to recognize display: grid in code is enough for now.

display: grid lays out rows and columns together.

Responsive design principles

A responsive layout adapts to the size of the screen it's displayed on, rather than assuming one fixed width. The main tool for this is the media query, a CSS rule that only applies when the screen matches a condition (for example, "only apply this when the screen is narrower than 600 pixels"). For the Learner Project Tracker, this is the difference between a dashboard that's usable on an instructor's phone and one that only works on a laptop.

JavaScript and the DOM, a first look

HTML structures a page and CSS styles it; JavaScript is what makes it do something in response to what a user does. A variable (declared with let or const) stores a value so it can be used and changed later. A function is a named, reusable block of code. The DOM (Document Object Model) is how JavaScript reaches into an HTML page: it lets code select a specific element (for example, a button) and change it (for example, its text, or which CSS class it has) in response to something happening, like a click. Today's goal is only to see this loop work once, end to end, on a single element: select it, listen for a click, change something about it. The deeper mechanics of variables, functions, and the DOM are covered properly in Week 2.

  1. 1SelectA specific element, for example a button
  2. 2ListenFor something happening, like a click
  3. 3ChangeSomething about it: its text, or which CSS class it has

Browser rendering, the short version

Day 1 covered the network side of loading a page: the browser asks a server for it, and gets HTML, CSS, and JavaScript back. Day 2 previewed what happens next, briefly. Here's that process in a little more detail, now that all three of HTML, CSS, and JavaScript are actually in play: the browser parses the HTML into a structural model (the DOM, the same thing JavaScript just reached into above), parses the CSS into a set of rules and combines it with the DOM to work out what each element should look like, calculates where every element actually goes on the screen (layout), and then paints the pixels (paint). JavaScript can change any of this after the fact, by changing the DOM or an element's styles, which is why a script's DOM change can trigger the browser to redo layout and paint for the affected part of the page. This is deliberately a short version, not a deep one; the goal is to be able to explain the sequence (parse, style, layout, paint) in plain language for Release Gate 1 below, not to optimize it yet.

  1. 1ParseHTML into a structural model: the DOM
  2. 2StyleCSS rules combined with the DOM: what each element should look like
  3. 3LayoutWhere every element actually goes on the screen
  4. 4PaintThe pixels

JavaScript can change the DOM or an element's styles afterwards, so the browser redoes layout and paint for that part of the page.

Git and GitHub, the rest of the workflow: branching and pull requests

Day 4 covered the basic loop for a learner's own repository: init, add, commit, push. That loop never used a branch, and never touched anyone else's code. Today completes the picture:

  • Branching. A branch is a separate line of work that doesn't touch the main version until it's ready. Create one with git branch <name> to just create it, or git checkout -b <name> (or the newer git switch -c <name>) to create it and move onto it in one step. Changes committed on a branch stay isolated until that branch is merged back.
  • Pull requests. After committing on a branch, push it (git push -u origin <branch-name>), then open a pull request on GitHub: a request to merge that branch into main, where the change can be reviewed before it lands. On your own repository you review and merge it yourself; from Week 4, in a team, someone else reviews it first.

The loop for your own repository is: branch, commit, push the branch, open a pull request, merge it into main. Contributing to someone else's project adds two more steps, forking and cloning, which are in the optional open-source practice (section 11).

  1. 1Branchgit switch -c <name>: a separate line of work
  2. 2CommitChanges stay isolated on the branch
  3. 3Push the branchgit push -u origin <branch-name>
  4. 4Open a pull requestA request to merge into main, where the change can be reviewed
  5. 5Merge into mainOn your own repository, you review and merge it yourself
05

Video resource

20 minutes
freeCodeCamp.org, "CSS Flexbox Crash Course" (YouTube, official freeCodeCamp channel) Open on YouTube

Watch as much of this as fits in the 20-minute block, starting from the beginning: display: flex, flex-direction, justify-content, align-items, and flex-wrap are the properties that matter most for today. The course runs longer than 20 minutes in full; if time runs out, bookmark the rest for later and move on; the interactive exercise and capstone blocks will reinforce what's covered.

Guided viewing questions:

  1. What's the difference between flex-direction: row and flex-direction: column?
  2. What does justify-content control, versus what align-items controls?
  3. Give one example from the Learner Project Tracker dashboard where Flexbox would lay out a row of elements better than relying on default block layout.
06

Reading resource

20 minutes
MDN, "CSS layout"developer.mozilla.org

Read the "Introduction to CSS layout," "Flexbox," and "Responsive design" sub-articles within the 20-minute block; skim the others if time allows.

Guided reading questions:

  1. What is "normal flow," and what does setting a layout method like Flexbox or Grid actually change about it?
  2. Name one property a media query would be used to change on a narrow screen, and why.
  3. Flexbox and Grid solve layout in different numbers of dimensions. What's the difference, in your own words?

Further reading (optional, not timed into the 20-minute block).

MDN, "Dynamic scripting with JavaScript"developer.mozilla.org

Specifically the "Variables," "Functions," and "DOM scripting introduction" sub-articles: the deeper version of today's shallow JavaScript and DOM exposure, useful preparation for Week 2.

GitHub Skills, "Introduction to GitHub"skills.github.com

The official, interactive course (in GitHub's own UI, no local setup) behind today's branching and pull-request practice in the open-source block.

GitHub Docs, "Contributing to open source"docs.github.com

The official walkthrough of the fork → clone → branch → commit → push → pull request loop, for working on someone else's repository specifically.

Guided reading question for these two:

  1. GitHub Skills' course and the "Contributing to open source" guide cover two different situations: your own repository, and someone else's. What's the one extra step the second situation requires that the first doesn't?
07

Interactive exercise

40 minutes
  1. 15 min Style the Learner Project Tracker's HTML skeleton with CSS. Using the HTML structure from Day 4, write a stylesheet that applies at least one rule using a selector of each kind (element, class, ID), and lay out the navigation links in a row using Flexbox.
  2. 15 min Add a simple JavaScript interaction. Pick one element on the page (for example, a button) and write a short script that selects it through the DOM and changes something about it when clicked: showing or hiding another element, or changing its text, is enough. The goal is seeing the select-listen-change loop work once, not building anything elaborate.
  3. 10 min Practice branching on a throwaway repository. Using a disposable practice repository (not the real capstone one), create a branch, make a small change, commit it, and push the branch. This is deliberately separate from the real capstone repository, so a mistake here costs nothing.
08

AI-assisted learning prompt

A useful prompt once you have a first attempt at styling or scripting:

Prompt

Here is a CSS rule I wrote to lay out [describe what] using Flexbox: [paste it]. Without rewriting it for me, explain what each property is doing, and point out anything that won't do what I probably intended.

Log the AI's response in the AI-use journal: which explanations clarified something you'd gotten wrong, and which confirmed what you already understood.

09

Knowledge check

15 minutes
  1. Two CSS rules target the same button with conflicting colors: one uses a class selector, one uses an ID selector. Which one wins, and why?
  2. Name the four layers of the box model, from the inside out.
  3. Explain, in one or two sentences, what a media query does.
  4. Walk through the select-listen-change loop your JavaScript interaction used today: what did it select, what did it listen for, and what did it change?
  5. Walk through the four steps a browser takes to turn HTML, CSS, and JavaScript into pixels on the screen (parse, style, layout, paint), in your own words.
  6. Walk through, in order, the commands and GitHub steps that take a change from a new branch into main through a pull request on your own repository.
10

Build block: Learner Project Tracker

2 hours

Use the 2-hour Build block to produce the actual working artifacts:

  • Style the real Learner Project Tracker page: apply the box model, selectors, and Flexbox concepts from today to the actual HTML structure built on Day 4, not a throwaway practice file.
  • Build a responsive, multi-section layout: arrange the dashboard's navigation, main content, and footer using Flexbox (and Grid, if it fits naturally), and add at least one media query so the layout adapts to a narrower screen.
  • Add one real, simple interactive behaviour with JavaScript to the actual tracker page (for example, a button that toggles an attendance status, or reveals a details panel), using the same select-listen-change loop practiced in section 7.
  • Improve the real repository's structure and commit history: do today's styling and scripting work on a branch, in a few meaningful, separately described commits rather than one large unexplained one, push the branch, then open a pull request on your own Tracker repository and merge it into main. This is the branch and pull-request loop from today's core lesson, on your own project; you'll use it every day once teams form in Week 4.
  • Publish the page with GitHub Pages so you have a live link for Gate 1: in your Tracker repository on GitHub, go to Settings → Pages, choose "Deploy from a branch", select main and the root folder, and save. After a minute or two your page is live at https://<your-username>.github.io/<repository-name>/. GitHub Pages is free for public repositories, so keep the Tracker repository public (it holds no personal data).
  • Spend the final part of this block preparing to explain the work: be ready to walk through the HTML, CSS, and JavaScript added today, and the parse/style/layout/paint sequence from the core lesson, since this is what Release Gate 1 (section 12) will ask for.
11

Flex hour (Day 5): self-rating and journals

On Day 5 the Flex hour is fixed:

  • Self-rating (2 minutes): rate your confidence on the same six skills as the baseline you completed before joining, using the form TechDojo sends.
  • Journals: add today's entry to your three running journals (section E of your Product Pack).

Optional open-source practice (after Gate 1, or a Week 2 Flex hour once that week's target is met). Day 4 ended with you naming exactly what was still missing to follow a real project's contribution guidelines. Two steps close that gap:

  • Forking. Forking is for working on someone else's project, not your own. Clicking "Fork" on a repository's GitHub page creates a full copy of it under your own account. You can't push directly to someone else's repository; a fork is your own copy to work in instead.
  • Cloning. git clone <url> downloads a repository (your fork, in this case) from GitHub onto your own machine, so you can work on it locally the same way you worked on your own repository on Day 4.

The full loop for contributing to someone else's project is: fork it, clone your fork, branch, commit your change, push the branch to your fork, then open a pull request from that branch back to the original repository. If you want to try it on a real project:

  • 20 min Complete GitHub Skills' "Introduction to GitHub" course (skills.github.com), which walks through creating a branch, committing a file, opening a pull request, and merging it, entirely through GitHub's own interface, on a repository created for the course itself. This is safe practice ground for the exact mechanics the next step needs, before using them for real.
  • 40 min Fork, clone, and open a real pull request. Using the repository and issue you've been tracking: fork the repository to your own account, clone your fork locally, create a branch for the change, make the small, scoped contribution the issue calls for (following whatever the project's contribution guidelines, found on Day 4, ask for), commit it, push the branch to your fork, and open a pull request from that branch back to the original repository. If the issue turns out to need more than a small, scoped change, open the pull request against the smallest real piece of it you can complete, and note in the PR description what's left.

If you do this practice, also answer: (1) Explain the difference between branching and forking: when would you use one instead of the other? (2) Walk through, in order, the steps it takes to contribute a change to someone else's GitHub repository, from forking it to opening a pull request.

Evidence, if you do it: a link to the merged pull request from the GitHub Skills course, and a link to the real pull request opened against the tracked repository (open is sufficient; merge is the maintainers' decision, not something today's deliverable depends on).

12

Release Gate 1: end-of-week checkpoint

Release Gate 1 isn't new content; it's a spoken checkpoint on everything built across Week 1. Gate 1 is due by Sunday 22 Nov, 11:59 pm WAT, with Quest 1. Be ready to explain, out loud and without notes:

  1. The problem the Learner Project Tracker is intended to solve. (From Day 1's problem statement and discovery.)
  2. Who the users are. (From Day 1, section 2, and the PRD's primary users.)
  3. Why the selected MVP features matter. (From Day 2's PRD, MVP scope, and MoSCoW prioritization.)
  4. How the user journeys (mapped on Day 3) work.
  5. What HTML, CSS, and JavaScript each contribute to the finished page. (From Day 4's HTML work and today's CSS and JavaScript.)
  6. How the browser displays a web page. (From Day 1's client/server model, Day 2's preview, and today's parse/style/layout/paint sequence.)
  7. How your time estimates compared with the time things actually took, and the biggest gap. (From Day 2's milestone plan and your engineering journal.)

The evidence for this gate is what's already been produced this week: a responsive HTML/CSS page, the basic JavaScript interaction added today, a GitHub repository with a meaningful commit history, and the ability to give a clear technical explanation of the page and its structure when asked. If any of the seven points above feels shaky to explain out loud, that's worth revisiting before moving into Week 2, not papering over.

How Gate 1 is scored, out of 100

▲ 70 meets the standard

  • Working demonstration30
  • Technical understanding and defence25
  • Independent problem-solving20
  • Code, documentation and evidence15
  • Reflection and improvement10
13

Deliverables and submission criteria

Finish section D (Prototype and code), then submit your whole Tracker Product Pack (sections A to E, with the repository and live links) by Sunday 22 Nov, 11:59 pm WAT. Section D should show:

0 of 10 ticked Ticks are saved on this device only.

14

Daily journal reflection

  • Engineering journal: Record what broke first when applying CSS to the real page (a layout that didn't look like expected, a media query that didn't trigger, and so on), and how it was found and fixed. Record what happened the first time the JavaScript interaction ran, including any error. Estimate vs actual: for today's Tracker milestone, record your estimate, the actual time, and the reason for any big gap (being wrong is fine; hiding it isn't).
  • AI-use journal: Record the Flexbox-review prompt, what it clarified or corrected, and what was changed as a result.
  • Curriculum journal: Now that you've used the branch → commit → push → pull request → merge loop on your own repository, was keeping it out of Day 4 entirely the right call, or would partial exposure earlier have helped?