@extends('layouts.customer') @section('title', 'Bulletin') @section('content') @php /* Exact Titan Systems type badge colors from screenshot */ $typeStyle = [ 'alert' => ['bg'=>'#dc2626','icon'=>'M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'], 'announcement' => ['bg'=>'#ef4444','icon'=>'M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'], 'release' => ['bg'=>'#22c55e','icon'=>'M13 10V3L4 14h7v7l9-11h-7z'], 'update' => ['bg'=>'#3b82f6','icon'=>'M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15'], 'maintenance' => ['bg'=>'#f59e0b','icon'=>'M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z'], 'warning' => ['bg'=>'#ef4444','icon'=>'M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z'], ]; /* Icon colors for Latest Releases list (same colorful squares as Titan) */ $releaseColors = ['#c0392b','#6c3483','#e91e63','#1565c0','#4527a0','#00838f','#d84315','#2e7d32']; $typeEmoji = ['plugin'=>'๐Ÿ”Œ','module'=>'๐Ÿงฉ','software'=>'๐Ÿ’ป','theme'=>'๐ŸŽจ','api'=>'โšก','saas'=>'โ˜๏ธ','script'=>'๐Ÿ“œ','desktop'=>'๐Ÿ–ฅ๏ธ']; @endphp {{-- โ”€โ”€ Page header โ”€โ”€ --}}

Bulletin

Stay updated with the latest news and updates.

{{-- All Types dropdown --}}
{{-- โ”€โ”€ 2-col layout โ”€โ”€ --}}
{{-- LEFT โ”€โ”€ --}}
{{-- Pinned section --}} @if($pinned->count())
Pinned
@foreach($pinned as $post) @php $ts = $typeStyle[$post->type] ?? $typeStyle['announcement']; @endphp {{-- badge + pin + time --}}
{{-- Type pill badge --}} {{ ucfirst($post->type) }} {{-- Pinned pill --}} @if($post->is_pinned) Pinned @endif
{{ $post->published_at?->diffForHumans() }}
{{-- Title --}}

{{ $post->title }}

{{-- Body --}}

{{ Str::limit(strip_tags($post->content), 200) }}

{{-- Footer --}}
{{ strtoupper(substr($post->author->name??'A',0,1)) }}
Posted by {{ $post->author->name??'Admin' }}
{{-- views --}} {{ number_format($post->views_count) }} {{-- likes --}} 0 {{-- comments --}} 0
@endforeach
@endif {{-- Recent section --}}
Recent
@forelse($recent as $post) @php $ts = $typeStyle[$post->type] ?? $typeStyle['announcement']; @endphp
{{-- Type pill --}} {{ ucfirst($post->type) }} {{-- Pinned pill --}} @if($post->is_pinned) Pinned @endif
{{ $post->published_at?->diffForHumans() }}

{{ $post->title }}

{{ Str::limit(strip_tags($post->content), 280) }}

{{ strtoupper(substr($post->author->name??'A',0,1)) }}
Posted by {{ $post->author->name??'Admin' }}
{{ number_format($post->views_count) }} 0 0
@empty @if(!$pinned->count())
๐Ÿ“ข

No announcements yet

Check back soon for news from the team.

@endif @endforelse @if($recent->hasPages())
{{ $recent->links() }}
@endif
{{-- RIGHT - Latest Releases --}}
Latest Releases
@php $releases = \App\Models\ProductVersion::with('product') ->where('is_active', true) ->latest('released_at') ->take(8) ->get(); @endphp @forelse($releases as $i => $rel) {{-- Colorful rounded square icon --}}
{{ $typeEmoji[$rel->product->type??'-'] ??'-' }}
{{ $rel->product->name }}@if($rel->product->short_description && $rel->product->short_description !== $rel->product->name) โ€” {{ Str::limit($rel->product->short_description, 24) }}@endif
v{{ $rel->version }} ยท {{ $rel->released_at?->diffForHumans()??'Recently' }}
@empty
No releases yet.
@endforelse
@endsection