관리-도구
편집 파일: df23c8f28c124f059e286f5ce54f29b7.php
<?php if (!($blog && is_object($blog))) { return; } $author = $blog->adminAuthor ?? null; $user = null; if (!$author) { $author = $blog->author ?? null; $user = $author->userable ?? null; } $translations = parse_translation($blog); $title = $translations['title'] ?? $blog->title ?? ''; $description = $translations['description'] ?? $blog->description ?? ''; $thumbnail = $blog->thumbnail && fileExists('lms/blogs/', $blog->thumbnail) ? asset('storage/lms/blogs/' . $blog->thumbnail) : asset('lms/frontend/assets/images/450x300.svg'); $commentsCount = $blog?->comments?->count() ?? 0; $commentsTitle = Str::plural('Comments', $commentsCount); $profileImg = $blog->adminAuthor && fileExists('lms/admins', $author->profile_img) ? asset('storage/lms/admins/' . $author->profile_img) : asset('lms/assets/images/placeholder/profile.jpg'); ?> <div class="swiper-slide"> <div class="flex flex-col bg-white h-full custom-transition p-4 xl:p-6 rounded-2xl group/blog"> <!-- BLOG THUMBNAIL --> <div class="relative aspect-[1.6] rounded-lg overflow-hidden shrink-0"> <div class="blog-thumb"> <img data-src="<?php echo e($thumbnail); ?>" alt="Blog thumbnail" class="size-full object-cover group-hover/blog:scale-110 custom-transition"> </div> </div> <!-- BLOG CONTENT --> <div class="pt-6 pb-2 grow"> <div class="flex items-center gap-4"> <?php if(isset($blog->blogCategories) && !empty($blog->blogCategories)): ?> <?php $__currentLoopData = $blog->blogCategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($loop->first): ?> <?php $categoryTranslations = parse_translation($category); ?> <div class="badge b-outline badge-secondary-outline"><?php echo e($categoryTranslations['name'] ?? $category->name ?? ''); ?></div> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <div class="flex items-center gap-1 area-description text-sm !leading-none shrink-0"> <i class="ri-wechat-line"></i> <span><?php echo e($commentsCount); ?> <?php echo e(translate($commentsTitle)); ?></span> </div> </div> <h6 class="area-title font-bold !text-xl group-hover/blog:text-secondary mt-6 custom-transition"> <a href="<?php echo e(route('blog.detail', $blog->slug)); ?>" aria-label="<?php echo e('Blog Details link'); ?>" class="line-clamp-2"> <?php echo e($title); ?> </a> </h6> <div class="card-description mt-3 text-heading/70 line-clamp-2"> <?php echo clean($description); ?> </div> <div class="flex-center-between gap-4 pt-4 mt-6 border-t border-heading/10"> <div class="flex items-center gap-2.5"> <div class="size-10 rounded-50 overflow-hidden shrink-0"> <img data-src="<?php echo e($profileImg); ?>" alt="Thumbnail image" class="size-full object-cover"> </div> <div class="grow"> <h6 class="area-title text-base lg:text-lg font-semibold !leading-none"> <?php echo e($author->first_name ?? ($author->name ?? ($user->name ?? ''))); ?></h6> <p class="area-description text-sm !leading-none mt-1.5"> <?php echo e(customDateFormate($blog->created_at, format: 'd M Y')); ?></p> </div> </div> <div class="flex items-center gap-1 area-description text-sm !leading-none shrink-0"> <i class="ri-eye-line"></i> <span><?php echo e($blog->view ?? 0); ?></span> </div> </div> </div> </div> </div> <?php /**PATH D:\www\edulab\Modules\LMS\resources\views\components\cards\blog\card-four.blade.php ENDPATH**/ ?>