diff --git a/assets/scripts/animations.js b/assets/scripts/animations.js index b26944a..81b531d 100644 --- a/assets/scripts/animations.js +++ b/assets/scripts/animations.js @@ -14,7 +14,7 @@ function addEffect({ target }) { target == null || !target["matches"] || !target.matches( - "a[href],.nav-toggle-button,button,input,label:not(:has(input))", + "a[href],.nav-toggle-button,button,input[type='radio']", ) ) { return; diff --git a/site/_includes/-header.njk b/site/_includes/-header.njk index c561816..dbafc2a 100644 --- a/site/_includes/-header.njk +++ b/site/_includes/-header.njk @@ -49,10 +49,9 @@ /recipes /music /books - + /search - {% include "-search.njk" %}

{{ tag | capitalize if tag else title }}

{%- if author -%} diff --git a/site/_includes/-search.njk b/site/_includes/-search.njk deleted file mode 100644 index 299a595..0000000 --- a/site/_includes/-search.njk +++ /dev/null @@ -1,4 +0,0 @@ -
- - -
diff --git a/site/_includes/css/site.css b/site/_includes/css/site.css index abc6c5d..67ea45f 100644 --- a/site/_includes/css/site.css +++ b/site/_includes/css/site.css @@ -113,7 +113,7 @@ body { a { color: inherit; } -a[href], button#search { +a[href] { appearance: none; text-decoration-line: underline; box-decoration-break: clone; @@ -121,16 +121,8 @@ a[href], button#search { margin: -0.1em; position: relative; } -button#search { - background: transparent; - border: none; - color: inherit; - font-family: inherit; - font-size: inherit; - margin-left: auto; -} -:is(a, nav label, button#search):hover, -:is(a, nav label, button#search):focus-visible, +:is(a, nav label):hover, +:is(a, nav label):focus-visible, nav label:has(input:focus-visible), nav label:has(input:checked) { outline: none; @@ -146,7 +138,7 @@ nav label:has(input:checked) { 0 0 1rem var(--c-accent); } } -:is(a[href], button, button#search, nav label):focus-visible, +:is(a[href], button, nav label):focus-visible, nav label:has(input:focus-visible) { z-index: 1; outline: 2px solid var(--c-text-dark); @@ -575,6 +567,7 @@ body .isso-input-wrapper label { } body .isso-input-wrapper input, +input[type='text'], body .isso-textarea, body .isso-preview { color: inherit; @@ -607,7 +600,7 @@ body .isso-preview { var(--c-text-background-light) 20px ); } -body .isso-post-action > input { +body .isso-post-action > input, button { color: inherit; background-color: var(--c-text-background-light); font-size: 1rem; @@ -674,3 +667,21 @@ body .isso-post-action { ); animation: 1s ease normal forwards ripple; } +.pagefind-ui__form { + display: grid; + gap: 0.5rem; + grid-template-columns: 1fr min-content; +} +.pagefind-ui__search-input { + margin-right: 0.5rem; + grid-column-start: 0; + grid-column-end: span 1; +} +.pagefind-ui__drawer { + grid-column-start: 0; + grid-column-end: span 2; + width: 100%; +} +.pagefind-ui__result-excerpt { + margin: 0.5rem 0; +} diff --git a/site/pages/search.njk b/site/pages/search.njk new file mode 100644 index 0000000..3745a59 --- /dev/null +++ b/site/pages/search.njk @@ -0,0 +1,9 @@ +--- +layout: base.njk +permalink: search/index.html +title: Search +--- +
+ + +