From cccd9fccfb6eb2b16878d7488aa3fab578b621cc Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 30 Mar 2021 16:25:30 +0200 Subject: search page :tada: --- pages/_app.tsx | 1 + pages/search.tsx | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 pages/search.tsx (limited to 'pages') diff --git a/pages/_app.tsx b/pages/_app.tsx index bc96369..62c1c9b 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -7,6 +7,7 @@ import '../styles/navbar.css'; import '../styles/button.css'; import '../styles/image.css'; import '../styles/tags.css'; +import '../styles/search.css'; export default function Blog({ Component, pageProps }) { return
diff --git a/pages/search.tsx b/pages/search.tsx new file mode 100644 index 0000000..11cfe2c --- /dev/null +++ b/pages/search.tsx @@ -0,0 +1,46 @@ +import Navbar from '../components/navbar'; +import { FormEvent } from 'react'; +import { ArticleMeta } from './post/[id]'; + +import SearchOutlinedIcon from '@material-ui/icons/SearchOutlined'; + +function SearchBar(props: { + searchFunction: (event?: FormEvent) => void; +}) { + return
+
+ + + +
+
+} + +export default function SearchPage(props: { + posts: Array<{ + props: { + meta: ArticleMeta + } + }> +}) { + return
+
+
+

Search for posts

+
+
+
+ +
+
+
+ ) => { + event?.preventDefault(); + }}/> +
+
+
+} + +// grep -Por "^\[meta\]:\s+\s+\(\K(.+)(?=\)$)" posts + -- cgit v1.2.3