Skip to content

Commit

Permalink
UPDATE - Header in articles.show and users.profile view to be boxed (#…
Browse files Browse the repository at this point in the history
…1140)

* UPDATE - Header in articles.show and users.profile view to be boxed

* UPDATE - Article heading padding to be equal on all sides

* UPDATE - Show  and published info in mobile view
  • Loading branch information
tauseefsshah authored Sep 26, 2024
1 parent 4badaec commit 8e873eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions resources/views/articles/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@
@endif
@endauth

<div
class="w-full bg-center {{ $article->hasHeroImage() ? 'bg-cover' : '' }} bg-gray-800"
style="background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url({{ $article->heroImage(2000, 384) }});"
>
<div class="container mx-auto">
<div class="px-4 lg:px-0 lg:mx-48">
<div class="flex items-center justify-between pt-6 mb-28">
<a href="{{ route('articles') }}" class="hidden items-center text-base text-white hover:underline lg:flex">
<div class="container mx-auto">
<div class="px-4 lg:px-0 lg:mx-48">
<div
class="w-full bg-center {{ $article->hasHeroImage() ? 'bg-cover' : '' }} bg-gray-800 p-6 lg:p-8"
style="background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url({{ $article->heroImage(2000,384) }});"
>
<div class="flex items-center justify-between mb-28 text-sm lg:text-base">
<a href="{{ route('articles') }}" class="flex items-center text-white hover:underline">
<x-heroicon-s-arrow-left class="w-4 h-4 fill-current" />
<span class="text-white ml-1 hover:text-gray-100">Back to articles</span>
</a>

<div class="hidden lg:flex">
<div>
@if ($article->isNotPublished())
<x-light-tag>
@if ($article->isAwaitingApproval())
Expand Down Expand Up @@ -59,7 +59,7 @@ class="w-full bg-center {{ $article->hasHeroImage() ? 'bg-cover' : '' }} bg-gray
{{ $article->title() }}
</h1>

<div class="flex flex-col gap-y-2 text-white pb-4 lg:pb-12 lg:flex-row lg:items-center">
<div class="flex flex-col gap-y-2 text-white lg:flex-row lg:items-center">
<div class="flex items-center">
<x-avatar :user="$article->author()" class="w-6 h-6 rounded-full mr-3" />

Expand Down
2 changes: 1 addition & 1 deletion resources/views/users/profile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@section('content')
<section class="bg-white">
<div
class="w-full bg-center bg-gray-800 h-60"
class="w-full bg-center bg-gray-800 h-60 container mx-auto"
style="background-image: url('{{ asset('images/default-background.svg') }}')"
></div>

Expand Down

0 comments on commit 8e873eb

Please sign in to comment.