-
Notifications
You must be signed in to change notification settings - Fork 17
Fix post views bugs #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix post views bugs #167
Changes from 1 commit
8a9ae6e
5858a64
38b996e
002b161
a8324e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,7 +69,7 @@ | |
| <div> | ||
| <h2 class="text-xs leading-5 font-medium tracking-wide uppercase text-skin-base">Article suivant</h2> | ||
| <a href="{{ route('articles.show', $next) }}" class="mt-3 flex items-start space-x-2"> | ||
| <img class="h-8 w-8 object-cover shadow-lg rounded-md" src="{{ $next->getFirstMediaUrl('media') }}" alt="{{ $next->slug }}"> | ||
| <img class="h-8 w-8 object-cover shadow-lg rounded-md" src="{{ $next->getFirstMediaUrl('media') }}" alt="{{ $next->slug }}" onerror="this.onerror=null;this.src='{{ asset('images/socialcard.png') }}'"> | ||
| <span class="text-sm font-medium leading-4 text-skin-inverted hover:text-skin-primary-hover line-clamp-2">{{ $next->title }}</span> | ||
| </a> | ||
| </div> | ||
|
|
@@ -79,7 +79,7 @@ | |
| <div> | ||
| <h2 class="text-xs leading-5 font-medium tracking-wide uppercase text-skin-base">Article précédent</h2> | ||
| <a href="{{ route('articles.show', $previous) }}" class="mt-3 flex items-start space-x-2"> | ||
| <img class="h-8 w-8 object-cover shadow-lg rounded-md" src="{{ $previous->getFirstMediaUrl('media') }}" alt="{{ $previous->slug }}"> | ||
| <img class="h-8 w-8 object-cover shadow-lg rounded-md" src="{{ $previous->getFirstMediaUrl('media') }}" alt="{{ $previous->slug }}" onerror="this.onerror=null;this.src='{{ asset('images/socialcard.png') }}'"> | ||
| <span class="text-sm font-medium leading-4 text-skin-inverted hover:text-skin-primary-hover line-clamp-2">{{ $previous->title }}</span> | ||
| </a> | ||
| </div> | ||
|
|
@@ -229,7 +229,7 @@ class="inline-flex items-center py-2 px-4 border border-skin-base rounded-md sha | |
| </a> | ||
| @if($article->isNotApproved()) | ||
| @hasanyrole('admin|moderator') | ||
| <button onclick="Livewire.emit('openModal', 'modals.approved-article', {{ json_encode([$article->id]) }})" type="button" class="-ml-px relative inline-flex items-center px-4 py-2 border border-skin-base bg-skin-card text-sm font-medium text-green-500 hover:bg-skin-card-muted focus:z-10 focus:outline-none focus:ring-1 focus:ring-green-500 focus:border-green-500 focus:border-green-500 focus:ring-offset-body"> | ||
| <button onclick="Livewire.emit('openModal', 'modals.approved-article', {{ json_encode([$article->id]) }})" type="button" class="-ml-px relative inline-flex items-center px-4 py-2 border border-skin-base bg-skin-card text-sm font-medium text-green-500 hover:bg-skin-card-muted focus:z-10 focus:outline-none focus:ring-1 focus:ring-green-500 focus:border-green-500 focus:ring-offset-body"> | ||
|
||
| <span class="sr-only">{{ __('Approuver') }}</span> | ||
| <x-untitledui-check-verified-02 class="h-5 w-5" /> | ||
| </button> | ||
|
|
@@ -251,7 +251,7 @@ class="inline-flex items-center py-2 px-4 border border-skin-base rounded-md sha | |
| <div> | ||
| <h2 class="text-xs leading-5 tracking-wide uppercase text-skin-base">{{ __('Article suivant') }}</h2> | ||
| <div class="mt-3 flex items-start space-x-2"> | ||
| <img class="h-10 w-10 object-cover shadow-lg rounded-md" src="{{ $next->getFirstMediaUrl('media') ?? asset('images/socialcard.png') }}" alt="{{ $next->slug }}" onerror="this.onerror=null;this.src='{{ getAvatar($next->title) }}'"> | ||
| <img class="h-10 w-10 object-cover shadow-lg rounded-md" src="{{ $next->getFirstMediaUrl('media') ?? asset('images/socialcard.png') }}" alt="{{ $next->slug }}" onerror="this.onerror=null;this.src='{{ asset('images/socialcard.png') }}'"> | ||
|
||
| <div class="flex flex-col space-y-1"> | ||
| <a class="text-base font-medium leading-4 text-skin-inverted hover:text-skin-primary-hover line-clamp-2" href="{{ route('articles.show', $next) }}">{{ $next->title }}</a> | ||
| <span class="text-sm text-skin-muted">{{ __(':time min de lecture', ['time' => $next->readTime()]) }}</span> | ||
|
|
@@ -264,7 +264,7 @@ class="inline-flex items-center py-2 px-4 border border-skin-base rounded-md sha | |
| <div> | ||
| <h2 class="text-xs leading-5 tracking-wide uppercase text-skin-base">{{ __('Article précédent') }}</h2> | ||
| <div class="mt-3 flex items-start space-x-2"> | ||
| <img class="h-10 w-10 object-cover shadow-lg rounded-md" src="{{ $previous->getFirstMediaUrl('media') ?? asset('images/socialcard.png') }}" alt="{{ $previous->slug }}" onerror="this.onerror=null;this.src='{{ getAvatar($previous->title) }}'"> | ||
| <img class="h-10 w-10 object-cover shadow-lg rounded-md" src="{{ $previous->getFirstMediaUrl('media') ?? asset('images/socialcard.png') }}" alt="{{ $previous->slug }}" onerror="this.onerror=null; this.src='{{ asset('images/socialcard.png') }}'"> | ||
|
||
| <div class="flex flex-col space-y-1"> | ||
| <a class="text-base font-medium leading-4 text-skin-inverted hover:text-skin-primary-hover line-clamp-2" href="{{ route('articles.show', $previous) }}">{{ $previous->title }}</a> | ||
| <span class="text-sm text-skin-muted">{{ __(':time min de lecture', ['time' => $previous->readTime()]) }}</span> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ | |
| {!! $article->excerpt(175) !!} | ||
| </p> | ||
| <div class="relative h-96 overflow-hidden"> | ||
| <img class="w-full h-full object-cover shadow-lg rounded-lg group-hover:opacity-75" src="{{ $article->getFirstMediaUrl('media') }}" alt="{{ $article->title }}" /> | ||
| <img class="w-full h-full object-cover shadow-lg rounded-lg group-hover:opacity-75" src="{{ $article->getFirstMediaUrl('media') }}" alt="{{ $article->title }}" onerror="this.src='{{ asset('images/socialcard.png') }}'" /> | ||
|
||
| </div> | ||
| <div class="flex justify-between space-x-8"> | ||
| <div class="flex space-x-6"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ | |
| > | ||
| <a href="{{ route('articles.show', $article) }}" class="group"> | ||
| <div class="aspect-w-3 aspect-h-2"> | ||
| <img class="object-cover shadow-lg rounded-lg group-hover:opacity-75" src="{{ $article->getFirstMediaUrl('media') }}" alt="{{ $article->title }}" onerror="this.onerror=null;this.src='{{ getAvatar($article->title) }}'" /> | ||
| <img class="object-cover shadow-lg rounded-lg group-hover:opacity-75" src="{{ $article->getFirstMediaUrl('media') }}" alt="{{ $article->title }}" onerror="this.onerror=null;this.src='{{ asset('images/socialcard.png') }}'" /> | ||
|
||
| </div> | ||
| </a> | ||
| <div | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| <div class="aspect-w-3 aspect-h-2"> | ||
| <img class="object-cover shadow-lg rounded-lg group-hover:opacity-75" | ||
| src="{{ $article->getFirstMediaUrl('media') }}" | ||
| alt="{{ $article->title }}" | ||
| alt="{{ $article->title }}" onerror="this.src='{{ asset('images/socialcard.png') }}'" | ||
|
||
| /> | ||
| </div> | ||
| </a> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,7 @@ | |
| <p class="mt-1 text-xs text-skin-muted"> | ||
| {{ __('PNG, JPG, GIF up to 1MB') }} | ||
| </p> | ||
| <input @focus="focused = true" @blur="focused = false" class="sr-only" type="file" {{ $attributes }} /> | ||
| <input @focus="focused = true" @blur="focused = false" class="sr-only" type="file" accept="image/jpg, image/jpeg, image/png" {{ $attributes }} /> | ||
|
||
| </div> | ||
| <div class="w-full h-full hidden flex items-center justify-center" wire:loading.class.remove="hidden" wire:target="file"> | ||
| <x-loader wire:loading wire:target="file" class="text-green-600" /> | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jiordiviera ce que je dis souvent c'est que si un fichier n'entre pas dasn le scope de ta tache faudrait éviter de les modifier. Parce que tu modifies ce fichier pourtant ta feature n'a pas besoin de le faire. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annule cette modification