Skip to content

Commit 59092d8

Browse files
committed
feat: add gradient background
1 parent b48e5ca commit 59092d8

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

resources/views/articles/show.blade.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@
2121
<div class="container mx-auto">
2222
<div class="px-4 lg:px-0 lg:mx-48">
2323
<div class="relative w-full bg-center bg-gray-800 p-6 lg:p-8 z-10">
24-
<img class="absolute w-full h-full left-0 top-0 object-cover -z-10"
25-
style="background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4))"
26-
src="{{ $article->heroImage(2000,384) }}"
27-
alt="Article Hero Image"
28-
onerror="
29-
this.onerror=null
30-
this.src='{{ asset('images/default-background.svg') }}'"
31-
>
24+
<div class="-z-10">
25+
<img class="absolute w-full h-full left-0 top-0 object-cover"
26+
src="{{ $article->heroImage(2000,384) }}"
27+
alt="Article Hero Image"
28+
onerror="
29+
this.onerror=null
30+
this.src='{{ asset('images/default-background.svg') }}'"
31+
>
32+
<div class="absolute inset-0 bg-gradient-to-b from-black/40 to-black/40"></div>
33+
</div>
3234
<div class="flex items-center justify-between mb-28 text-sm lg:text-base">
3335
<a href="{{ route('articles') }}" class="flex items-center text-white hover:underline">
3436
<x-heroicon-s-arrow-left class="w-4 h-4 fill-current" />

0 commit comments

Comments
 (0)