feat: simple related media block on results page
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
{% block title %}{{ results.media.title }} — Download Options — Torsearch{% endblock %}
|
||||
|
||||
{% block h2 %}Media Results{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="p-4 flex flex-col grow gap-4">
|
||||
<h2 class="mb-2 text-3xl font-bold text-gray-50">Media Results</h2>
|
||||
<div class="flex flex-row w-full gap-2">
|
||||
<twig:Card title="" class="w-full" contentClass="flex flex-col gap-4 justify-between w-full text-gray-50">
|
||||
<div class="p-2 md:p-4 flex flex-col md:flex-row gap-6">
|
||||
@@ -19,7 +20,7 @@
|
||||
<div class="w-full flex flex-col">
|
||||
<div class="mb-4 flex flex-row gap-2 justify-between">
|
||||
<h3 class="text-xl font-medium leading-tight font-bold text-gray-50">
|
||||
{{ results.media.title }} ({{ results.media.year }})
|
||||
{{ results.media.title }} ({{ results.media.year|date('Y') }})
|
||||
</h3>
|
||||
|
||||
{% if results.media.mediaType == "tvshows" %}
|
||||
@@ -95,12 +96,35 @@
|
||||
{% elseif "tvshows" == results.media.mediaType %}
|
||||
<twig:TvEpisodeList
|
||||
results="results"
|
||||
:imdbId="results.media.imdbId" :season="results.season" :perPage="20" :pageNumber="1"
|
||||
:tmdbId="results.media.tmdbId" :title="results.media.title" loading="defer" :episodeNumber="results.episode"
|
||||
loading="defer"
|
||||
:imdbId="results.media.imdbId"
|
||||
:season="results.season"
|
||||
:perPage="20"
|
||||
:pageNumber="1"
|
||||
:tmdbId="results.media.tmdbId"
|
||||
:title="results.media.title"
|
||||
:episodeNumber="results.episode"
|
||||
/>
|
||||
{% endif %}
|
||||
</twig:Card>
|
||||
</div>
|
||||
|
||||
<twig:Card title="Related Media" contentClass="flex flex-col gap-4 text-white">
|
||||
<p>Results similar to "{{ results.media.title }}" that you may be interested in.</p>
|
||||
|
||||
<div class="grid grid-cols-2 gap-4 md:flex flex-col md:flex-row justify-between w-full">
|
||||
{% for media in results.relatedMedia %}
|
||||
<twig:Poster imdbId="{{ media.imdbId }}"
|
||||
tmdbId="{{ media.tmdbId }}"
|
||||
title="{{ media.title }}"
|
||||
description="{{ media.description }}"
|
||||
image="{{ media.poster }}"
|
||||
year="{{ media.year }}"
|
||||
mediaType="{{ media.mediaType }}"
|
||||
/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</twig:Card>
|
||||
</div>
|
||||
<style>
|
||||
html,
|
||||
|
||||
Reference in New Issue
Block a user