@brillout/docpress 0.12.4 → 0.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,7 +14,7 @@ type HierarchyType = Exclude<DocSearchHit['type'], 'content'>
|
|
|
14
14
|
|
|
15
15
|
function Hit({ hit }: HitProps) {
|
|
16
16
|
return (
|
|
17
|
-
<a href={hit.
|
|
17
|
+
<a href={hit.url}>
|
|
18
18
|
<div className="DocSearch-Hit-Container">
|
|
19
19
|
{(hit as InternalDocSearchHit).__docsearch_parent && (
|
|
20
20
|
<svg className="DocSearch-Hit-Tree" viewBox="0 0 24 54">
|
package/css/code/block.css
CHANGED
|
@@ -32,18 +32,25 @@ figure[data-rehype-pretty-code-figure] {
|
|
|
32
32
|
font-size: 0.8em !important;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
/* `@media (pointer: fine)`
|
|
36
|
+
* - Further reduce code block font size only on mobile.
|
|
37
|
+
* - https://github.com/vikejs/vike/issues/2369#issuecomment-2803046966
|
|
38
|
+
* - https://stackoverflow.com/questions/23885255/how-to-remove-ignore-hover-css-style-on-touch-devices/64553121#64553121
|
|
39
|
+
*/
|
|
40
|
+
@media not all and (hover: hover) and (pointer: fine) {
|
|
41
|
+
@container container-viewport (max-width: 620px) {
|
|
42
|
+
pre > code {
|
|
43
|
+
font-size: 0.7em !important;
|
|
44
|
+
}
|
|
38
45
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
@container container-viewport (max-width: 550px) {
|
|
47
|
+
pre > code {
|
|
48
|
+
font-size: 0.6em !important;
|
|
49
|
+
}
|
|
43
50
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
@container container-viewport (max-width: 450px) {
|
|
52
|
+
pre > code {
|
|
53
|
+
font-size: 0.5em !important;
|
|
54
|
+
}
|
|
48
55
|
}
|
|
49
56
|
}
|
|
@@ -21,6 +21,14 @@ function DocSearchInstall() {
|
|
|
21
21
|
searchParameters={{
|
|
22
22
|
filters: 'is_available:true',
|
|
23
23
|
}}
|
|
24
|
+
transformItems={(hits) => {
|
|
25
|
+
hits.map((hit) => {
|
|
26
|
+
if (hit.type === 'lvl1') {
|
|
27
|
+
hit.url = hit.url.split('#')[0]
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
return hits
|
|
31
|
+
}}
|
|
24
32
|
/>
|
|
25
33
|
</div>
|
|
26
34
|
)
|