From b33f13ccaf4ec14a94ee0ee467dda04cf4981d00 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 01 Jan 2024 22:20:34 +0000
Subject: [PATCH] fix: dont show last page if folder
---
quartz/components/Search.tsx | 54 ++++++++++++++++++++++++++++++++++--------------------
1 files changed, 34 insertions(+), 20 deletions(-)
diff --git a/quartz/components/Search.tsx b/quartz/components/Search.tsx
index f8dd804..9c1852d 100644
--- a/quartz/components/Search.tsx
+++ b/quartz/components/Search.tsx
@@ -1,31 +1,45 @@
-import { QuartzComponentConstructor } from "./types"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
import style from "./styles/search.scss"
// @ts-ignore
import script from "./scripts/search.inline"
export default (() => {
- function Search() {
- return <div class="search">
- <div id="search-icon">
- <p>Search</p>
- <div></div>
- <svg tabIndex={0} aria-labelledby="title desc" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7">
- <title id="title">Search</title>
- <desc id="desc">Search</desc>
- <g class="search-path" fill="none">
- <path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4" />
- <circle cx="8" cy="8" r="7" />
- </g>
- </svg>
- </div>
- <div id="search-container">
- <div id="search-space">
- <input autocomplete="off" id="search-bar" name="search" type="text" aria-label="Search for something" placeholder="Search for something" />
- <div id="results-container">
+ function Search({ displayClass }: QuartzComponentProps) {
+ return (
+ <div class={`search ${displayClass ?? ""}`}>
+ <div id="search-icon">
+ <p>Search</p>
+ <div></div>
+ <svg
+ tabIndex={0}
+ aria-labelledby="title desc"
+ role="img"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 19.9 19.7"
+ >
+ <title id="title">Search</title>
+ <desc id="desc">Search</desc>
+ <g class="search-path" fill="none">
+ <path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4" />
+ <circle cx="8" cy="8" r="7" />
+ </g>
+ </svg>
+ </div>
+ <div id="search-container">
+ <div id="search-space">
+ <input
+ autocomplete="off"
+ id="search-bar"
+ name="search"
+ type="text"
+ aria-label="Search for something"
+ placeholder="Search for something"
+ />
+ <div id="results-container"></div>
</div>
</div>
</div>
- </div>
+ )
}
Search.afterDOMLoaded = script
--
Gitblit v1.10.0