Skip to content

T01 html css js - #55

Closed
braughtg wants to merge 24 commits into
mainfrom
t01-html-css-js
Closed

T01 html css js#55
braughtg wants to merge 24 commits into
mainfrom
t01-html-css-js

Conversation

@braughtg

@braughtg braughtg commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Type of Work

Check the box beside the Type of Work to indicate whether this pull request is for a tutorial or an extension. If editing, place an X in the [ ] (e.g. [X] to check it.

  • - Tutorial
  • - Extension

Topic

Check the box beside the topic to which course topic this pull request applies. If editing, place an X in the [ ] (e.g. [X] to check it.

  • - 01 - HTML/CSS/JS
  • - 02 - Vue 1
  • - 03 - Vue 2
  • - 04 - Vue 3
  • - 05 - Vue 4
  • - 06 - Cypress Testing
  • - 07 - Vue Lifecycle Hooks and API Calls

Time Estimate

Provide an estimate of the number of hours you spent working on the contents of this pull request.

Additional Information

Provide any feedback you have that might help improve this assignment for future students.

@github-actions
github-actions Bot marked this pull request as draft August 26, 2026 00:45
@github-actions

Copy link
Copy Markdown

Thank you for your pull request.

Note that all new pull requests to the Vue3-WebDev-Kit are opened as draft pull requests.

Submitting Your Work

When you believe your work on the assignment is complete mark your pull request as ready for review to turn it in.

Getting Help

If you have questions as you work you can get in touch via:

  • comments on this pull request.
  • comments on the associated issue(s).
  • any other course communication channel(s).

@braughtg

Copy link
Copy Markdown
Contributor Author

@copilot review this pull request.

@braughtg

Copy link
Copy Markdown
Contributor Author

@copilot review this pull request.

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown

@copilot review this pull request.

Project Structure

Requirement Status Evidence
A first-website directory exists within web-projects. web-projects/first-website/ exists.
first-website contains index.html. web-projects/first-website/index.html exists.
first-website/styles/style.css exists. web-projects/first-website/styles/style.css exists.
first-website/images contains at least one image. images/fd2-logo.png and images/fd2-logo-orange.png exist.
first-website/scripts/main.js exists. web-projects/first-website/scripts/main.js exists.
index.html loads styles/style.css in a <link> tag in the head. index.html:6.
index.html loads scripts/main.js in a <script> tag in the head. index.html:13.

Workflow

Requirement Status Evidence
The pull request contains at least three commits. The PR contains 21 commits.
Commit messages briefly describe the changes made. Commit messages describe their changes, including “adds the image changer,” “adds the custom greeting,” and “updates header text to match in all cases.”

Basic HTML Structure

Requirement Status Evidence
index.html has a descriptive title in the head. index.html:14, The FarmData2 Project.
An h1 has the same or a very similar title. index.html:17, The FarmData2 Project.
styles/style.css is linked in the head. index.html:6.
The head links to a Google Font. index.html:9-12, Roboto from Google Fonts.
An image element displays an image and has descriptive alt text. index.html:19-22.
One or more paragraphs appear below the image. index.html:24-35.
An unordered or ordered list has at least three list items. index.html:36-42, five list items.
At least one link element is present. index.html:25, FarmData2 GitHub link.

CSS Styling

Requirement Status Evidence
style.css contains type selectors for h1, p, li, body, and html. style.css:1, 9, 18-19, and 25.

JavaScript Functionality

Requirement Status Evidence
The image click listener toggles the displayed image between two images. main.js:3-10 switches between fd2-logo.png and fd2-logo-orange.png.
The button click listener calls the username-setting function. main.js:32-34 registers the button listener and calls setUserName.
Page-load code checks if a username is stored in local storage and displays it in the h1 when it exists. main.js:25-29 checks localStorage and updates myHeading with the stored name.

CI Status

Requirement Status Evidence
Relevant CI workflow runs pass. GitHub Actions reports no workflow runs for this pull request, so there are no failed CI runs or logs to investigate.

@braughtg

Copy link
Copy Markdown
Contributor Author

Used for testing.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The current HTML/JS combination can break at runtime due to async script loading order, and the JavaScript function name does not match the tutorial requirement (setUsername).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds the “Tutorial 01 - HTML/CSS/JS” first-website project content (HTML/CSS/JS + images) under web-projects/first-website/, matching the tutorial’s required structure and basic functionality.

Changes:

  • Adds index.html with page content, Google Font loading, stylesheet link, and script tag.
  • Adds styles/style.css with basic type-selector styling for the page.
  • Adds scripts/main.js for image toggling and a localStorage-backed personalized greeting.

Project Structure

Requirement Status Notes
web-projects/first-website directory exists Present
web-projects/first-website/index.html exists Present
web-projects/first-website/styles/style.css exists Present
web-projects/first-website/images contains ≥1 image file fd2-logo.png, fd2-logo-orange.png
web-projects/first-website/scripts/main.js exists Present
index.html links styles/style.css in <head> Present
index.html loads scripts/main.js via <script> in <head> Present; avoid async here (see inline review comment)

Workflow

Requirement Status Notes
PR contains at least three commits Confirmed via PR commit list
Commit messages briefly describe changes Messages are generally descriptive

Basic HTML Structure

Requirement Status Notes
Descriptive <title> in <head> “The FarmData2 Project”
<h1> matches or is very similar to title Matches title
styles/style.css linked in <head> Present
Head links to a Google Font Roboto
<img> displays an image with descriptive alt text Present
One or more <p> elements below the image Present
<ul> or <ol> with ≥3 <li> items 5 items
At least one link element Link to FarmData2 GitHub repo

CSS Styling

Requirement Status Notes
Type selectors for h1, p, li, body, img, html Present (including grouped p, li)

JavaScript Functionality

Requirement Status Notes
Image click toggles displayed image between two images Toggles fd2-logo.png / fd2-logo-orange.png
Button click calls setUsername function Implemented as setUserName (see inline review comment)
On page load, uses localStorage name to update <h1> if present Present
File summaries
File Description
web-projects/first-website/index.html Adds the tutorial page structure/content, styling link, Google Font, and script inclusion.
web-projects/first-website/styles/style.css Adds basic CSS type-selector styling for the tutorial page.
web-projects/first-website/scripts/main.js Adds image toggling and localStorage-backed greeting behavior for the tutorial.
Review details
  • Files reviewed: 3/5 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap"
rel="stylesheet"
/>
<script async src="scripts/main.js"></script>
Comment on lines +15 to +34
function setUserName() {
const myName = prompt('Please enter your name.')
if (!myName) {
setUserName()
} else {
localStorage.setItem('name', myName)
myHeading.textContent = `FarmData2 is cool, ${myName}`
}
}

if (!localStorage.getItem('name')) {
setUserName()
} else {
const storedName = localStorage.getItem('name')
myHeading.textContent = `FarmData2 is cool, ${storedName}`
}

myButton.addEventListener('click', () => {
setUserName()
})
html {
/* px means "pixels". The base font size is now 10 pixels high */
font-size: 10px;
/* Replace PLACEHOLDER with the font-family property value you got from Google Fonts */

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The async script load can break DOM-dependent JS initialization and the required setUsername function name does not match the rubric.

Review details

Suppressed comments (2)

web-projects/first-website/index.html:13

  • Using async for the <script> in the <head> can run main.js before the <img>, <h1>, and <button> elements exist, which will make document.querySelector(...) return null and cause runtime errors when adding event listeners. Use defer (or move the script tag to the end of <body>) so the DOM is parsed before the script executes.
    <script async src="scripts/main.js"></script>

web-projects/first-website/scripts/main.js:18

  • The tutorial criteria expects the button click listener to call a setUsername function, but this file defines and calls setUserName instead. Rename the function and update call sites so the implementation matches the required API/name.
function setUserName() {
  const myName = prompt('Please enter your name.')
  if (!myName) {
    setUserName()
  • Files reviewed: 3/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@braughtg braughtg closed this Sep 8, 2026
@braughtg braughtg reopened this Sep 8, 2026
@FarmData2 FarmData2 deleted a comment from Copilot AI Sep 8, 2026
@FarmData2 FarmData2 deleted a comment from Copilot AI Sep 8, 2026
@FarmData2 FarmData2 deleted a comment from Copilot AI Sep 8, 2026
@FarmData2 FarmData2 deleted a comment from Copilot AI Sep 8, 2026
@braughtg braughtg closed this Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants