Version 5.1 - All the GraphQL #32
@ -17,7 +17,7 @@
|
||||
<?php /* <button class="plus_one_volume">+1 Volume</button> */ ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<img src="<?= $escape->attr($item['manga']['image']) ?>" />
|
||||
<img src="<?= $urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg") ?>" />
|
||||
<div class="name">
|
||||
<a href="<?= $url->generate('manga.details', ['id' => $item['manga']['slug']]) ?>">
|
||||
<?= $escape->html(array_shift($item['manga']['titles'])) ?>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<main class="details fixed">
|
||||
<section class="flex flex-no-wrap">
|
||||
<div>
|
||||
<img class="cover" src="<?= $data['cover_image'] ?>" alt="<?= $data['title'] ?> cover image" />
|
||||
<img class="cover" src="<?= $urlGenerator->assetUrl('images/manga', "{$data['id']}.jpg") ?>" alt="<?= $data['title'] ?> cover image" />
|
||||
<br />
|
||||
<br />
|
||||
<table>
|
||||
@ -39,7 +39,7 @@
|
||||
<?php if (count($characters) > 0): ?>
|
||||
<h2>Characters</h2>
|
||||
<section class="media-wrap">
|
||||
<?php foreach($characters as $char): ?>
|
||||
<?php foreach($characters as $id => $char): ?>
|
||||
<?php if ( ! empty($char['image']['original'])): ?>
|
||||
<article class="character">
|
||||
<?php $link = $url->generate('character', ['slug' => $char['slug']]) ?>
|
||||
@ -47,7 +47,7 @@
|
||||
<?= $helper->a($link, $char['name']); ?>
|
||||
</div>
|
||||
<a href="<?= $link ?>">
|
||||
<?= $helper->img($char['image']['original'], [
|
||||
<?= $helper->img($urlGenerator->assetUrl('images/characters', "{$id}.jpg"), [
|
||||
'width' => '225'
|
||||
]) ?>
|
||||
</a>
|
||||
|
@ -15,7 +15,7 @@
|
||||
</th>
|
||||
<th>
|
||||
<article class="media">
|
||||
<?= $helper->img($item['manga']['image']); ?>
|
||||
<?= $helper->img($urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg")); ?>
|
||||
</article>
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -1,8 +1,9 @@
|
||||
{{#data}}
|
||||
<article class="media search">
|
||||
<div class="name" style="background-image:url({{attributes.posterImage.small}})">
|
||||
<div class="name">
|
||||
<input type="radio" class="big-check" id="{{attributes.slug}}" name="id" value="{{id}}" />
|
||||
<label for="{{attributes.slug}}">
|
||||
<img src="/public/images/anime/{{id}}.jpg" alt="" width="220" />
|
||||
<span class="name">
|
||||
{{attributes.canonicalTitle}}
|
||||
<br />
|
||||
|
@ -1,8 +1,9 @@
|
||||
{{#data}}
|
||||
<article class="media search">
|
||||
<div class="name" style="background-image:url({{attributes.posterImage.small}})">
|
||||
<div class="name">
|
||||
<input type="radio" class="big-check" id="{{attributes.slug}}" name="id" value="{{id}}" />
|
||||
<label for="{{attributes.slug}}">
|
||||
<img src="/public/images/manga/{{id}}.jpg" alt="" width="220" />
|
||||
<span class="name">
|
||||
{{attributes.canonicalTitle}}
|
||||
<br />
|
||||
|
@ -84,6 +84,7 @@ class MangaListTransformer extends AbstractTransformer {
|
||||
'total' => $totalVolumes
|
||||
],
|
||||
'manga' => [
|
||||
'id' => $mangaId,
|
||||
'titles' => Kitsu::filterTitles($manga),
|
||||
'alternate_title' => NULL,
|
||||
'slug' => $manga['slug'],
|
||||
|
@ -33,7 +33,7 @@ class MangaTransformer extends AbstractTransformer {
|
||||
public function transform($item)
|
||||
{
|
||||
$genres = [];
|
||||
|
||||
|
||||
foreach($item['included'] as $included)
|
||||
{
|
||||
if ($included['type'] === 'genres')
|
||||
@ -41,10 +41,11 @@ class MangaTransformer extends AbstractTransformer {
|
||||
$genres[] = $included['attributes']['name'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sort($genres);
|
||||
|
||||
|
||||
return [
|
||||
'id' => $item['id'],
|
||||
'title' => $item['canonicalTitle'],
|
||||
'en_title' => $item['titles']['en'],
|
||||
'jp_title' => $item['titles']['en_jp'],
|
||||
|
Loading…
Reference in New Issue
Block a user