@extends('layouts.app') @section('title', 'All Articles - Corpus Intellectual') @section('description', 'Browse all published articles in Corpus Intellectual journal covering various aspects of genomics research.') @section('content')

All Articles

@if(request('search')) Search results for "{{ request('search') }}" - {{ $articles->total() }} articles found @elseif(request('category')) Articles in {{ $categories->where('slug', request('category'))->first()?->name ?? request('category') }} - {{ $articles->total() }} articles @else Browse all published articles - {{ $articles->total() }} articles @endif

@if($articles->count() > 0)
@if(request('volume')) @php $grouped = $articles->groupBy(function($article) { return optional($article->series)->name ?? 'No Series'; }); @endphp @foreach($grouped as $seriesName => $seriesArticles)

{{ $seriesName }}

@foreach($seriesArticles as $article)

{{ $article->title }}

{{ Str::limit($article->abstract, 300) }}

Authors: @php $authors = $article->authors_text ? array_map('trim', explode(',', $article->authors_text)) : []; @endphp @foreach(array_slice($authors, 0, 6) as $index => $author) {{ $author }}@if($index < min(5, count($authors) - 1)), @endif @endforeach @if(count($authors) > 6) et al. @endif

@if($article->keywords) @php $keywords = is_array($article->keywords) ? $article->keywords : json_decode($article->keywords, true); @endphp
@foreach(array_slice($keywords ?? [], 0, 5) as $keyword) {{ $keyword }} @endforeach @if(count($keywords ?? []) > 5) +{{ count($keywords) - 5 }} more @endif
@endif
@if($article->doi) DOI: {{ $article->doi }} @endif
👁 {{ number_format($article->views_count) }} views ⬇ {{ number_format($article->downloads_count) }} downloads
@endforeach @endforeach @else @foreach($articles as $article)

{{ $article->title }}

{{ Str::limit($article->abstract, 300) }}

Authors: @php $authors = $article->authors_text ? array_map('trim', explode(',', $article->authors_text)) : []; @endphp @foreach(array_slice($authors, 0, 6) as $index => $author) {{ $author }}@if($index < min(5, count($authors) - 1)), @endif @endforeach @if(count($authors) > 6) et al. @endif

@if($article->keywords) @php $keywords = is_array($article->keywords) ? $article->keywords : json_decode($article->keywords, true); @endphp
@foreach(array_slice($keywords ?? [], 0, 5) as $keyword) {{ $keyword }} @endforeach @if(count($keywords ?? []) > 5) +{{ count($keywords) - 5 }} more @endif
@endif
@if($article->doi) DOI: {{ $article->doi }} @endif
👁 {{ number_format($article->views_count) }} views ⬇ {{ number_format($article->downloads_count) }} downloads
@endforeach @endif
{{ $articles->appends(request()->query())->links() }}
@else

No articles found

@if(request()->hasAny(['category', 'type', 'search'])) No articles match your current filters. Try adjusting your search criteria. @else There are no published articles yet. @endif

@if(request()->hasAny(['category', 'type', 'search'])) View All Articles @endif
@endif
@endsection