File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ import { getCollection } from " astro:content" ;
3+ import { ALPHABETS } from " ../../../constants.js" ;
4+ import BaseLayout from " ../../layouts/base.astro" ;
5+ import Navbar from " ../../components/navbar.astro" ;
6+ import Search from " ../../components/islands/search.jsx" ;
7+
8+ const dictionary = await getCollection (" dictionary" );
9+ ---
10+
11+ <BaseLayout
12+ pageTitle =" Browse Words"
13+ class =" min-h-screen"
14+ >
15+ <Navbar >
16+ <Search triggerSize =" sm" dictionary ={ dictionary } client:load />
17+ </Navbar >
18+
19+ <main class =" max-w-screen-lg p-5 md:mt-10 mx-auto space-y-6" >
20+ <h2 class =" text-3xl md:text-5xl font-black" >
21+ Browse Alphabetically
22+ </h2 >
23+ <div class =" flex flex-wrap gap-3" >
24+ { ALPHABETS .map (alpha => (
25+ <a
26+ href = { ` /browse/${alpha }/1 ` }
27+ class = " no-underline flex h-16 w-16 md:h-20 md:w-20 bg-gray-100 hover:bg-black hover:text-white rounded md:text-lg transition-colors ease-in-out"
28+ >
29+ <span class = " m-auto" >{ alpha .toUpperCase () } </span >
30+ </a >
31+ ))}
32+ </div >
33+ </main >
34+ </BaseLayout >
You can’t perform that action at this time.
0 commit comments