Re-add search functionality

This commit is contained in:
Jonny Barnes 2023-04-11 21:16:06 +01:00
parent 92c0a517c2
commit 58c5a7d443
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
11 changed files with 297 additions and 19 deletions

View file

@ -51,9 +51,9 @@
</main>
<footer>
{{-- <form action="search" method="get">--}}
{{-- <input type="text" name="terms" title="Search"><button type="submit">Search</button>--}}
{{-- </form>--}}
<form action="/search" method="get">
<input type="text" name="q" title="Search"><button type="submit">Search</button>
</form>
<p>Built with love: <a href="/colophon">Colophon</a></p>
<a href="https://indieweb.org"><img src="/assets/img/iwc.svg" alt="Indie Web Camp logo" class="iwc-logo"></a>
</footer>

View file

@ -3,17 +3,18 @@
@section('title')Search « @stop
@section('content')
<h2>Search Results</h2>
@foreach($notes as $note)
<div class="h-entry">
@include('templates.note', ['note' => $note])
</div>
@endforeach
{{ $notes->links() }}
@stop
<h2>Search Results</h2>
<p>Searching for {{ $search }}</p>
@section('scripts')
@include('templates.mapbox-links')
<script src="/assets/js/links.js"></script>
<link rel="stylesheet" href="/assets/highlight/zenburn.css">
<div class="h-feed">
<!-- the following span stops microformat parses going haywire
generating a name property for the h-feed -->
<span class="p-name"></span>
@foreach ($notes as $note)
@include('templates.note', ['note' => $note])
@endforeach
</div>
{{ $notes->links() }}
@stop