saeraa / mellankalix

Biograf för Mellankalix
2 stars 3 forks source link

[3] Funktion: Generera film kort #28

Open Arash-SJPI22 opened 1 year ago

Arash-SJPI22 commented 1 year ago

A function that takes two parameters, one is an object (moive, theater, opera...) the other is a string variable. Based on the variable below it will generate html and classes and return it.

carousel: Generate html and classes for an image for the object, a title and a button "Boka biljett" (that takes the user to a new site and also sends show title to the new site) and return it.

card: Generates html and classes for the show poster and title and returns it. The whole card should be a link.

showtimes: Generate html and classes for the showing time and title and return it. Both showing time and title should be a link.

premier: Generate html and classes for the showing date and title and returns it. The title should be a link to movie.html.

list: Generate html and classes for showing time, small poster image, title, showing "salong" and a "more info" button and returns it.

Filename: generateCard.js

Dependencies: HTML and classes for:

Definition of done: When it can return a correct html structure with classes for each variable parameter.

Tests: If an array of objects and a variable is sent to the function and it properly displays them in the DOM with the returned information from the function. This should be done for each of the variables in the function.