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