|
| 1 | +diff --git a/node_modules/@astrojs/starlight-docsearch/DocSearch.astro b/node_modules/@astrojs/starlight-docsearch/DocSearch.astro |
| 2 | +index f50c208..82218df 100644 |
| 3 | +--- a/node_modules/@astrojs/starlight-docsearch/DocSearch.astro |
| 4 | ++++ b/node_modules/@astrojs/starlight-docsearch/DocSearch.astro |
| 5 | +@@ -110,14 +110,14 @@ const docsearchTranslations: DocSearchTranslationProps = { |
| 6 | + margin-inline-start: auto; |
| 7 | + } |
| 8 | + .DocSearch-Button-Keys::before { |
| 9 | +- content: ''; |
| 10 | +- width: 1em; |
| 11 | +- height: 1em; |
| 12 | +- -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E"); |
| 13 | +- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z'%3E%3C/path%3E%3Cpath d='M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z'%3E%3C/path%3E%3C/svg%3E"); |
| 14 | +- -webkit-mask-size: 100%; |
| 15 | +- mask-size: 100%; |
| 16 | +- background-color: currentColor; |
| 17 | ++ content: var(--docsearch-shortcut); |
| 18 | ++ font-size: 0.75em; |
| 19 | ++ font-weight: 600; |
| 20 | ++ opacity: 0.8; |
| 21 | ++ border: 1px solid var(--sl-color-gray-4); |
| 22 | ++ border-radius: 0.25rem; |
| 23 | ++ padding: 0.125rem 0.375rem; |
| 24 | ++ background-color: var(--sl-color-gray-6); |
| 25 | + } |
| 26 | + } |
| 27 | + </style> |
| 28 | +@@ -128,6 +128,11 @@ const docsearchTranslations: DocSearchTranslationProps = { |
| 29 | + class StarlightDocSearch extends HTMLElement { |
| 30 | + constructor() { |
| 31 | + super(); |
| 32 | ++ const isApple = /Mac|iPhone|iPod|iPad/.test(navigator.platform); |
| 33 | ++ const shortcut = isApple ? '⌘K' : 'Ctrl+K'; |
| 34 | ++ |
| 35 | ++ this.style.setProperty('--docsearch-shortcut', `'${shortcut}'`); |
| 36 | ++ |
| 37 | + window.addEventListener('DOMContentLoaded', async () => { |
| 38 | + const { default: docsearch } = await import('@docsearch/js'); |
| 39 | + const options = { ...config, container: 'sl-doc-search' }; |
0 commit comments