Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
fix: ratio home css catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
Reight123 committed Apr 22, 2024
1 parent 646030f commit 1379fc7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion public/css/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

.slider-content img {
max-width: 100%;
height: 400px;
max-height: 100%;
}

.slider-nav {
Expand Down Expand Up @@ -118,3 +118,10 @@ button:hover{
background-image: url("../img/widgetclicked.png");
border-color: white;
}

.imgbox {
display: flex;
justify-content: center;
height: 400px;
width: 400px;
}
4 changes: 3 additions & 1 deletion resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
@foreach(\App\Models\Category::all()->sortBy('name') as $category)
<div id="img_{{$category->name}}" class="slider-content">
<a href="/catalog?category={{$category->id}}">
<img src="{{ asset("category/" . $category['icon']) }}" alt="{{$category->name}} category image">
<div class="imgbox">
<img src="{{ asset("category/" . $category['icon']) }}" alt="{{$category->name}} category image">
</div>
</a>
</div>
@endforeach
Expand Down

0 comments on commit 1379fc7

Please sign in to comment.