<!DOCTYPE html>
<html>
<head>
    <style>
        body {
            font-family: sans-serif;
        }
        .page-break {
            page-break-after: always;
        }
        .title {
            font-size: 24px;
            font-weight: bold;
            text-align: center;
        }
        .timestamp {
            position: absolute;
            bottom: 30px;
            text-align: center;
            width: 100%;
        }
        .page-number {
            position: absolute;
            bottom: 0;
            text-align: center;
            width: 100%;
        }
    </style>
</head>
<body>
@foreach ($posts as $index => $post)
    <div class="title">{{ $post['title'] }}</div>
    <div>
        @foreach ($post as $key => $value)
            @if ($key !== 'title')
                <p><strong>{{ ucfirst($key) }}:</strong> {{ $value }}</p>
            @endif
        @endforeach
    </div>
    <div class="timestamp">Exported at: {{ date('Y-m-d H:i:s') }}</div>
    <div class="page-number">
        Page {{ $index + 1 }} of {{ count($posts) }}
    </div>
    @if ($index !== count($posts) - 1)
        <div class="page-break"></div>
    @endif
@endforeach
</body>
</html>
