2017-10-23 00:03:24 +09:00
|
|
|
@extends('layouts.base')
|
2017-08-27 04:44:53 +09:00
|
|
|
|
2017-11-03 17:48:58 +09:00
|
|
|
@push('head')
|
|
|
|
@endpush
|
2017-08-27 04:44:53 +09:00
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
2017-10-23 00:03:24 +09:00
|
|
|
<div class="col-lg-4">
|
2019-02-07 00:52:03 +09:00
|
|
|
<div class="card mb-4">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="d-flex flex-row align-items-end mb-4">
|
|
|
|
<img src="{{ Auth::user()->getProfileImageUrl(48) }}" class="rounded mr-2">
|
|
|
|
<div class="d-flex flex-column overflow-hidden">
|
|
|
|
<h5 class="card-title text-truncate">
|
|
|
|
<a class="text-dark" href="{{ route('user.profile', ['name' => Auth::user()->name]) }}">{{ Auth::user()->display_name }}</a>
|
|
|
|
</h5>
|
|
|
|
<h6 class="card-subtitle">
|
|
|
|
<a class="text-muted" href="{{ route('user.profile', ['name' => Auth::user()->name]) }}">@{{ Auth::user()->name }}</a>
|
|
|
|
@if (Auth::user()->is_protected)
|
|
|
|
<span class="oi oi-lock-locked text-muted"></span>
|
|
|
|
@endif
|
|
|
|
</h6>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@component('components.profile-stats', ['user' => Auth::user()])
|
|
|
|
@endcomponent
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-10-23 00:03:24 +09:00
|
|
|
<div class="card mb-4">
|
|
|
|
<div class="card-header">サイトからのお知らせ</div>
|
2019-02-09 00:17:12 +09:00
|
|
|
<div class="list-group list-group-flush tis-sidebar-info">
|
2017-11-03 20:38:09 +09:00
|
|
|
@foreach($informations as $info)
|
|
|
|
<a class="list-group-item" href="{{ route('info.show', ['id' => $info->id]) }}">
|
2019-02-09 00:17:12 +09:00
|
|
|
@if ($info->pinned)
|
|
|
|
<span class="badge badge-secondary"><span class="oi oi-pin"></span>ピン留め</span>
|
|
|
|
@endif
|
2017-11-03 20:38:09 +09:00
|
|
|
<span class="badge {{ $categories[$info->category]['class'] }}">{{ $categories[$info->category]['label'] }}</span> {{ $info->title }} <small class="text-secondary">- {{ $info->created_at->format('n月j日') }}</small>
|
|
|
|
</a>
|
|
|
|
@endforeach
|
|
|
|
<a href="{{ route('info') }}" class="list-group-item text-right">お知らせ一覧 »</a>
|
2017-10-23 00:03:24 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-02-09 00:17:12 +09:00
|
|
|
</div>
|
|
|
|
<div class="col-lg-8">
|
2019-02-09 02:34:53 +09:00
|
|
|
@if (!empty($globalEjaculationCounts))
|
|
|
|
<h5>チェックインの動向</h5>
|
2019-02-09 17:56:06 +09:00
|
|
|
<div class="w-100 mb-4 position-relative tis-global-count-graph">
|
2019-02-09 02:34:53 +09:00
|
|
|
<canvas id="global-count-graph"></canvas>
|
|
|
|
</div>
|
|
|
|
@endif
|
2018-01-07 22:19:33 +09:00
|
|
|
@if (!empty($publicLinkedEjaculations))
|
2019-02-09 00:50:33 +09:00
|
|
|
<h5 class="mb-3">お惣菜コーナー</h5>
|
|
|
|
<p class="text-secondary">最近の公開チェックインから、オカズリンク付きのものを表示しています。</p>
|
|
|
|
<ul class="list-group">
|
|
|
|
@foreach ($publicLinkedEjaculations as $ejaculation)
|
|
|
|
<li class="list-group-item no-side-border pt-3 pb-3 tis-word-wrap">
|
|
|
|
<!-- span -->
|
|
|
|
<div class="d-flex justify-content-between">
|
|
|
|
<h5>
|
|
|
|
<a href="{{ route('user.profile', ['id' => $ejaculation->user->name]) }}" class="text-dark"><img src="{{ $ejaculation->user->getProfileImageUrl(30) }}" width="30" height="30" class="rounded d-inline-block align-bottom"> {{ $ejaculation->user->display_name }}</a>
|
|
|
|
<a href="{{ route('checkin.show', ['id' => $ejaculation->id]) }}" class="text-muted"><small>{{ $ejaculation->ejaculated_date->format('Y/m/d H:i') }}</small></a>
|
|
|
|
</h5>
|
|
|
|
<div>
|
|
|
|
<a class="text-secondary timeline-action-item" href="{{ route('checkin', ['link' => $ejaculation->link, 'tags' => $ejaculation->textTags()]) }}"><span class="oi oi-reload" data-toggle="tooltip" data-placement="bottom" title="同じオカズでチェックイン"></span></a>
|
2018-01-07 22:19:33 +09:00
|
|
|
</div>
|
2019-02-09 00:50:33 +09:00
|
|
|
</div>
|
|
|
|
<!-- tags -->
|
|
|
|
@if ($ejaculation->tags->isNotEmpty())
|
|
|
|
<p class="mb-2">
|
|
|
|
@foreach ($ejaculation->tags as $tag)
|
|
|
|
<a class="badge badge-secondary" href="{{ route('search', ['q' => $tag->name]) }}"><span class="oi oi-tag"></span> {{ $tag->name }}</a>
|
|
|
|
@endforeach
|
|
|
|
</p>
|
|
|
|
@endif
|
|
|
|
<!-- okazu link -->
|
|
|
|
@if (!empty($ejaculation->link))
|
|
|
|
<div class="row mx-0">
|
2019-02-27 22:52:45 +09:00
|
|
|
@component('components.link-card', ['link' => $ejaculation->link])
|
2019-02-23 22:29:53 +09:00
|
|
|
@endcomponent
|
2019-02-09 00:50:33 +09:00
|
|
|
<p class="d-flex align-items-baseline mb-2 col-12 px-0">
|
|
|
|
<span class="oi oi-link-intact mr-1"></span><a class="overflow-hidden" href="{{ $ejaculation->link }}" target="_blank" rel="noopener">{{ $ejaculation->link }}</a>
|
2018-01-07 22:19:33 +09:00
|
|
|
</p>
|
2019-02-09 00:50:33 +09:00
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
<!-- note -->
|
|
|
|
@if (!empty($ejaculation->note))
|
|
|
|
<p class="mb-0 tis-word-wrap">
|
|
|
|
{!! Formatter::linkify(nl2br(e($ejaculation->note))) !!}
|
|
|
|
</p>
|
|
|
|
@endif
|
|
|
|
</li>
|
|
|
|
@endforeach
|
|
|
|
</ul>
|
2018-01-07 22:19:33 +09:00
|
|
|
@endif
|
2017-08-27 04:44:53 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
2018-01-07 22:19:33 +09:00
|
|
|
|
|
|
|
@push('script')
|
2019-02-09 02:34:53 +09:00
|
|
|
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/chart.js@2.7.1/dist/Chart.min.js"></script>
|
2018-01-07 22:19:33 +09:00
|
|
|
<script>
|
2019-02-10 20:48:16 +09:00
|
|
|
$('.link-card').linkCard({
|
|
|
|
endpoint: '{{ url('/api/checkin/card') }}'
|
2018-01-07 22:19:33 +09:00
|
|
|
});
|
2019-02-09 02:34:53 +09:00
|
|
|
|
2019-02-09 23:38:48 +09:00
|
|
|
new Chart(document.getElementById('global-count-graph').getContext('2d'), {
|
|
|
|
type: 'bar',
|
|
|
|
data: {
|
|
|
|
labels: @json(array_keys($globalEjaculationCounts)),
|
|
|
|
datasets: [{
|
|
|
|
data: @json(array_values($globalEjaculationCounts)),
|
|
|
|
backgroundColor: 'rgba(0, 0, 0, .1)',
|
|
|
|
borderColor: 'rgba(0, 0, 0, .25)',
|
|
|
|
borderWidth: 1
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
options: {
|
|
|
|
maintainAspectRatio: false,
|
|
|
|
legend: {
|
|
|
|
display: false
|
|
|
|
},
|
|
|
|
elements: {
|
|
|
|
line: {}
|
2019-02-09 02:34:53 +09:00
|
|
|
},
|
2019-02-09 23:38:48 +09:00
|
|
|
scales: {
|
|
|
|
xAxes: [{
|
2019-02-09 02:34:53 +09:00
|
|
|
display: false
|
2019-02-09 23:38:48 +09:00
|
|
|
}],
|
|
|
|
yAxes: [{
|
|
|
|
display: false,
|
|
|
|
ticks: {
|
|
|
|
beginAtZero: true
|
|
|
|
}
|
|
|
|
}]
|
2019-02-09 02:34:53 +09:00
|
|
|
}
|
2019-02-09 23:38:48 +09:00
|
|
|
}
|
|
|
|
});
|
2018-01-07 22:19:33 +09:00
|
|
|
</script>
|
|
|
|
@endpush
|