WEB322 Assignment 3
WEB322 Assignment 3
Submission Deadline:
Friday, October 13th, 2023 @ 11:59 PM
Assessment Weight:
8% of your final course Grade
Objective:
Build upon the provided web project web322-app.zip, we will add a custom landing page with links to various sets, as
well as an "about" page and custom 404 error page. Additionally, we will be updating our server.js file to support more
dynamic routes, status codes and static content (css). Finally, we will publish the solution using Cyclic.
NOTE: Please reference the sample: https://wptf-a3-sample.cyclic.cloud when creating your solution. The UI does not
have to match exactly, but this will help you determine which elements / syntax should be on each page.
Before starting the assignment, you should familiarize yourself with the provided web project web322-app.zip by unzip
the file and running the project (node --watch server) in your Visual Studio Code, examining the data (.json) files,
data-service module (modules/legoSets.js) and the server.js files, as well as checking the defined routes using browser’s
address bar:
Initializing tailwindcss
Editing tailwind.config.js to ensure your .html files are watched during the build and "daisyui" /
"@tailwindcss/typography" are added as plugins. Also, you may add a "theme" - the sample uses "fantasy", but
you're free to use whatever you like.
Adding a "tw:build" script to your package.json
NOTE: Before you begin, do not forget to mark the "public" folder as "static", ie: app.use(express.static('public')); in
your server.js file
File: views/home.html
o "Lego Collection" (or something similar) as the large text (left) which links to "/"
The items in this dropdown should be links to 3 themes that are available in your dataset in the
form: <a href="/lego/sets?theme=someTheme">someTheme</a>
File: views/about.html
This file should follow the same layout as views/home.html, ie: reference main.css, have a <title> property and identical
navbar. However, the navbar must have the text "About" highlighted by using the "active" class, ie:
The left column should show an image that you like / represents you.
The right column should be a short blurb about yourself (hobbies, courses you're taking, etc).
File: views/404.html
Once again, this file should follow the same layout as views/home.html, ie: reference main.css, have a <title> property
and identical navbar.
Additionally, this view should feature some kind of 404 message / image for the user. The sample uses a "hero" daisyUI
component.
o If any errors occurred, return the error message with the "404" status code
Delete the "/lego/sets/theme-demo" route – we no longer need this one, since "/lego/sets" now supports the
"theme" query parameter
Add support for a custom "404 error". However, instead of returning text, respond with the 404 status code and
the "/views/404.html" file
Part 4: Deploying your Site
Finally, once you have tested your site locally and are happy with it, it's time to publish it online.
Assignment Submission:
/********************************************************************************
* WEB322 – Assignment 03
*
* I declare that this assignment is my own work in accordance with Seneca's
* Academic Integrity Policy:
*
* https://www.senecacollege.ca/about/policies/academic-integrity-policy.html
*
* Name: ______________________ Student ID: ______________ Date: ______________
*
* Published URL:
*
********************************************************************************/
Compress (.zip) your assignment folder and submit the .zip file to My.Seneca under
Assignments -> Assignment 3
Important Note:
NO LATE SUBMISSIONS for assignments. Late assignment submissions will not be accepted and will receive a
grade of zero (0).
Submitted assignments must run locally, ie: start up errors causing the assignment/app to fail on startup will
result in a grade of zero (0) for the assignment.