feat: add links to common searches

Refs: #25
This commit is contained in:
Oliver Davies 2022-10-19 22:02:54 +01:00
parent 362f2335ec
commit 92a3e001e1

View file

@ -1,11 +1,35 @@
--- ---
import PageLayout from '../layouts/PageLayout.astro' import PageLayout from '../layouts/PageLayout.astro'
const commonSearches = [
'Drupal',
'Test-Driven Development',
'Tailwind CSS',
'Ansible',
'Ansistrano',
]
--- ---
<PageLayout title="Search"> <PageLayout title="Search">
<form action="https://www.google.com/search" method="get"> <div>
<input type="hidden" name="q" value="site:https://www.oliverdavies.uk"> <form action="https://www.google.com/search" method="get">
<input type="text" name="q" alt="search"> <input type="hidden" name="q" value="site:https://www.oliverdavies.uk">
<input type="submit" value="Search"> <input type="text" name="q" alt="search">
</form> <input type="submit" value="Search">
</form>
</div>
<aside>
<h2>Common searches</h2>
<ul>
{commonSearches.map(search => (
<li>
<a href=`https://www.google.com/search?q=site%3Awww.oliverdavies.uk+%22${search}%22`>
{search}
</a>
</li>
))}
</ul>
</aside>
</PageLayout> </PageLayout>