WDD 131: Dynamic Web Fundamentals

W02 Assignment: Picture Album

Overview

This assignment applies the concepts presented in the learning activities to a picture album page that is responsive in small and larger views. This page will utilize a 'hamburger' menu and respond to user requests.

Associated Course Learning Outcomes

Develop responsive web pages that follow best practices and use valid HTML and CSS.
Demonstrate proficiency with JavaScript language syntax.
Use JavaScript to respond to events and dynamically modify HTML.

Task

Design, develop, test, and then deploy a temple album page using your own selections of temple pictures.

Example Picture Album Page Screenshot - Mobile
Screenshot Example in Mobile View
Example Picture Album Page Screenshot - Larger
Screenshot Example in Larger View
Demonstration of Responsive Behavior responsive example

Instructions

File and Folder Setup

  1. In VS Code, open the wdd131 local repository folder.
  2. Create a new file named "temples.html".
  3. Add two CSS files named "temples.css" and "temples-large.css" to the "styles" directory.
  4. Add a JavaScript file named "temples.js" to the "scripts" directory.

HTML

  1. In the temples.html document, include the standard HTML document and <head> elements.

    Refer to the development standards if you need a review.

  2. Add links to the CSS files in the proper order to support mobile first dev.
  3. Add a deferred <script> reference to the JavaScript file.
  4. In the <body>, create a basic layout using a header, a main, and a footer as main line elements.
  5. The <header> element contains:
    • text that says "Temple Album"
    • a <nav> menu with the following text links:
      • Home
      • Old
      • New
      • Large
      • Small
  6. The <main> element contains the following:
    • an <h1> heading element
    • at least (9) <figure> elements with temple images and captions. Use the built-in figure captions elements and name the temple

      It is OK to have a single placeholder temple image at this point in the course.

  7. The <footer> contains the same dynamic and static information found on your home page from last week.
    Common Footer Screenshot Example
    Screenshot Example of Common Footer

CSS

Use the external temples.css and temples-large.css files to layout and style the page as shown is the example screenshots. Your design must support a responsive view in mobile and larger views.

The temples.css file is used for the mobile view and the temples-large.css file is used for the larger view.
Most of your CSS should be located in the temples.css file in mobile first design.

  1. Use your own color schema.

    Please note: You are responsible to practice good design principles of alignment, color contrast, proximity, repetition, and consistent white space.

  2. Use your own typography choice by using the Google Fonts API service to select one or two fonts to use on the page.

    Video Demonstration: ▶️ Using Google Fonts – [ 1:56 minutes ]

  3. Use CSS Flex on the navigation nav.

    Video Demonstration: ▶️ CSS Flex Navigation Menu – [ 7:58 minutes ]
    CodePen ☼ Navigation Menu using CSS Flex

  4. The navigation must employ a hover affect. See the CodePen above for an example.
    Check Your Understanding Consider using the hover pseudo-class to change the design for the menu item that has the focus.
    nav a:hover { ... }
  5. The main element has a limited width and is centered on the screen horizontally.
    Check Your Understanding Consider using the max-width property to limit the width and margin property to center the main element on the screen.
    /* This is only an example to consider */
    main { 
      max-width: 800px;
      margin: 0 auto;
    }
  6. Layout the main column figure elements using CSS Grid. In the mobile view, there should only be one (1) column.

    The application of CSS Grid to support a responsive view is up to you.


    Some of the options could be:
    • use grid-template-column specific fr changes in the media query
    • use grid-template-column property with a repeat function and auto-fit and minmax function.

      CodePen ☼ Grid Column Layouts and Image Effects
      Look at the CSS for the .container class.

JavaScript

To improve organization and maintainability, it is required to place all JavaScript code in external files.

  1. Support the footer copyright year and date last modified output through a valid JavaScript reference. You already have one or could use the temples.js file.
  2. Apply a responsive hamburger effect to your existing navigation menu using JavaScript.
    • The hamburger button should only show in the mobile view.
    • Clicking the hamburger button toggles the navigation menu items from viewable to not viewable.
    • Use a symbol, such as an 'X' to close the hamburger menu.

Testing

  1. Continuously check your work by rendering the page locally using Live/Five Server in VS Code.
  2. Screenshot of console error icon in DevTools
    Use the browser's DevTools to check for JavaScript runtime errors in the console or click the red, error icon in the upper right corner of DevTools.
  3. Use DevTools CSS Overview to check your color contrast.
  4. Generate the DevTools Lighthouse report and run diagnostics for Accessibility, Best Practices, and SEO in both the mobile and desktop views.

    It is best to test your page in a Private or Incognito browser window.

  5. Hard reload the page using Empty Cache and Hard Reload in DevTools with the Network tab open to view the total transferred bytes at the bottom of the tab. Check that the page is 500 kB or less.
    • Make sure that all images are optimized.
    • Do not use third party libraries that bloat your page's size with unused features and code.

Audit and Submission

  1. Commit your local repository and push or upload your work to your GitHub Pages enabled wdd131 repository on GitHub.
  2. Use this ☑️ audit tool to check basic HTML and CSS standards and requirements.
  3. Share your work by posting your URL in the course's Microsoft Teams weekly forum and comment on your peers' work by providing constructive feedback.
  4. Return to Canvas and submit the correct GitHub Pages enabled URL.
    https://your-github-username.github.io/wdd131/temples.html