1 |
0218d5c7
|
Adam Mištera
|
@foreach($artefacts as $artefact)
|
2 |
|
|
<div class="container books-component">
|
3 |
|
|
<div class="row mt-5">
|
4 |
|
|
|
5 |
|
|
<div class="col-md-6 book-area">
|
6 |
|
|
@if (!is_null($artefact))
|
7 |
|
|
<div class="artefact-area">
|
8 |
|
|
<div class="card">
|
9 |
|
|
<a href="#imageModal" data-toggle="modal">
|
10 |
|
|
<img class="card-img-top" src="{{asset('images/artefacts/book_cover_01.jpg')}}" width="100%" height=auto alt="book_cover">
|
11 |
|
|
</a>
|
12 |
|
|
<div class="card-cus-bottom">
|
13 |
9f8ab8cc
|
Adam Mištera
|
<a class="book-arrow book-arrow-left artefact-link previous-artefact {{$artefacts->onFirstPage() ? "invisible" : "visible"}}" href="{{$artefacts->previousPageUrl()}}"></a>
|
14 |
0218d5c7
|
Adam Mištera
|
<div class="likes">
|
15 |
|
|
@if ($artefact->favourite)
|
16 |
|
|
<a href="{{ action('ArtefactController@unlike', ['id' => $artefact->id]) }}">
|
17 |
|
|
<button id="like_butt_{{$artefact->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button>
|
18 |
|
|
</a>
|
19 |
|
|
@else
|
20 |
|
|
<a href="{{ action('ArtefactController@like', ['id' => $artefact->id]) }}">
|
21 |
|
|
<button id="like_butt_{{$artefact->id}}" type="button" class="btn btn-primary button-image inter_like"></button>
|
22 |
|
|
</a>
|
23 |
|
|
@endif
|
24 |
|
|
<h6 class="artefact-likes">{{$artefact->likes}}</h6>
|
25 |
|
|
</div>
|
26 |
9f8ab8cc
|
Adam Mištera
|
<a class="book-arrow book-arrow-right artefact-link next-artefact {{$artefacts->hasMorePages() ? "visible" : "invisible"}}" href="{{$artefacts->nextPageUrl()}}"></a>
|
27 |
0218d5c7
|
Adam Mištera
|
</div>
|
28 |
|
|
</div>
|
29 |
|
|
</div>
|
30 |
|
|
@endif
|
31 |
|
|
</div>
|
32 |
|
|
|
33 |
|
|
<div class="col-md-6 info-area">
|
34 |
|
|
<div class="artefact-info">
|
35 |
|
|
<h3 class="switch-view"><a onclick="switchView()">notes</a></h3>
|
36 |
|
|
<h3 class="artefact-name">{{$artefact->name}}</h3>
|
37 |
|
|
<h4 class="artefact-author">{{$artefact->author}}</h4>
|
38 |
|
|
<p>
|
39 |
|
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tincidunt, ex id blandit placerat, dolor nibh venenatis dui, nec malesuada odio sem a leo. Nunc vulputate augue neque.
|
40 |
|
|
Donec pulvinar sollicitudin arcu eget sagittis. Sed auctor, enim vel facilisis sodales, felis tellus rutrum quam, ac feugiat leo mauris ac purus. Nam placerat sed risus ut suscipit.
|
41 |
|
|
Sed rutrum arcu eget mi fermentum ultrices. Donec egestas volutpat eros, ut tincidunt dolor pulvinar vitae.
|
42 |
|
|
</p>
|
43 |
|
|
<p>
|
44 |
|
|
Curabitur sem elit, imperdiet ac laoreet vitae, rhoncus quis risus. Suspendisse varius dolor sem, at egestas massa suscipit non.
|
45 |
|
|
Morbi sit amet dictum metus, sit amet sollicitudin nibh. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc mattis leo convallis aliquam scelerisque.
|
46 |
|
|
Praesent vulputate porttitor quam at egestas. Proin eget orci ligula. Aenean malesuada, eros vitae convallis sagittis, neque leo ullamcorper ante, eu ultricies justo justo in lacus.
|
47 |
|
|
</p>
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
</div>
|
51 |
|
|
|
52 |
|
|
<div class="artefact-notes">
|
53 |
|
|
<button type="button" class="btn btn-primary button-image inter_info" onclick="switchView()"></button>
|
54 |
|
|
<h3 class="artefact-name">{{$artefact->name}}</h3>
|
55 |
|
|
<h4 class="artefact-author">{{$artefact->author}}</h4>
|
56 |
|
|
@if(count($artefact->metadata) > 0)
|
57 |
|
|
@foreach($artefact->metadata as $meta)
|
58 |
|
|
<div id="row_{{$meta->id}}" class="row text-page">
|
59 |
|
|
<div class="pin-horizontal">
|
60 |
|
|
<div class="metadata">
|
61 |
|
|
<span>page {{$meta->page}}</span>
|
62 |
|
|
<a href="#meta_{{$meta->id}}" class="arrow-down" data-toggle="collapse" data-target="#meta_{{$meta->id}}" onclick="openNote('#row_{{$meta->id}}')"></a>
|
63 |
|
|
</div>
|
64 |
|
|
</div>
|
65 |
|
|
<div id="meta_{{$meta->id}}" class="metadata-text collapse">
|
66 |
|
|
<p>
|
67 |
|
|
{{$meta->noteEN}}
|
68 |
|
|
</p>
|
69 |
|
|
<div class="text-center">
|
70 |
|
|
@if ($meta->favourite)
|
71 |
|
|
<a href="{{ action('DetailsController@unlike', ['id' => $meta->id]) }}">
|
72 |
|
|
<button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button>
|
73 |
|
|
</a>
|
74 |
|
|
@else
|
75 |
|
|
<a href="{{ action('DetailsController@like', ['id' => $meta->id]) }}">
|
76 |
|
|
<button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like"></button>
|
77 |
|
|
</a>
|
78 |
|
|
@endif
|
79 |
|
|
</div>
|
80 |
|
|
</div>
|
81 |
|
|
</div>
|
82 |
|
|
|
83 |
|
|
@endforeach
|
84 |
|
|
@else
|
85 |
|
|
<h2>No favourite metadata yet!</h2>
|
86 |
|
|
@endif
|
87 |
|
|
</div>
|
88 |
|
|
</div>
|
89 |
|
|
</div>
|
90 |
|
|
</div>
|
91 |
|
|
@endforeach
|
92 |
|
|
|
93 |
|
|
<!-- Image modal -->
|
94 |
|
|
<div class="modal image-modal fade" id="imageModal" tabindex="-1" role="dialog">
|
95 |
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
96 |
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
97 |
|
|
<span aria-hidden="true">×</span>
|
98 |
|
|
</button>
|
99 |
|
|
<div class="modal-content">
|
100 |
|
|
<img class="card-img-top" src="{{asset('images/artefacts/book_cover_01.jpg')}}" width="100%" height=auto alt="book_cover">
|
101 |
|
|
</div>
|
102 |
|
|
</div>
|
103 |
|
|
</div>
|
104 |
|
|
|
105 |
|
|
<script>
|
106 |
|
|
function switchView()
|
107 |
|
|
{
|
108 |
|
|
let info = $('.artefact-info');
|
109 |
|
|
let notes = $('.artefact-notes');
|
110 |
|
|
|
111 |
|
|
if (notes.css('display') === 'none')
|
112 |
|
|
{
|
113 |
|
|
notes.css('display', 'block');
|
114 |
|
|
info.css('display', 'none');
|
115 |
|
|
|
116 |
|
|
let parent_width = notes.width();
|
117 |
|
|
|
118 |
|
|
$(".metadata").each(function() {
|
119 |
|
|
let metadata = $(this);
|
120 |
|
|
let width = metadata.width();
|
121 |
|
|
|
122 |
|
|
metadata.css("margin-left", (parent_width / 2) - width);
|
123 |
|
|
});
|
124 |
|
|
}
|
125 |
|
|
else
|
126 |
|
|
{
|
127 |
|
|
notes.css('display', 'none');
|
128 |
|
|
info.css('display', 'block');
|
129 |
|
|
}
|
130 |
|
|
}
|
131 |
|
|
|
132 |
|
|
function openNote(element)
|
133 |
|
|
{
|
134 |
|
|
let metadata = $(element);
|
135 |
|
|
let showed = metadata.find(".metadata-text").hasClass('show');
|
136 |
|
|
|
137 |
|
|
if (showed === false)
|
138 |
|
|
{
|
139 |
|
|
metadata.find('.pin-horizontal').addClass("white-pin");
|
140 |
|
|
}
|
141 |
|
|
else
|
142 |
|
|
{
|
143 |
|
|
metadata.find('.pin-horizontal').removeClass("white-pin");
|
144 |
|
|
}
|
145 |
|
|
|
146 |
|
|
}
|
147 |
|
|
</script>
|