Skip to content

Commit 9158fd8

Browse files
committed
Implement search
1 parent 32ff3df commit 9158fd8

15 files changed

Lines changed: 124 additions & 21 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ dist/
3535
public/
3636
temp/
3737
resources/
38+
pagefind/
3839
*.lock
3940
*.log
4041
*.tmp
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@use "sass:meta";
2+
@include meta.load-css("pkg:@pagefind/component-ui/css/pagefind-component-ui.css");

‎manual/assets/css/src/index.scss‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use "sass:meta";
2+
@use "external";
23
@use "breakpoints";
34
@use "fonts";
45
@use "keyframes";

‎manual/assets/css/src/screen/default/_index.scss‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
@use "layout/nav";
2222
@use "layout/pagination";
2323
@use "layout/progress";
24+
@use "layout/search";
2425
@use "layout/sidebar";
2526
@use "layout/tweakpane";
2627
@use "layout/viewport";

‎manual/assets/css/src/screen/default/base/_body.scss‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ body {
1616
font-size: 15px;
1717
font-weight: 300;
1818
margin: 0;
19+
overflow: hidden;
1920
&.preload * {
2021
transition: none !important;
2122
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
@use "dimensions";
2+
3+
.search {
4+
background-color: var(--pf-background);
5+
margin-bottom: 1rem;
6+
pagefind-searchbox {
7+
align-items: center;
8+
display: flex;
9+
height: 56px;
10+
}
11+
}
12+
13+
:is(*, #\#):is(*, #\#):is(*, #\#) {
14+
&.pf-searchbox-input {
15+
padding: 0 22px;
16+
}
17+
&.pf-searchbox-input-wrapper {
18+
align-items: center;
19+
display: flex;
20+
padding: 0.25rem dimensions.$nav-padding;
21+
&::before {
22+
top: unset;
23+
left: unset;
24+
}
25+
}
26+
&.pf-searchbox-result {
27+
border-radius: 0;
28+
}
29+
&.pf-searchbox-results {
30+
scrollbar-width: thin;
31+
}
32+
}

‎manual/assets/css/src/themes/_index.scss‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
@use "dark";
77
@use "highlight-light";
88
@use "highlight-dark";
9+
@use "pagefind-light";
10+
@use "pagefind-dark";
911
@use "tweakpane-light";
1012
@use "tweakpane-dark";
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@use "colors";
2+
3+
:root.dark {
4+
pagefind-searchbox {
5+
color-scheme: dark;
6+
}
7+
8+
--pf-text: #{colors.$grey_200};
9+
--pf-text-secondary: #{colors.$grey_500};
10+
--pf-text-muted: #{colors.$grey_500};
11+
--pf-background: #{colors.$grey_900};
12+
--pf-error-bg: #{colors.$blind};
13+
--pf-border: transparent;
14+
--pf-border-focus: transparent;
15+
--pf-outline-focus: transparent;
16+
--pf-skeleton: #{colors.$grey_700};
17+
--pf-skeleton-shine: #{colors.$grey_500};
18+
--pf-hover: #{colors.$coal};
19+
--pf-mark: #{colors.$shiny};
20+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@use "colors";
2+
3+
:root {
4+
pagefind-searchbox {
5+
color-scheme: light;
6+
}
7+
8+
--pf-text: #{colors.$coal};
9+
--pf-text-secondary: #{colors.$grey_600};
10+
--pf-text-muted: #{colors.$grey_600};
11+
--pf-background: #{colors.$grey_100};
12+
--pf-error-bg: #{colors.$grey_100};
13+
--pf-border: transparent;
14+
--pf-border-focus: transparent;
15+
--pf-outline-focus: transparent;
16+
--pf-skeleton: #{colors.$grey_400};
17+
--pf-skeleton-shine: #{colors.$grey_200};
18+
--pf-hover: #{colors.$grey_300};
19+
--pf-mark: #{colors.$flamingo};
20+
--pf-scroll-shadow: rgba(0, 0, 0, 0.08);
21+
22+
//--pf-icon-search: url("data:image/svg+xml,...");
23+
//--pf-icon-arrow: url("data:image/svg+xml,...");
24+
25+
--pf-outline-width: 0;
26+
--pf-outline-offset: 0;
27+
--pf-font: inherit;
28+
--pf-input-height: 3rem;
29+
--pf-border-radius: 0;
30+
--pf-image-width: 64px;
31+
--pf-image-height: 48px;
32+
--pf-searchbox-max-width: 480px;
33+
--pf-searchbox-dropdown-max-height: 320px;
34+
}

‎manual/assets/js/src/components/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export { Component } from "./Component.js";
12
export { NavigationManager } from "./NavigationManager.js";
23
export { SidebarManager } from "./SidebarManager.js";
34
export { ThemeManager } from "./ThemeManager.js";

0 commit comments

Comments
 (0)