Revize 26e128a8
Přidáno uživatelem Adam Mištera před téměř 5 roky(ů)
app/Http/Controllers/FavoriteMetadataController.php | ||
---|---|---|
16 | 16 |
$this->middleware('auth'); |
17 | 17 |
} |
18 | 18 |
|
19 |
/** |
|
20 |
* Show list of favourite metadata. |
|
21 |
* |
|
22 |
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
23 |
*/ |
|
19 | 24 |
public function index() |
20 | 25 |
{ |
21 | 26 |
$metadata = User::find(Auth::id())->likesMetadata()->orderBy(self::ORDER_COLUMN)->get(); |
... | ... | |
27 | 32 |
return view('favmetadata.index', ['metadata' => $metadata]); |
28 | 33 |
} |
29 | 34 |
|
35 |
/** |
|
36 |
* Unlike metadata given by its id. |
|
37 |
* |
|
38 |
* @param $id int id of metadata |
|
39 |
* @return \Illuminate\Http\RedirectResponse |
|
40 |
*/ |
|
41 |
public function unlike($id) |
|
42 |
{ |
|
43 |
$user = User::find(Auth::id()); |
|
44 |
$metadata = Metadata::find($id); |
|
45 |
|
|
46 |
$user->likesMetadata()->detach($metadata); |
|
47 |
|
|
48 |
return back()->withInput(); |
|
49 |
} |
|
50 |
|
|
30 | 51 |
} |
public/css/app.css | ||
---|---|---|
10885 | 10885 |
body { |
10886 | 10886 |
background-color: #272727; |
10887 | 10887 |
font-family: Nunito; |
10888 |
/*.form-control:focus { |
|
10889 |
background-color: $theme-color-five; |
|
10890 |
margin-top: -1px; |
|
10891 |
border-top-color: $theme-color-five; |
|
10892 |
border-left-color: $theme-color-five; |
|
10893 |
border-right-color: $theme-color-five; |
|
10894 |
border-bottom-color: 0.5pt $theme-color-one; |
|
10895 |
color: $theme-color-one; |
|
10896 |
box-shadow: none; |
|
10897 |
font-size: 8pt; |
|
10888 |
/*input:-internal-autofill-selected{ |
|
10889 |
|
|
10898 | 10890 |
}*/ |
10899 |
/*footer { |
|
10900 |
background: $theme-color-four; |
|
10901 |
color: $theme-color-five; |
|
10902 |
display: block; |
|
10903 |
height: 50px; |
|
10904 |
position: fixed; |
|
10905 |
left: 0; |
|
10906 |
bottom: 0; |
|
10907 |
width: 100%; |
|
10891 |
/*.content { |
|
10892 |
position: relative; |
|
10893 |
|
|
10894 |
//Circle style button |
|
10895 |
.btn-circle.rounded-circle { |
|
10896 |
padding: 6px 0px; |
|
10897 |
font-size: 16px; |
|
10898 |
text-align: center; |
|
10899 |
} |
|
10900 |
.btn-categories |
|
10901 |
{ |
|
10902 |
position: absolute; |
|
10903 |
border-width: 5px; |
|
10904 |
background-color: $theme-color-five; |
|
10905 |
border-color: $theme-color-four; |
|
10906 |
color:$theme-color-four; |
|
10907 |
outline: none !important; |
|
10908 |
box-shadow: none !important; |
|
10909 |
font-weight: $font-weight-two; |
|
10910 |
|
|
10911 |
&:active |
|
10912 |
{ |
|
10913 |
background-color: $theme-color-three; |
|
10914 |
border-color: $theme-color-four; |
|
10915 |
outline: none !important; |
|
10916 |
box-shadow: none !important; |
|
10917 |
color:$theme-color-five; |
|
10918 |
} |
|
10919 |
} |
|
10908 | 10920 |
}*/ |
10909 | 10921 |
} |
10910 | 10922 |
|
... | ... | |
10957 | 10969 |
background-color: rgba(239, 218, 179, 0.5); |
10958 | 10970 |
} |
10959 | 10971 |
|
10960 |
body .carousel .carousel-caption p { |
|
10961 |
font-size: 8pt; |
|
10962 |
color: #272727; |
|
10963 |
} |
|
10964 |
|
|
10965 | 10972 |
body .text { |
10966 | 10973 |
font-weight: 400; |
10967 | 10974 |
font-size: 8pt; |
... | ... | |
11023 | 11030 |
|
11024 | 11031 |
body .auth .col-form-label { |
11025 | 11032 |
text-align: left; |
11026 |
padding-top: 0px;
|
|
11027 |
padding-bottom: 0px;
|
|
11033 |
padding-top: 0; |
|
11034 |
padding-bottom: 0; |
|
11028 | 11035 |
} |
11029 | 11036 |
|
11030 | 11037 |
body .auth .form-control { |
11031 |
padding: 0px;
|
|
11038 |
padding: 0; |
|
11032 | 11039 |
height: 17pt; |
11033 |
border-radius: 0%; |
|
11040 |
border-radius: 0; |
|
11041 |
} |
|
11042 |
|
|
11043 |
body input:-webkit-autofill { |
|
11044 |
-webkit-box-shadow: 0 0 0 50px #272727 inset; |
|
11045 |
-webkit-text-fill-color: #ffffff; |
|
11046 |
} |
|
11047 |
|
|
11048 |
body input:-webkit-autofill:active, |
|
11049 |
body input:-webkit-autofill:focus, |
|
11050 |
body input:-webkit-autofill:visited, |
|
11051 |
body input:-webkit-autofill:hover { |
|
11052 |
-webkit-box-shadow: 0 0 0 50px #272727 inset; |
|
11053 |
-webkit-text-fill-color: #ffffff; |
|
11034 | 11054 |
} |
11035 | 11055 |
|
11036 | 11056 |
body .card-body { |
... | ... | |
11090 | 11110 |
|
11091 | 11111 |
body .button-square:active, |
11092 | 11112 |
body .button-square:focus, |
11093 |
body .button-square:visited { |
|
11113 |
body .button-square:visited, |
|
11114 |
body .button-square:hover { |
|
11094 | 11115 |
outline: none; |
11095 | 11116 |
box-shadow: none; |
11117 |
color: #ffffff; |
|
11118 |
} |
|
11119 |
|
|
11120 |
body .button-square:hover { |
|
11121 |
color: #ead4b0; |
|
11096 | 11122 |
} |
11097 | 11123 |
|
11098 | 11124 |
body .pin-left:before { |
... | ... | |
11110 | 11136 |
body .pin-left { |
11111 | 11137 |
border-left: 0.5pt solid #ead4b0; |
11112 | 11138 |
display: inline-block; |
11113 |
margin: 10rem 50px 0px -5rem;
|
|
11139 |
margin: 12rem 50px 0px -5rem;
|
|
11114 | 11140 |
position: fixed; |
11115 | 11141 |
top: 0; |
11116 | 11142 |
bottom: 0; |
... | ... | |
11123 | 11149 |
} |
11124 | 11150 |
|
11125 | 11151 |
body .pin-left p { |
11126 |
margin-top: 0pt; |
|
11127 |
margin-bottom: 0pt; |
|
11152 |
margin-top: 0; |
|
11153 |
margin-bottom: 0; |
|
11154 |
} |
|
11155 |
|
|
11156 |
body .register .pin-left { |
|
11157 |
margin-top: 17rem; |
|
11128 | 11158 |
} |
11129 | 11159 |
|
11130 | 11160 |
body li { |
... | ... | |
11320 | 11350 |
color: #ddd1b9; |
11321 | 11351 |
border-bottom: 0.042rem solid #ddd1b9; |
11322 | 11352 |
display: inline-block; |
11323 |
margin: 3.35rem 3.125rem 0 0;
|
|
11353 |
margin: 2.75rem 3.125rem 0 0;
|
|
11324 | 11354 |
} |
11325 | 11355 |
|
11326 | 11356 |
body .metadata-area .pin-horizontal:before { |
... | ... | |
11395 | 11425 |
} |
11396 | 11426 |
|
11397 | 11427 |
body .metadata-area .metadata-text .artefact-info .inter_like_filled:before { |
11398 |
background-image: url(/images/Hearth_Filled_50.png?77bb26c3aba063c00aba1a2f07059d71); |
|
11399 |
width: 50px; |
|
11400 |
height: 50px; |
|
11428 |
background-image: url(/images/Heart_Filled.svg?e5b962dc0fd67a2042277b9826016c9c); |
|
11429 |
width: 3.125rem; |
|
11430 |
height: 3.125rem; |
|
11431 |
margin-right: 0; |
|
11401 | 11432 |
} |
11402 | 11433 |
|
11403 | 11434 |
body .metadata-area .metadata-text .artefact-info .inter_like_filled:hover, |
... | ... | |
11409 | 11440 |
box-shadow: none !important; |
11410 | 11441 |
} |
11411 | 11442 |
|
11412 |
body .content { |
|
11413 |
position: relative; |
|
11414 |
} |
|
11415 |
|
|
11416 |
body .content .btn-circle.rounded-circle { |
|
11417 |
padding: 6px 0px; |
|
11418 |
font-size: 16px; |
|
11419 |
text-align: center; |
|
11420 |
} |
|
11421 |
|
|
11422 |
body .content .btn-categories { |
|
11423 |
position: absolute; |
|
11424 |
border-width: 5px; |
|
11425 |
background-color: #272727; |
|
11426 |
border-color: #ead4b0; |
|
11427 |
color: #ead4b0; |
|
11428 |
outline: none !important; |
|
11429 |
box-shadow: none !important; |
|
11430 |
font-weight: 600; |
|
11431 |
} |
|
11432 |
|
|
11433 |
body .content .btn-categories:active { |
|
11434 |
background-color: #efdab3; |
|
11435 |
border-color: #ead4b0; |
|
11436 |
outline: none !important; |
|
11437 |
box-shadow: none !important; |
|
11438 |
color: #272727; |
|
11439 |
} |
|
11440 |
|
|
11441 | 11443 |
body .cat-col-md-2 { |
11442 | 11444 |
margin: 2%; |
11443 | 11445 |
} |
... | ... | |
11496 | 11498 |
|
11497 | 11499 |
.sidenav { |
11498 | 11500 |
height: 100%; |
11499 |
width: 0; |
|
11500 | 11501 |
width: 250px; |
11501 | 11502 |
position: fixed; |
11502 | 11503 |
z-index: 1; |
... | ... | |
11525 | 11526 |
} |
11526 | 11527 |
} |
11527 | 11528 |
|
11528 |
@media (max-width: 990px) { |
|
11529 |
body { |
|
11530 |
/*.pin-left { |
|
11531 |
margin-left: -15rem; |
|
11532 |
margin-top: 11rem; |
|
11533 |
}*/ |
|
11534 |
} |
|
11535 |
} |
|
11536 |
|
|
11537 | 11529 |
@media (max-width: 770px) { |
11538 | 11530 |
body .pin-left { |
11539 | 11531 |
margin-left: -33vw; |
11540 |
margin-top: 12rem; |
|
11532 |
margin-top: 15rem; |
|
11533 |
} |
|
11534 |
|
|
11535 |
body .register .pin-left { |
|
11536 |
margin-top: 20rem; |
|
11541 | 11537 |
} |
11542 | 11538 |
} |
11543 | 11539 |
|
... | ... | |
11552 | 11548 |
white-space: nowrap; |
11553 | 11549 |
} |
11554 | 11550 |
|
11555 |
.btn-circle.rounded-circle.btn-sm,
|
|
11556 |
.btn-group-sm > .btn-circle.rounded-circle.btn {
|
|
11557 |
width: 90px; |
|
11558 |
height: 90px; |
|
11551 |
/*.btn-circle.rounded-circle.btn-sm
|
|
11552 |
{ |
|
11553 |
width: 90px;
|
|
11554 |
height: 90px;
|
|
11559 | 11555 |
} |
11560 | 11556 |
|
11561 |
.btn-circle.rounded-circle.btn-dm { |
|
11562 |
width: 130px; |
|
11563 |
height: 130px; |
|
11557 |
.btn-circle.rounded-circle.btn-dm |
|
11558 |
{ |
|
11559 |
width: 130px; |
|
11560 |
height: 130px; |
|
11564 | 11561 |
} |
11565 | 11562 |
|
11566 |
.btn-circle.rounded-circle.btn-xl { |
|
11567 |
width: 180px; |
|
11568 |
height: 180px; |
|
11569 |
} |
|
11563 |
.btn-circle.rounded-circle.btn-xl |
|
11564 |
{ |
|
11565 |
width: 180px; |
|
11566 |
height: 180px; |
|
11567 |
}*/ |
|
11570 | 11568 |
|
11571 | 11569 |
body .carousel .carousel-inner .social-logo { |
11572 | 11570 |
padding-left: 30px; |
public/images/Heart_Filled.svg | ||
---|---|---|
1 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 29.14 22.03"><defs><style>.cls-1{fill:#f7dbc0;}</style></defs><title>Datový zdroj 2</title><g id="Vrstva_2" data-name="Vrstva 2"><g id="Vrstva_1-2" data-name="Vrstva 1"><path class="cls-1" d="M14.57,22S27,12.66,27.88,11.25c2.15-3.54,2-9.09-4-10.93-5.44-1.68-9.3,3.84-9.3,3.84S10.71-1.36,5.27.32c-6,1.84-6.16,7.39-4,10.93C2.13,12.66,14.57,22,14.57,22Z"/></g></g></svg> |
resources/images/interface/Heart_Empty.svg | ||
---|---|---|
1 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30.14 23.15"><defs><style>.cls-1{fill:none;stroke:#f7dbc0;stroke-miterlimit:10;}</style></defs><title>Datový zdroj 1</title><g id="Vrstva_2" data-name="Vrstva 2"><g id="Vrstva_1-2" data-name="Vrstva 1"><path class="cls-1" d="M15.07,22.53s12.44-9.37,13.31-10.78c2.15-3.54,2-9.09-4-10.93-5.44-1.68-9.3,3.84-9.3,3.84S11.21-.86,5.77.82c-6,1.84-6.16,7.39-4,10.93C2.63,13.16,15.07,22.53,15.07,22.53Z"/></g></g></svg> |
resources/images/interface/Heart_Filled.svg | ||
---|---|---|
1 |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 29.14 22.03"><defs><style>.cls-1{fill:#f7dbc0;}</style></defs><title>Datový zdroj 2</title><g id="Vrstva_2" data-name="Vrstva 2"><g id="Vrstva_1-2" data-name="Vrstva 1"><path class="cls-1" d="M14.57,22S27,12.66,27.88,11.25c2.15-3.54,2-9.09-4-10.93-5.44-1.68-9.3,3.84-9.3,3.84S10.71-1.36,5.27.32c-6,1.84-6.16,7.39-4,10.93C2.13,12.66,14.57,22,14.57,22Z"/></g></g></svg> |
resources/sass/_custom.scss | ||
---|---|---|
428 | 428 |
color: $theme-color-two; |
429 | 429 |
border-bottom: .042rem solid $theme-color-two; |
430 | 430 |
display: inline-block; |
431 |
margin: 3.35rem 3.125rem 0 0;
|
|
431 |
margin: 2.75rem 3.125rem 0 0;
|
|
432 | 432 |
|
433 | 433 |
&:before { |
434 | 434 |
content: ''; |
... | ... | |
505 | 505 |
.inter_like_filled { |
506 | 506 |
|
507 | 507 |
&:before { |
508 |
background-image : url(../images/interface/Hearth_Filled_50.png); |
|
509 |
width: 50px; |
|
510 |
height: 50px; |
|
508 |
background-image : url(../images/interface/Heart_Filled.svg); |
|
509 |
width: 3.125rem; |
|
510 |
height: 3.125rem; |
|
511 |
margin-right: 0; |
|
511 | 512 |
} |
512 | 513 |
|
513 | 514 |
&:hover, &:focus, &:active { |
resources/views/favmetadata/index.blade.php | ||
---|---|---|
25 | 25 |
</div> |
26 | 26 |
</div> |
27 | 27 |
<div id="meta_{{$meta->id}}" class="metadata-text collapse"> |
28 |
{{$meta->noteEN}} |
|
28 |
<p> |
|
29 |
{{$meta->noteEN}} |
|
30 |
</p> |
|
29 | 31 |
<div class="artefact-info"> |
30 | 32 |
<div class="artefact-name"> |
31 | 33 |
{{$meta->artefact->name}} |
... | ... | |
34 | 36 |
{{$meta->artefact->author}} |
35 | 37 |
</div> |
36 | 38 |
<div class="text-center"> |
37 |
<button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button> |
|
39 |
<a href="{{ action('FavoriteMetadataController@unlike', ['id' => $meta->id]) }}"> |
|
40 |
<button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button> |
|
41 |
</a> |
|
38 | 42 |
</div> |
39 | 43 |
</div> |
40 | 44 |
</div> |
resources/views/pages/index.blade.php | ||
---|---|---|
52 | 52 |
</a> --> |
53 | 53 |
<!-- <a class="carousel-control-next" href="#homepage_carousel" role="button" data-slide="next"> |
54 | 54 |
<span class="carousel-control-next-icon" aria-hidden="true"></span> |
55 |
<span class="sr-only">Next</span> -->
|
|
56 |
</a> |
|
55 |
<span class="sr-only">Next</span> |
|
56 |
</a> -->
|
|
57 | 57 |
</div> |
58 | 58 |
@endsection |
routes/web.php | ||
---|---|---|
22 | 22 |
Route::resource('/categories', 'CategoriesController', array('only' => array('index'))); |
23 | 23 |
Route::resource('/favartefacts', 'FavoriteArtefactsController', array('only' => array('index', 'show', 'store'))); |
24 | 24 |
Route::get('/favmetadata', 'FavoriteMetadataController@index'); |
25 |
Route::get('/favmetadata/unlike/{id}', 'FavoriteMetadataController@unlike'); |
|
25 | 26 |
|
26 | 27 |
|
27 | 28 |
Auth::routes(); |
Také k dispozici: Unified diff
Issue #7999 @1h
[+] Přidání vektorového srdce
[+] Oprava stylování, refraktoring, obalení textu poznámky tagem <p>
[+] Zprovoznění unlikování metadat, přidání komentářů