@extends('layouts.app')
@section('title','Visualizar LOG — '.$nome)
@section('content')
@php
$linhas = explode("\n", $conteudo);
@endphp
@foreach($linhas as $i => $linha)
@php
$l = rtrim($linha);
if (str_starts_with($l, 'QSO:')) {
$cor = 'color:#9cdcfe';
} elseif (str_starts_with($l, 'START-OF-LOG') || str_starts_with($l, 'END-OF-LOG')) {
$cor = 'color:#c586c0;font-weight:bold';
} elseif (str_starts_with($l, 'CALLSIGN:') || str_starts_with($l, 'CONTEST:')) {
$cor = 'color:#4ec9b0;font-weight:bold';
} elseif (str_starts_with($l, 'CATEGORY')) {
$cor = 'color:#ce9178';
} elseif (str_starts_with($l, 'CLAIMED-SCORE:')) {
$cor = 'color:#FFD700;font-weight:bold';
} else {
$cor = 'color:#a8c0a8';
}
@endphp
{{ str_pad($i+1, 4, ' ', STR_PAD_LEFT) }}{{ $l }}
@endforeach
{{ count($linhas) }} linhas |
{{ collect($linhas)->filter(fn($l) => str_starts_with(trim($l), 'QSO:'))->count() }} QSOs
@endsection