/tongarirocinemas

Website built for the IT5005 class at Whitecliffe College, Auckland

Primary LanguageHTML

IT5005 Project: Tongariro Cinemas

Introduction

This repository contains the website for the IT5005 Project (Web Implementation). The author is Hugh Lilly (ID 20220344).

The site presented alongside this report took three weeks to create, from sketching designs to finalising functionality. It uses Tailwind CSS, a utility-first CSS framework, and provides a number of features that give end-users the ability to:

  1. View a list of currently playing films (the Now Playing page)
  2. Calculate the cost of a selection of tickets (the Tickets page)
  3. View information on the history of the cinema (About page)
  4. View information on the rewards programme (Rewards page)

During development, prettier and eslint were used to ensure code met formatting standards.

Source code

The source code for the site is in the /src directory. There is an HTML file for each page on the site.

There are three subdirectories:

  • assets -- images and other media assets
  • scripts -- JavaScript files
  • styles -- CSS file
.
├── src
│   ├── assets
│   │   ├── carousel
│   │   ├── logos_icons
│   │   └── stills
│   ├── scripts
│   │   ├── mobile-menu.js
│   │   ├── tickets.js
│   │   └── trailers.js
│   ├── styles
│   │   └── main.css
│   ├── about.html
│   ├── index.html
│   ├── now-playing.html
│   ├── rewards.html
│   └── tickets.html
├── README.md
├── package-lock.json
├── package.json
└── tailwind.config.js

Other notable files

  • package.json, the npm configuration file
  • package-lock.json, generated by npm
  • tailwind.config.js, the Tailwind configuration file

Hidden files:

  • .prettierrc, the prettier configuration file
  • .eslintrc.json, the eslint configuration file

Version control

This is a git-initalised repository, so you can run git status and git log to view authorship information. View a summary of the commit history by running this command:

git log --pretty=format:"%cr: %s (%h)"

Running locally

Requirements/prerequisites

The development dependencies are parcel.js, eslint, prettier, and Tailwind. There are no production dependencies.

Installation

First, run:

npm install

Development server

To open the development server, run:

npm start

This runs the parcel bundler, which minifies all HTML and JavaScript, delivering a faster site than simply opening /src/index.html in a browser (though this will also work).

Build for distribution

To build the site, run:

npm run build

This creates a minifed build of the site along with all assets, which makes for a faster load time.

Serve locally

To serve the built site locally, run:

npm run serve

NB: The site was built before distribution, so this command should be able to be run without running a new build beforehand.

Future enhancements

The existing site could be enhanced in a number of ways:

Home page

Infomation could be added to the carousel, such as details on upcoming sessions. This space could also be used to promote other aspects of the cinema and business, such as the museum.

Now Playing

This page would be greatly enhanced by the addition of information on specific sessions, as well as perhaps some advertising for other aspects of the business.

About Us

More information could be added here on the history of the cinema, and in particular on the museum and café.

Tickets

This page has great end-user functionality, but would be significantly improved if it were connected to a live ticketing system.

Rewards

This page could be enhanced with the addition of a newsletter signup form.

Upgrading to React

The site could be upgraded to the component-based JavaScript framwork React. This would greatly enhance both user-facing and administrative functionalities.

Moving development to React could provide:

  1. The ability to load the whole site as one application, navigating between "routes" instead of individual HTML pages
  2. The ability to create single components that return multiple iterations of a particular HTML element, for example by mapping over data on films, or other repeated page elements such as the Home page blurbs that lead to other parts of the site.
  3. The administrative panel for content could be contained in several JSON objects, and stored securely in individual .js files alongside the application itself.
  4. The need for multiple HTML pages each with a copy of the header and footer would be removed, greatly improving maintainability.

Contact

Contact the author, Hugh Lilly (ID 20220344), by email (20220344@mywhitecliffe.com) if you have any questions.


(Last updated September 23, 2022.)