Get images from proxy or cache for Manga views, and Add views
This commit is contained in:
parent
1c06748232
commit
029073a4ea
@ -17,7 +17,7 @@
|
|||||||
<?php /* <button class="plus_one_volume">+1 Volume</button> */ ?>
|
<?php /* <button class="plus_one_volume">+1 Volume</button> */ ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<img src="<?= $escape->attr($item['manga']['image']) ?>" />
|
<img src="<?= $urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg") ?>" />
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<a href="<?= $url->generate('manga.details', ['id' => $item['manga']['slug']]) ?>">
|
<a href="<?= $url->generate('manga.details', ['id' => $item['manga']['slug']]) ?>">
|
||||||
<?= $escape->html(array_shift($item['manga']['titles'])) ?>
|
<?= $escape->html(array_shift($item['manga']['titles'])) ?>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<main class="details fixed">
|
<main class="details fixed">
|
||||||
<section class="flex flex-no-wrap">
|
<section class="flex flex-no-wrap">
|
||||||
<div>
|
<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 />
|
||||||
<br />
|
<br />
|
||||||
<table>
|
<table>
|
||||||
@ -39,7 +39,7 @@
|
|||||||
<?php if (count($characters) > 0): ?>
|
<?php if (count($characters) > 0): ?>
|
||||||
<h2>Characters</h2>
|
<h2>Characters</h2>
|
||||||
<section class="media-wrap">
|
<section class="media-wrap">
|
||||||
<?php foreach($characters as $char): ?>
|
<?php foreach($characters as $id => $char): ?>
|
||||||
<?php if ( ! empty($char['image']['original'])): ?>
|
<?php if ( ! empty($char['image']['original'])): ?>
|
||||||
<article class="character">
|
<article class="character">
|
||||||
<?php $link = $url->generate('character', ['slug' => $char['slug']]) ?>
|
<?php $link = $url->generate('character', ['slug' => $char['slug']]) ?>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<?= $helper->a($link, $char['name']); ?>
|
<?= $helper->a($link, $char['name']); ?>
|
||||||
</div>
|
</div>
|
||||||
<a href="<?= $link ?>">
|
<a href="<?= $link ?>">
|
||||||
<?= $helper->img($char['image']['original'], [
|
<?= $helper->img($urlGenerator->assetUrl('images/characters', "{$id}.jpg"), [
|
||||||
'width' => '225'
|
'width' => '225'
|
||||||
]) ?>
|
]) ?>
|
||||||
</a>
|
</a>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
<article class="media">
|
<article class="media">
|
||||||
<?= $helper->img($item['manga']['image']); ?>
|
<?= $helper->img($urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg")); ?>
|
||||||
</article>
|
</article>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
{{#data}}
|
{{#data}}
|
||||||
<article class="media search">
|
<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}}" />
|
<input type="radio" class="big-check" id="{{attributes.slug}}" name="id" value="{{id}}" />
|
||||||
<label for="{{attributes.slug}}">
|
<label for="{{attributes.slug}}">
|
||||||
|
<img src="/public/images/anime/{{id}}.jpg" alt="" width="220" />
|
||||||
<span class="name">
|
<span class="name">
|
||||||
{{attributes.canonicalTitle}}
|
{{attributes.canonicalTitle}}
|
||||||
<br />
|
<br />
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
{{#data}}
|
{{#data}}
|
||||||
<article class="media search">
|
<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}}" />
|
<input type="radio" class="big-check" id="{{attributes.slug}}" name="id" value="{{id}}" />
|
||||||
<label for="{{attributes.slug}}">
|
<label for="{{attributes.slug}}">
|
||||||
|
<img src="/public/images/manga/{{id}}.jpg" alt="" width="220" />
|
||||||
<span class="name">
|
<span class="name">
|
||||||
{{attributes.canonicalTitle}}
|
{{attributes.canonicalTitle}}
|
||||||
<br />
|
<br />
|
||||||
|
@ -84,6 +84,7 @@ class MangaListTransformer extends AbstractTransformer {
|
|||||||
'total' => $totalVolumes
|
'total' => $totalVolumes
|
||||||
],
|
],
|
||||||
'manga' => [
|
'manga' => [
|
||||||
|
'id' => $mangaId,
|
||||||
'titles' => Kitsu::filterTitles($manga),
|
'titles' => Kitsu::filterTitles($manga),
|
||||||
'alternate_title' => NULL,
|
'alternate_title' => NULL,
|
||||||
'slug' => $manga['slug'],
|
'slug' => $manga['slug'],
|
||||||
|
@ -45,6 +45,7 @@ class MangaTransformer extends AbstractTransformer {
|
|||||||
sort($genres);
|
sort($genres);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
'id' => $item['id'],
|
||||||
'title' => $item['canonicalTitle'],
|
'title' => $item['canonicalTitle'],
|
||||||
'en_title' => $item['titles']['en'],
|
'en_title' => $item['titles']['en'],
|
||||||
'jp_title' => $item['titles']['en_jp'],
|
'jp_title' => $item['titles']['en_jp'],
|
||||||
|
Loading…
Reference in New Issue
Block a user