Add table-based legacy design
This commit is contained in:
parent
429314efba
commit
57bb0e03a3
35 changed files with 886 additions and 526 deletions
|
@ -5,7 +5,7 @@
|
|||
<td>
|
||||
<form method="POST" action="/guestbook">
|
||||
@csrf
|
||||
<x-honeypot/>
|
||||
@if(!isLegacy())<x-honeypot/>@endif
|
||||
<table class="form" role="presentation">
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -32,7 +32,16 @@
|
|||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
@if(isLegacy())
|
||||
<input type="submit" name="Submit" VALUE="Submit">
|
||||
@else
|
||||
<button type="submit">Submit</button>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -44,12 +53,52 @@
|
|||
<li>You can submit an entry <u>once every hour</u>.</li>
|
||||
<li>Your IP address is logged but <u>not</u> publicly displayed.</li>
|
||||
<li>Any entries that appear to be spam <u>will</u> be removed.</li>
|
||||
@if (isLegacy())
|
||||
<li>This form is broken in super-old browsers.</li>
|
||||
<li>Entries submitted on this site are flagged for manual review.</li>
|
||||
@endif
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@if (isLegacy())
|
||||
<font size="+2"><b>Entries ({{ count($entries) }} total)</b></font>
|
||||
<table cellspacing="10" cellpadding="0" border="0">
|
||||
@foreach ($entries as $entry)
|
||||
{{-- Skip entries flagged as legacy --}}
|
||||
@if($entry->legacy_flagged) @php continue @endphp @endif
|
||||
@php
|
||||
$user_agent = $parser->parse($entry->agent);
|
||||
@endphp
|
||||
<tr>
|
||||
<td>
|
||||
<table cellspacing="2" cellpadding="5" border="1" width="100%">
|
||||
<tr><td>
|
||||
Submitted by <b>{{ $entry->name }}</b>
|
||||
on <b>{{ $entry->created_at->format('Y-m-d') }}</b>
|
||||
at <b>{{ $entry->created_at->format('h:i:s A (e)') }}</b>
|
||||
</td></tr>
|
||||
<tr><td>{{ $entry->message }}</td></tr>
|
||||
<tr><td>
|
||||
@if($entry->agent === "Agent Unavailable")
|
||||
<i>Agent unavailable</i>
|
||||
@else
|
||||
@if ($user_agent->ua->toString() == "Other" || $user_agent->os->toString() == "Other")
|
||||
<i>Posted using <b>{{ $entry->agent }}</b></i>
|
||||
@else
|
||||
<i>Posted using <b>{{ $user_agent->ua->toString() }}</b>
|
||||
on <b>{{ $user_agent->os->toString() }}</b></i>
|
||||
@endif
|
||||
@endif
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</table>
|
||||
@else
|
||||
<hr>
|
||||
<h2>Entries <small>({{ count($entries) }} total)</small></h2>
|
||||
@foreach ($entries as $entry)
|
||||
|
@ -66,10 +115,15 @@
|
|||
@if($entry->agent === "Agent Unavailable")
|
||||
<address>Agent unavailable</address>
|
||||
@else
|
||||
<address>Posted using <strong>{{ $user_agent->ua->toString() }}</strong>
|
||||
on <strong>{{ $user_agent->os->toString() }}</strong></address>
|
||||
@if ($user_agent->ua->toString() == "Other" || $user_agent->os->toString() == "Other")
|
||||
<address>Posted using <strong>{{ $entry->agent }}</strong></address>
|
||||
@else
|
||||
<address>Posted using <strong>{{ $user_agent->ua->toString() }}</strong>
|
||||
on <strong>{{ $user_agent->os->toString() }}</strong></address>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
<br>
|
||||
@endforeach
|
||||
@endif
|
||||
</x-layout>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue