summaryrefslogtreecommitdiff
path: root/resources/views/list_anime.blade.php
blob: 49a19350a9f9d85cf78ad63a5eac17897f55639e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
@extends('layouts.app')

@section('content')

<div class="container" id="index">

<div class="page-header">
	<div class="row">
		@if ( "airing_anime" == \Request::route()->getName() || "season" == \Request::route()->getName() )
		<div class="col-12 col-lg-6">
		@endif

			<h1>{{ $title }}</h1>
			@if ( "airing_anime" == \Request::route()->getName() )
				<p class="lead text-muted">
					{{ getSeason() }} {{ date("Y") }}
				</p>
			@endif

		@if ( "airing_anime" == \Request::route()->getName() || "season" == \Request::route()->getName() )
		</div>
		@endif

		@if ( "airing_anime" == \Request::route()->getName() || "season" == \Request::route()->getName() )
			<!-- Change Season -->
			<div class="col-12 col-lg-6">
			    <form id="season_change" action="/changeSeason/" method="get">
				<div class="form-group">
				    <label for="season_switcher">
					<h3>Change Season</h3>
				    </label>
				    <select name="season" id="season_switcher" class="custom-select" required>
					@foreach( getChangeSeasonOptions() as $season )
						<option value="{{ $season->season_name }}-{{ $season->season_year }}">{{ $season->season_name }} {{ $season->season_year }}</option>
					@endforeach
				    </select>
				</div>
				<button class="btn btn-primary" type="submit">&nbsp; Go! &nbsp;</button>
			    </form>
			</div>
		@endif

	</div>
</div>
	<div class="row">
@foreach($all_anime as $anime)
@if ( $anime->season_name != getSeason() && $anime->season_year <= date('Y') && "airing_anime" == \Request::route()->getName() )
	@once
	</div>

	<div id="continuing" class="jumbotron" style="margin-top: 2rem;">
		<h2>Continuing from earlier Seasons</h2>
	</div>

	<div class="row">
	@endonce
@endif
	<div class="col-sm-12 col-lg-4 col-xl-3 d-flex align-items-stretch">
		<div class="card" style="margin-bottom: 10px; width: 100%;
				@if( "surprising_anime" == \Request::route()->getName() )
					@if ( 0 < $anime->score_today - $anime->score_begin )
						border-color: green;
					@else
						border-color: red;
					@endif
				@endif
		">
			<div class="card-body d-flex flex-column">
			
				<h5 class="card-title">{{ $anime->title }} @if ( ! compare($anime->title, $anime->title_pref) )<br><span class="text-muted hide-sm">{{ $anime->title_pref }}</span>@endif</h5>
				<h6 class="card-subtitle mb-2 text-muted">
					score: {{ $anime->score_today ? $anime->score_today : "n/a" }}, members: {{ $anime->members }}
					@if( "surprising_anime" == \Request::route()->getName())
						<br>
						@if ( 0 < $anime->score_today - $anime->score_begin )
							Rose
						@else
							Fell
						@endif
						from {{ $anime->score_begin }} to {{ $anime->score_today }} (diff: {{ $anime->score_today - $anime->score_begin }})
					@endif
				</h6>
				<p class="card-text">
					<a href="/anime/{{ $anime->mal_id}}" title="Click for more data">
						<img src="{{ camo($anime->image_url) }}" class="img-fluid float-left-xl mal-img" data-img-src="{{ $anime->image_url }}" style="margin-bottom: 10px; margin-right: 10px;">
					</a>
					<span class="hide-synopsis-sm">
						{!! replaceSpecialChars(e($anime->synopsis)) !!}
					</span>
				</p>
				<a href="/anime/{{ $anime->mal_id}}" class="card-link btn btn-primary mt-auto" title="Click for more data">More</a>
			</div>
		</div>
	</div>

@endforeach
	</div>

@if ($all_anime instanceof \Illuminate\Pagination\LengthAwarePaginator)
	{{ $all_anime->links() }}
@endif

</div>
@endsection