commit 26e128a87d0947832adba72eeb6593d88e234521
Author: Adam Mištera <amistera@students.zcu.cz>
Date:   Mon May 4 21:43:58 2020 +0200

    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ářů

diff --git a/app/Http/Controllers/FavoriteMetadataController.php b/app/Http/Controllers/FavoriteMetadataController.php
index 0597ec7..00b5369 100644
--- a/app/Http/Controllers/FavoriteMetadataController.php
+++ b/app/Http/Controllers/FavoriteMetadataController.php
@@ -16,6 +16,11 @@ class FavoriteMetadataController extends Controller
         $this->middleware('auth');
     }
 
+    /**
+     * Show list of favourite metadata.
+     *
+     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
+     */
     public function index()
     {
         $metadata = User::find(Auth::id())->likesMetadata()->orderBy(self::ORDER_COLUMN)->get();
@@ -27,4 +32,20 @@ class FavoriteMetadataController extends Controller
         return view('favmetadata.index', ['metadata' => $metadata]);
     }
 
+    /**
+     * Unlike metadata given by its id.
+     *
+     * @param $id int id of metadata
+     * @return \Illuminate\Http\RedirectResponse
+     */
+    public function unlike($id)
+    {
+        $user = User::find(Auth::id());
+        $metadata = Metadata::find($id);
+
+        $user->likesMetadata()->detach($metadata);
+
+        return back()->withInput();
+    }
+
 }
diff --git a/public/css/app.css b/public/css/app.css
index 2eb50e9..922e3b3 100644
--- a/public/css/app.css
+++ b/public/css/app.css
@@ -10885,26 +10885,38 @@ a.text-dark:focus {
 body {
   background-color: #272727;
   font-family: Nunito;
-  /*.form-control:focus {
-      background-color: $theme-color-five;
-      margin-top: -1px;
-      border-top-color: $theme-color-five;
-      border-left-color: $theme-color-five;
-      border-right-color: $theme-color-five;
-      border-bottom-color: 0.5pt $theme-color-one;
-      color: $theme-color-one;
-      box-shadow: none;
-      font-size: 8pt;
+  /*input:-internal-autofill-selected{
+
   }*/
-  /*footer {
-      background: $theme-color-four;
-      color: $theme-color-five;
-      display: block;
-      height: 50px;
-      position: fixed;
-      left: 0;
-      bottom: 0;
-      width: 100%;
+  /*.content {
+      position: relative;
+
+      //Circle style button
+      .btn-circle.rounded-circle {
+          padding: 6px 0px;
+          font-size: 16px;
+          text-align: center;
+      }
+      .btn-categories
+      {
+          position: absolute;
+          border-width: 5px;
+          background-color: $theme-color-five;
+          border-color: $theme-color-four;
+          color:$theme-color-four;
+          outline: none !important;
+          box-shadow: none !important;
+          font-weight: $font-weight-two;
+
+          &:active
+          {
+              background-color: $theme-color-three;
+              border-color: $theme-color-four;
+              outline: none !important;
+              box-shadow: none !important;
+              color:$theme-color-five;
+          }
+      }
   }*/
 }
 
@@ -10957,11 +10969,6 @@ body .carousel .carousel-caption {
   background-color: rgba(239, 218, 179, 0.5);
 }
 
-body .carousel .carousel-caption p {
-  font-size: 8pt;
-  color: #272727;
-}
-
 body .text {
   font-weight: 400;
   font-size: 8pt;
@@ -11023,14 +11030,27 @@ body .auth .card {
 
 body .auth .col-form-label {
   text-align: left;
-  padding-top: 0px;
-  padding-bottom: 0px;
+  padding-top: 0;
+  padding-bottom: 0;
 }
 
 body .auth .form-control {
-  padding: 0px;
+  padding: 0;
   height: 17pt;
-  border-radius: 0%;
+  border-radius: 0;
+}
+
+body input:-webkit-autofill {
+  -webkit-box-shadow: 0 0 0 50px #272727 inset;
+  -webkit-text-fill-color: #ffffff;
+}
+
+body input:-webkit-autofill:active,
+body input:-webkit-autofill:focus,
+body input:-webkit-autofill:visited,
+body input:-webkit-autofill:hover {
+  -webkit-box-shadow: 0 0 0 50px #272727 inset;
+  -webkit-text-fill-color: #ffffff;
 }
 
 body .card-body {
@@ -11090,9 +11110,15 @@ body .button-square {
 
 body .button-square:active,
 body .button-square:focus,
-body .button-square:visited {
+body .button-square:visited,
+body .button-square:hover {
   outline: none;
   box-shadow: none;
+  color: #ffffff;
+}
+
+body .button-square:hover {
+  color: #ead4b0;
 }
 
 body .pin-left:before {
@@ -11110,7 +11136,7 @@ body .pin-left:before {
 body .pin-left {
   border-left: 0.5pt solid #ead4b0;
   display: inline-block;
-  margin: 10rem 50px 0px -5rem;
+  margin: 12rem 50px 0px -5rem;
   position: fixed;
   top: 0;
   bottom: 0;
@@ -11123,8 +11149,12 @@ body .pin-left .text {
 }
 
 body .pin-left p {
-  margin-top: 0pt;
-  margin-bottom: 0pt;
+  margin-top: 0;
+  margin-bottom: 0;
+}
+
+body .register .pin-left {
+  margin-top: 17rem;
 }
 
 body li {
@@ -11320,7 +11350,7 @@ body .metadata-area .pin-horizontal {
   color: #ddd1b9;
   border-bottom: 0.042rem solid #ddd1b9;
   display: inline-block;
-  margin: 3.35rem 3.125rem 0 0;
+  margin: 2.75rem 3.125rem 0 0;
 }
 
 body .metadata-area .pin-horizontal:before {
@@ -11395,9 +11425,10 @@ body .metadata-area .metadata-text .artefact-info .artefact-author {
 }
 
 body .metadata-area .metadata-text .artefact-info .inter_like_filled:before {
-  background-image: url(/images/Hearth_Filled_50.png?77bb26c3aba063c00aba1a2f07059d71);
-  width: 50px;
-  height: 50px;
+  background-image: url(/images/Heart_Filled.svg?e5b962dc0fd67a2042277b9826016c9c);
+  width: 3.125rem;
+  height: 3.125rem;
+  margin-right: 0;
 }
 
 body .metadata-area .metadata-text .artefact-info .inter_like_filled:hover,
@@ -11409,35 +11440,6 @@ body .metadata-area .metadata-text .artefact-info .inter_like_filled:active {
   box-shadow: none !important;
 }
 
-body .content {
-  position: relative;
-}
-
-body .content .btn-circle.rounded-circle {
-  padding: 6px 0px;
-  font-size: 16px;
-  text-align: center;
-}
-
-body .content .btn-categories {
-  position: absolute;
-  border-width: 5px;
-  background-color: #272727;
-  border-color: #ead4b0;
-  color: #ead4b0;
-  outline: none !important;
-  box-shadow: none !important;
-  font-weight: 600;
-}
-
-body .content .btn-categories:active {
-  background-color: #efdab3;
-  border-color: #ead4b0;
-  outline: none !important;
-  box-shadow: none !important;
-  color: #272727;
-}
-
 body .cat-col-md-2 {
   margin: 2%;
 }
@@ -11496,7 +11498,6 @@ body .category-h2 {
 
 .sidenav {
   height: 100%;
-  width: 0;
   width: 250px;
   position: fixed;
   z-index: 1;
@@ -11525,19 +11526,14 @@ body .category-h2 {
   }
 }
 
-@media (max-width: 990px) {
-  body {
-    /*.pin-left {
-        margin-left: -15rem;
-        margin-top: 11rem;
-    }*/
-  }
-}
-
 @media (max-width: 770px) {
   body .pin-left {
     margin-left: -33vw;
-    margin-top: 12rem;
+    margin-top: 15rem;
+  }
+
+  body .register .pin-left {
+    margin-top: 20rem;
   }
 }
 
@@ -11552,21 +11548,23 @@ body .category-h2 {
     white-space: nowrap;
   }
 
-  .btn-circle.rounded-circle.btn-sm,
-  .btn-group-sm > .btn-circle.rounded-circle.btn {
-    width: 90px;
-    height: 90px;
+  /*.btn-circle.rounded-circle.btn-sm
+  {
+      width: 90px;
+      height: 90px;
   }
 
-  .btn-circle.rounded-circle.btn-dm {
-    width: 130px;
-    height: 130px;
+  .btn-circle.rounded-circle.btn-dm
+  {
+      width: 130px;
+      height: 130px;
   }
 
-  .btn-circle.rounded-circle.btn-xl {
-    width: 180px;
-    height: 180px;
-  }
+  .btn-circle.rounded-circle.btn-xl
+  {
+      width: 180px;
+      height: 180px;
+  }*/
 
   body .carousel .carousel-inner .social-logo {
     padding-left: 30px;
diff --git a/public/images/Heart_Filled.svg b/public/images/Heart_Filled.svg
new file mode 100644
index 0000000..36ca64b
--- /dev/null
+++ b/public/images/Heart_Filled.svg
@@ -0,0 +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>
\ No newline at end of file
diff --git a/resources/images/interface/Heart_Empty.svg b/resources/images/interface/Heart_Empty.svg
new file mode 100644
index 0000000..bacaab8
--- /dev/null
+++ b/resources/images/interface/Heart_Empty.svg
@@ -0,0 +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>
\ No newline at end of file
diff --git a/resources/images/interface/Heart_Filled.svg b/resources/images/interface/Heart_Filled.svg
new file mode 100644
index 0000000..36ca64b
--- /dev/null
+++ b/resources/images/interface/Heart_Filled.svg
@@ -0,0 +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>
\ No newline at end of file
diff --git a/resources/sass/_custom.scss b/resources/sass/_custom.scss
index 8cd8829..90a27a4 100644
--- a/resources/sass/_custom.scss
+++ b/resources/sass/_custom.scss
@@ -428,7 +428,7 @@ body {
             color: $theme-color-two;
             border-bottom: .042rem solid $theme-color-two;
             display: inline-block;
-            margin: 3.35rem 3.125rem 0 0;
+            margin: 2.75rem 3.125rem 0 0;
 
             &:before {
                 content: '';
@@ -505,9 +505,10 @@ body {
                 .inter_like_filled {
 
                     &:before {
-                        background-image : url(../images/interface/Hearth_Filled_50.png);
-                        width: 50px;
-                        height: 50px;
+                        background-image : url(../images/interface/Heart_Filled.svg);
+                        width: 3.125rem;
+                        height: 3.125rem;
+                        margin-right: 0;
                     }
 
                     &:hover, &:focus, &:active {
diff --git a/resources/views/favmetadata/index.blade.php b/resources/views/favmetadata/index.blade.php
index de5d33c..5948a3b 100644
--- a/resources/views/favmetadata/index.blade.php
+++ b/resources/views/favmetadata/index.blade.php
@@ -25,7 +25,9 @@
                             </div>
                         </div>
                         <div id="meta_{{$meta->id}}" class="metadata-text collapse">
-                            {{$meta->noteEN}}
+                            <p>
+                                {{$meta->noteEN}}
+                            </p>
                             <div class="artefact-info">
                                 <div class="artefact-name">
                                     {{$meta->artefact->name}}
@@ -34,7 +36,9 @@
                                     {{$meta->artefact->author}}
                                 </div>
                                 <div class="text-center">
-                                    <button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button>
+                                    <a href="{{  action('FavoriteMetadataController@unlike', ['id' => $meta->id]) }}">
+                                        <button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button>
+                                    </a>
                                 </div>
                             </div>
                         </div>
diff --git a/resources/views/pages/index.blade.php b/resources/views/pages/index.blade.php
index 221abd3..a64b502 100644
--- a/resources/views/pages/index.blade.php
+++ b/resources/views/pages/index.blade.php
@@ -52,7 +52,7 @@
         </a> -->
         <!-- <a class="carousel-control-next" href="#homepage_carousel" role="button" data-slide="next">
             <span class="carousel-control-next-icon" aria-hidden="true"></span>
-            <span class="sr-only">Next</span> -->
-        </a>
+            <span class="sr-only">Next</span>
+        </a> -->
     </div>
 @endsection
diff --git a/routes/web.php b/routes/web.php
index 0a1d100..292501e 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -22,6 +22,7 @@ Route::resource('/detail', 'DetailsController', array('only' => array('index', '
 Route::resource('/categories', 'CategoriesController', array('only' => array('index')));
 Route::resource('/favartefacts', 'FavoriteArtefactsController', array('only' => array('index', 'show', 'store')));
 Route::get('/favmetadata', 'FavoriteMetadataController@index');
+Route::get('/favmetadata/unlike/{id}', 'FavoriteMetadataController@unlike');
 
 
 Auth::routes();
