js/display.js
Handles the display and rendering of media items, hero section, details overlay, collections, and notifications.
- Source:
Methods
(static) closeActorDetails()
Closes the actor details overlay.
- Source:
(static) closeDetails()
Closes the details overlay.
- Source:
(static) createMediaCard(item, extraClassesopt) → {HTMLElement}
Creates a media card element for a given media item.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
item |
Object | The media item to create a card for. | ||
extraClasses |
string |
<optional> |
"" | Additional CSS classes to apply to the card. |
- Source:
Returns:
The created media card element.
- Type
- HTMLElement
(static) openActorDetails(actor, filmsData, seriesData)
Opens the actor details overlay.
Parameters:
| Name | Type | Description |
|---|---|---|
actor |
Object | Actor object. |
filmsData |
Object | Films data keyed by title. |
seriesData |
Object | Series data keyed by title. |
- Source:
(static) openDetails(item)
Opens the details overlay for a given media item.
Parameters:
| Name | Type | Description |
|---|---|---|
item |
Object | The media item to display details for. |
- Source:
(static) playCurrentMedia()
Plays the currently selected media in the details overlay.
- Source:
(static) renderActorsList(actorsData, filmsData, seriesData)
Renders the grid of actors (photo + nom).
Parameters:
| Name | Type | Description |
|---|---|---|
actorsData |
Object | Actors keyed by slug/id. |
filmsData |
Object | Films data keyed by title. |
seriesData |
Object | Series data keyed by title. |
- Source:
(static) renderActorsListSearch(actorsData, filmsData, seriesData)
Renders a list of actors in a search results section.
Parameters:
| Name | Type | Description |
|---|---|---|
actorsData |
Array | Array of actor objects to display. |
filmsData |
Object | Films data for opening actor details. |
seriesData |
Object | Series data for opening actor details. |
- Source:
(static) renderCollections(collectionsData, appData)
Renders collections of media items.
Parameters:
| Name | Type | Description |
|---|---|---|
collectionsData |
Object | The collections data. |
appData |
Object | The application data containing films and series. |
- Source:
(static) renderGrid(items)
Renders a grid of media items.
Parameters:
| Name | Type | Description |
|---|---|---|
items |
Array | The list of media items to render. |
- Source:
(static) renderHorizontalRow(containerId, items)
Renders a horizontal row of media items.
Parameters:
| Name | Type | Description |
|---|---|---|
containerId |
string | The ID of the container element. |
items |
Array | The list of media items to render. |
- Source:
(static) renderNotifs(list)
Renders the list of notifications.
Parameters:
| Name | Type | Description |
|---|---|---|
list |
Array | The list of notifications to render. |
- Source:
(static) setupHero(item)
Sets up the hero section with the given media item.
Parameters:
| Name | Type | Description |
|---|---|---|
item |
Object | The media item to display in the hero section. |
- Source:
(inner) renderEpisodes(episodes, seasonNum)
Renders the list of episodes for a given season.
Parameters:
| Name | Type | Description |
|---|---|---|
episodes |
Array | The list of episodes to render. |
seasonNum |
number | string | The season number. |
- Source: