Revize 4c3f70c4
Přidáno uživatelem Jiří Noháč před téměř 5 roky(ů)
app/Http/Controllers/FavoriteArtefactsController.php | ||
---|---|---|
6 | 6 |
use Illuminate\Support\Facades\Auth; |
7 | 7 |
use App\User; |
8 | 8 |
use App\Artefact; |
9 |
use App\Http\Controllers\Image; |
|
9 | 10 |
|
10 | 11 |
class FavoriteArtefactsController extends Controller |
11 | 12 |
{ |
... | ... | |
28 | 29 |
$finalData = array(); |
29 | 30 |
foreach($list as $item) |
30 | 31 |
{ |
31 |
array_push($finalData, Artefact::where('id', $item->artefact_id)->get()); |
|
32 |
$tmp = Artefact::where('id', $item->artefact_id)->get(); |
|
33 |
$tmp['likes'] = Artefact::find($item->artefact_id)->users()->count(); |
|
34 |
array_push($finalData, $tmp); |
|
32 | 35 |
} |
33 | 36 |
|
34 | 37 |
$data = array( |
... | ... | |
60 | 63 |
$finalData = array(); |
61 | 64 |
foreach($list as $item) |
62 | 65 |
{ |
63 |
array_push($finalData, Artefact::where('id', $item->artefact_id)->get()); |
|
66 |
$tmp = Artefact::where('id', $item->artefact_id)->get(); |
|
67 |
$tmp['likes'] = Artefact::find($item->artefact_id)->users()->count(); |
|
68 |
array_push($finalData, $tmp); |
|
64 | 69 |
} |
65 | 70 |
|
66 | 71 |
$data = array( |
public/css/app.css | ||
---|---|---|
10882 | 10882 |
} |
10883 | 10883 |
} |
10884 | 10884 |
|
10885 |
@font-face { |
|
10886 |
font-family: "Avenir Black LINK"; |
|
10887 |
src: url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.eot"); |
|
10888 |
src: url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.eot?#iefix") format("embedded-opentype"), url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.woff2") format("woff2"), url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.woff") format("woff"), url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.ttf") format("truetype"), url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.svg#Avenir Black") format("svg"); |
|
10889 |
} |
|
10890 |
|
|
10891 |
@font-face { |
|
10892 |
font-family: "Avenir Roman LINK"; |
|
10893 |
src: url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.eot"); |
|
10894 |
src: url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.eot?#iefix") format("embedded-opentype"), url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.woff2") format("woff2"), url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.woff") format("woff"), url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.ttf") format("truetype"), url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.svg#Avenir") format("svg"); |
|
10895 |
} |
|
10896 |
|
|
10897 |
@font-face { |
|
10898 |
font-family: "Avenir Medium LINK"; |
|
10899 |
src: url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.eot"); |
|
10900 |
src: url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.eot?#iefix") format("embedded-opentype"), url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.woff2") format("woff2"), url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.woff") format("woff"), url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.ttf") format("truetype"), url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.svg#Avenir Medium") format("svg"); |
|
10901 |
} |
|
10902 |
|
|
10885 | 10903 |
body { |
10886 | 10904 |
background-color: #272727; |
10887 | 10905 |
} |
10888 | 10906 |
|
10889 | 10907 |
.head-title.text-center h1 { |
10890 | 10908 |
color: #ffffff; |
10891 |
font-family: Avenir;
|
|
10892 |
font-size: 60pt;
|
|
10909 |
font-family: "Avenir Black LINK";
|
|
10910 |
font-size: 45pt;
|
|
10893 | 10911 |
font-weight: bold; |
10894 | 10912 |
letter-spacing: 3px; |
10895 | 10913 |
} |
10896 | 10914 |
|
10915 |
h5 { |
|
10916 |
color: #efdab3; |
|
10917 |
font-family: "Avenir Medium LINK"; |
|
10918 |
line-height: 20pt; |
|
10919 |
font-size: 21pt; |
|
10920 |
} |
|
10921 |
|
|
10922 |
h6 { |
|
10923 |
color: #efdab3; |
|
10924 |
font-size: 14pt; |
|
10925 |
font-weight: lighter; |
|
10926 |
font-family: "Avenir Roman LINK"; |
|
10927 |
} |
|
10928 |
|
|
10929 |
img { |
|
10930 |
border: transparent; |
|
10931 |
border-radius: 1px; |
|
10932 |
} |
|
10933 |
|
|
10934 |
.card { |
|
10935 |
margin: 10px; |
|
10936 |
border: none !important; |
|
10937 |
} |
|
10938 |
|
|
10939 |
.left_panel_info { |
|
10940 |
margin-top: 20pt; |
|
10941 |
margin-left: -10pt; |
|
10942 |
max-width: 250px; |
|
10943 |
} |
|
10944 |
|
|
10945 |
.right_panel_info { |
|
10946 |
margin-top: 15pt; |
|
10947 |
} |
|
10948 |
|
|
10949 |
.card-cus-bottom { |
|
10950 |
background-color: #272727; |
|
10951 |
} |
|
10952 |
|
|
10897 | 10953 |
.bouton-image:before { |
10898 | 10954 |
content: ""; |
10899 | 10955 |
width: 100px; |
... | ... | |
10911 | 10967 |
border-color: transparent; |
10912 | 10968 |
} |
10913 | 10969 |
|
10970 |
.inter_info:before { |
|
10971 |
background-image: url(/images/Button_Info_60.png?fed957d534034a220f3fb939523ba297); |
|
10972 |
content: ""; |
|
10973 |
width: 60px; |
|
10974 |
height: 60px; |
|
10975 |
} |
|
10976 |
|
|
10977 |
.inter_info:focus, |
|
10978 |
.inter_info:active, |
|
10979 |
.inter_info:hover { |
|
10980 |
background-color: transparent !important; |
|
10981 |
border-color: transparent !important; |
|
10982 |
outline: none !important; |
|
10983 |
box-shadow: none !important; |
|
10984 |
} |
|
10985 |
|
|
10986 |
.inter_like:before, |
|
10987 |
.inter_like_filled:before { |
|
10988 |
background-image: url(/images/Hearth_Empty_60.png?07807b2bf7f8018c15473360e4cb97e0); |
|
10989 |
width: 60px; |
|
10990 |
height: 60px; |
|
10991 |
} |
|
10992 |
|
|
10993 |
.inter_like_filled:before { |
|
10994 |
background-image: url(/images/Hearth_Filled_60.png?e1a8e6298bf4fdce9b9592128ee82e81); |
|
10995 |
width: 60px; |
|
10996 |
height: 60px; |
|
10997 |
} |
|
10998 |
|
|
10999 |
.inter_like { |
|
11000 |
display: none; |
|
11001 |
} |
|
11002 |
|
|
11003 |
.inter_like:focus, |
|
11004 |
.inter_like:active, |
|
11005 |
.inter_like:hover { |
|
11006 |
background-color: transparent !important; |
|
11007 |
border-color: transparent !important; |
|
11008 |
outline: none !important; |
|
11009 |
box-shadow: none !important; |
|
11010 |
} |
|
11011 |
|
|
10914 | 11012 |
.monBouton:before { |
10915 | 11013 |
background-image: url(/images/Button_Arrow_Small.png?a8cfe4b884bf46d3f59113e2a5fb1c4c); |
10916 | 11014 |
} |
resources/sass/_custom.scss | ||
---|---|---|
1 | 1 |
// Ready for custom styling |
2 |
@font-face {font-family: "Avenir Black LINK"; src: url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.eot"); src: url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.eot?#iefix") format("embedded-opentype"), url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.woff2") format("woff2"), url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.woff") format("woff"), url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.ttf") format("truetype"), url("//db.onlinewebfonts.com/t/275de2221d9f0c4c9257d17f5a1e4006.svg#Avenir Black") format("svg"); } |
|
3 |
@font-face {font-family: "Avenir Roman LINK"; src: url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.eot"); src: url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.eot?#iefix") format("embedded-opentype"), url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.woff2") format("woff2"), url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.woff") format("woff"), url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.ttf") format("truetype"), url("//db.onlinewebfonts.com/t/1a045963159927274c92b0444fb83c17.svg#Avenir") format("svg"); } |
|
4 |
@font-face {font-family: "Avenir Medium LINK"; src: url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.eot"); src: url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.eot?#iefix") format("embedded-opentype"), url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.woff2") format("woff2"), url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.woff") format("woff"), url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.ttf") format("truetype"), url("//db.onlinewebfonts.com/t/0983e84d4a1963e075b5ae8ca12e2a4f.svg#Avenir Medium") format("svg"); } |
|
2 | 5 |
|
3 | 6 |
body |
4 | 7 |
{ |
... | ... | |
8 | 11 |
.head-title.text-center h1 |
9 | 12 |
{ |
10 | 13 |
color: $cusWhite; |
11 |
font-family: Avenir;
|
|
12 |
font-size: 60pt;
|
|
14 |
font-family: "Avenir Black LINK";
|
|
15 |
font-size: 45pt;
|
|
13 | 16 |
font-weight: bold; |
14 | 17 |
letter-spacing: 3px; |
15 | 18 |
} |
16 | 19 |
|
20 |
h5 |
|
21 |
{ |
|
22 |
color: $cusBrown2; |
|
23 |
font-family: "Avenir Medium LINK"; |
|
24 |
line-height: 20pt; |
|
25 |
font-size: 21pt; |
|
26 |
} |
|
27 |
|
|
28 |
h6 |
|
29 |
{ |
|
30 |
color: $cusBrown2; |
|
31 |
font-size: 14pt; |
|
32 |
font-weight: lighter; |
|
33 |
font-family: "Avenir Roman LINK"; |
|
34 |
} |
|
35 |
|
|
36 |
img |
|
37 |
{ |
|
38 |
border: transparent; |
|
39 |
border-radius: 1px; |
|
40 |
} |
|
41 |
|
|
42 |
.card |
|
43 |
{ |
|
44 |
margin: 10px; |
|
45 |
border: none !important; |
|
46 |
} |
|
47 |
|
|
48 |
.left_panel_info |
|
49 |
{ |
|
50 |
margin-top: 20pt; |
|
51 |
margin-left: -10pt; |
|
52 |
max-width: 250px; |
|
53 |
} |
|
54 |
|
|
55 |
.right_panel_info |
|
56 |
{ |
|
57 |
margin-top: 15pt; |
|
58 |
} |
|
59 |
|
|
60 |
.card-cus-bottom |
|
61 |
{ |
|
62 |
background-color: $cusBlack; |
|
63 |
} |
|
64 |
|
|
17 | 65 |
.bouton-image:before |
18 | 66 |
{ |
19 | 67 |
content: ""; |
... | ... | |
33 | 81 |
border-color: transparent; |
34 | 82 |
} |
35 | 83 |
|
84 |
.inter_info:before |
|
85 |
{ |
|
86 |
background-image : url(../images/interface/Button_Info_60.png); |
|
87 |
content: ""; |
|
88 |
width: 60px; |
|
89 |
height: 60px; |
|
90 |
} |
|
91 |
|
|
92 |
.inter_info:focus, .inter_info:active, .inter_info:hover{ |
|
93 |
background-color: transparent !important; |
|
94 |
border-color: transparent !important; |
|
95 |
outline: none !important; |
|
96 |
box-shadow: none !important; |
|
97 |
} |
|
98 |
|
|
99 |
.inter_like:before, .inter_like_filled:before |
|
100 |
{ |
|
101 |
background-image : url(../images/interface/Hearth_Empty_60.png); |
|
102 |
width: 60px; |
|
103 |
height: 60px; |
|
104 |
} |
|
105 |
|
|
106 |
.inter_like_filled:before |
|
107 |
{ |
|
108 |
background-image : url(../images/interface/Hearth_Filled_60.png); |
|
109 |
width: 60px; |
|
110 |
height: 60px; |
|
111 |
} |
|
112 |
|
|
113 |
.inter_like |
|
114 |
{ |
|
115 |
display: none; |
|
116 |
} |
|
117 |
|
|
118 |
|
|
119 |
.inter_like:focus, .inter_like:active, .inter_like:hover{ |
|
120 |
background-color: transparent !important; |
|
121 |
border-color: transparent !important; |
|
122 |
outline: none !important; |
|
123 |
box-shadow: none !important; |
|
124 |
} |
|
125 |
|
|
36 | 126 |
.monBouton:before |
37 | 127 |
{ |
38 | 128 |
background-image : url(../images/Button_Arrow_Small.png); |
resources/views/favartefacts/index.blade.php | ||
---|---|---|
1 |
@extends('layouts.app')
|
|
1 |
@extends('layouts.art')
|
|
2 | 2 |
|
3 | 3 |
@section('title', 'Favorite artefacts') |
4 | 4 |
|
5 |
@section('breadcrumb') |
|
6 |
<li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li> |
|
7 |
<li class="breadcrumb-item active" aria-current="page">Favorite artefacts</li> |
|
8 |
@endsection |
|
9 |
|
|
10 | 5 |
@section('content') |
11 |
<div class="jumbotron"> |
|
12 |
<div class="text-center"> |
|
13 |
<h1>Favorite artefacts</h1> |
|
14 |
<p> |
|
15 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. |
|
16 |
Mauris dolor felis, sagittis at, luctus sed, aliquam non, tellus. |
|
17 |
Fusce tellus odio, dapibus id fermentum quis, suscipit id erat. |
|
18 |
Morbi scelerisque luctus velit. Vivamus porttitor turpis ac leo. |
|
19 |
Morbi scelerisque luctus velit. |
|
20 |
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. |
|
21 |
</p> |
|
22 |
</div> |
|
23 |
</div> |
|
24 | 6 |
{{--<p>The id of the user is {{$user->id}}</p>--}} |
25 | 7 |
@if(isset($artefacts)) |
26 | 8 |
@if(count($artefacts) >= 1) |
27 | 9 |
@foreach($artefacts as $artefact) |
28 | 10 |
<div class="artefacts-area mb-5"> |
29 | 11 |
<div class="card"> |
30 |
<svg class="bd-placeholder-img card-img-top" width="100%" height="180" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: Image cap"><title>Placeholder</title><rect width="100%" height="100%" fill="#868e96"></rect><text x="45%" y="50%" fill="#dee2e6" dy=".3em">Artefact image</text></svg> |
|
31 |
<div class="card-body"> |
|
32 |
<h5 class="card-title"><a href="{{ url('/artefact/' . $artefact[0]->id) }}">{{$artefact[0]->name}}</a> - {{$artefact[0]->author}}</h5> |
|
33 |
<h6 class="card-subtitle mb-2 text-muted">{{$artefact[0]->year}}, {{$artefact[0]->pages}} pages</h6> |
|
34 |
<p class="card-text"> |
|
35 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. |
|
36 |
Mauris dolor felis, sagittis at, luctus sed, aliquam non, tellus. |
|
37 |
Fusce tellus odio, dapibus id fermentum quis, suscipit id erat. |
|
38 |
Morbi scelerisque luctus velit. Vivamus porttitor turpis ac leo. |
|
39 |
Morbi scelerisque luctus velit. |
|
40 |
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. |
|
41 |
</p> |
|
12 |
{{--<svg class="bd-placeholder-img card-img-top" width="100%" height="180" src="{{asset('images/artefacts/book_cover_01.jpg')}}" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: Image cap"><title>{{$artefact[0]->name}}</title><rect width="100%" height="100%" fill="#868e96"></rect><text x="45%" y="50%" fill="#dee2e6" dy=".3em"></text></svg>--}} |
|
13 |
<a href="{{ url('/artefact/' . $artefact[0]->id) }}"> |
|
14 |
<img class="card-img-top" src="{{asset('images/artefacts/book_cover_01.jpg')}}" width="100%" height=auto> |
|
15 |
</a> |
|
16 |
<div class="container card-cus-bottom"> |
|
17 |
<div class="flex-row row-list"> |
|
18 |
<div class="col-xs-2 float-left left_panel_info"> |
|
19 |
<h5 class="card-title ">{{$artefact[0]->name}}</h5> |
|
20 |
<h6 class="card-title">{{$artefact[0]->author}}</h6> |
|
21 |
</div> |
|
22 |
<div class="col-xs-2 float-right right_panel_info"> |
|
23 |
<div class="float-left"> |
|
24 |
<button id="info_butt_{{$artefact[0]->id}}" type="button" class="btn btn-primary bouton-image inter_info"></button> |
|
25 |
</div> |
|
26 |
<div class="float-right text-center"> |
|
27 |
<button id="like_butt_{{$artefact[0]->id}}" onclick="myFunction({{$artefact[0]->id}}, 1)" type="button" class="btn btn-primary bouton-image inter_like"></button> |
|
28 |
<button id="like_butt2_{{$artefact[0]->id}}" onclick="myFunction({{$artefact[0]->id}}, 0)" type="button" class="btn btn-primary bouton-image inter_like_filled"></button> |
|
29 |
<span class="likes_text"> |
|
30 |
<h6>{{$artefact['likes']}}</h6> |
|
31 |
</span> |
|
32 |
</div> |
|
33 |
</div> |
|
34 |
</div> |
|
42 | 35 |
</div> |
43 | 36 |
</div> |
44 | 37 |
</div> |
... | ... | |
57 | 50 |
</li> |
58 | 51 |
</ul> |
59 | 52 |
@endif |
53 |
<script> |
|
54 |
function myFunction(id, type) |
|
55 |
{ |
|
56 |
if(type === 1) |
|
57 |
{ |
|
58 |
$('#like_butt_' + id).css('display', "none"); |
|
59 |
$('#like_butt2_' + id).css('display', "inline"); |
|
60 |
} |
|
61 |
else |
|
62 |
{ |
|
63 |
$('#like_butt_' + id).css('display', "inline"); |
|
64 |
$('#like_butt2_' + id).css('display', "none"); |
|
65 |
} |
|
66 |
} |
|
67 |
</script> |
|
60 | 68 |
@endsection |
Také k dispozici: Unified diff
Issue #7845 @2h
Oprava designu seznamu artefaktu. Pridany obrazky, styl textu, pridana tlacitka na info a take "likey". Like jiz take maji hotovou animaci stisknuti. Dale je nutne dodelat akcni schopnosti informacniho tlacitka a like tlacitka.