Skip to content

Commit

Permalink
Merge pull request #2684 from fshowalter/draft
Browse files Browse the repository at this point in the history
search styles
  • Loading branch information
fshowalter authored Jul 31, 2024
2 parents f471224 + 9f45bef commit 656daec
Show file tree
Hide file tree
Showing 69 changed files with 79 additions and 69 deletions.
12 changes: 11 additions & 1 deletion astro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,18 @@ function contentHmr() {

function pagefind() {
let outDir;
let assets;
return {
name: "pagefind",
hooks: {
"astro:config:setup": ({ config }) => {
outDir = fileURLToPath(config.outDir);

if (config.build.assetsPrefix) {
assets = null;
} else {
assets = config.build.assets;
}
},
"astro:server:setup": ({ server, logger }) => {
if (!outDir) {
Expand All @@ -46,7 +53,10 @@ function pagefind() {
etag: true,
});
server.middlewares.use((req, res, next) => {
if (req.url?.startsWith("/pagefind/")) {
if (
req.url?.startsWith("/pagefind/") ||
(assets && req.url?.startsWith(`/${assets}/`))
) {
serve(req, res, next);
} else {
next();
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const pathname = new URL(Astro.request.url).pathname;
<slot />
</LayoutComponent>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/__snapshots__/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/__snapshots__/gone.html
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/__snapshots__/how-i-grade.html
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ <h2>On Abandoning Books</h2>
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/__snapshots__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ <h2 class="text-center text-2.5xl font-bold leading-8">
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/readings/stats/__snapshots__/2022.html
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/readings/stats/__snapshots__/2023.html
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/readings/stats/__snapshots__/2024.html
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/readings/stats/__snapshots__/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2336,7 +2336,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/reviews/__snapshots__/cured-by-lol-tolhurst.html
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@
</div>
</div>
<dialog
class="w-[75vw] rounded-xl border-2 border-default shadow-xl"
class="w-[calc(100%_-2_*_var(--gutter))] rounded-xl border-2 border-default shadow-xl tablet:max-w-[75vw]"
aria-label="Search"
>
<div class="dialog-frame flex flex-col overflow-hidden px-gutter py-4">
Expand Down
Loading

1 comment on commit 656daec

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.