Objectives

DJT Restaurant is a fictitious website developed as part of a school project. The goal was to develop a restaurant website using HTML, CSS and Javascript only.

My contribution to the project was to build the following pages:

  • Gift Card
  • Contact Us
  • Contest

 

Contest Page

The only requirement for the contest page was for us to come up with an online rigged contest whereby the user would never win.

I came up with the idea of having a card game where the user will have to flip a number of similar cards for them to win a gift voucher. Implementing the contest page with plain HTML and CSS and manipulating the DOM using JavaScript seemed easy at that stage of the design but it’s not going to be fully secure. This is because, smart users will still be able to inspect element of the DOM and view which cards were hidden.

At that point, it was a great opportunity to experiment with the new HTML5 canvas element. Therefore, the game board and the cards are implemented using JavaScript and HTML5 canvas element.