]> www.git.dmfe.net Git - dmfe-website/commitdiff
Add 'docusaurus-search-local' & Change css styles.
authorDmitry Fedotov <dm.fe@yandex.ru>
Sat, 13 Apr 2024 14:05:09 +0000 (17:05 +0300)
committerDmitry Fedotov <dm.fe@yandex.ru>
Sat, 13 Apr 2024 14:05:09 +0000 (17:05 +0300)
docusaurus.config.js
package-lock.json
package.json
src/css/custom.css

index e904f8c8dce0ef8c8a7904d611f73c180c25addd..9b62b2f4db5fb227bad4647854083a0e39618486 100644 (file)
@@ -104,7 +104,19 @@ const config = {
         theme: prismThemes.github,
         darkTheme: prismThemes.dracula,
       },
+      colorMode: {
+        defaultMode: 'dark',
+      },
     }),
+
+  plugins: [
+    [
+      require.resolve("@cmfcmf/docusaurus-search-local"),
+      {
+        language: ['en', 'ru'],
+      }
+    ]
+  ],
 };
 
 export default config;
index 6de8d19938e4edad753a83fd9cc9014121fe0ef5..963c8d52a291651858caa4a49c1b1b17652ac1e4 100644 (file)
@@ -8,6 +8,7 @@
       "name": "dmfe-site",
       "version": "0.0.1",
       "dependencies": {
+        "@cmfcmf/docusaurus-search-local": "^1.1.0",
         "@docusaurus/core": "3.2.1",
         "@docusaurus/preset-classic": "3.2.1",
         "@docusaurus/theme-mermaid": "^3.2.1",
         "@algolia/autocomplete-shared": "1.9.3"
       }
     },
+    "node_modules/@algolia/autocomplete-js": {
+      "version": "1.17.0",
+      "resolved": "https://registry.npmjs.org/@algolia/autocomplete-js/-/autocomplete-js-1.17.0.tgz",
+      "integrity": "sha512-RbD98hXtZOl6VohSAo7kMOFWQHR1x4wWaJFadJradFQ1TAA9hFEyirSIM+yT96UpKkdi08V2EBI+YwZ3/VETvw==",
+      "dependencies": {
+        "@algolia/autocomplete-core": "1.17.0",
+        "@algolia/autocomplete-preset-algolia": "1.17.0",
+        "@algolia/autocomplete-shared": "1.17.0",
+        "htm": "^3.1.1",
+        "preact": "^10.13.2"
+      },
+      "peerDependencies": {
+        "@algolia/client-search": ">= 4.5.1 < 6",
+        "algoliasearch": ">= 4.9.1 < 6"
+      }
+    },
+    "node_modules/@algolia/autocomplete-js/node_modules/@algolia/autocomplete-core": {
+      "version": "1.17.0",
+      "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.17.0.tgz",
+      "integrity": "sha512-6E4sVb5+fGtSQs9mULlxUH84OWFUVZPMapa5dMCtUc7KyDRLY6+X/dA8xbDA8CX5phdBn1plLUET1B6NZnrZuw==",
+      "dependencies": {
+        "@algolia/autocomplete-plugin-algolia-insights": "1.17.0",
+        "@algolia/autocomplete-shared": "1.17.0"
+      }
+    },
+    "node_modules/@algolia/autocomplete-js/node_modules/@algolia/autocomplete-plugin-algolia-insights": {
+      "version": "1.17.0",
+      "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.17.0.tgz",
+      "integrity": "sha512-zbWImu+VxBDzUQONEhQXq3OzlipHLEtWbL4Nf/VOb1p1qHG/f96jCegOzzEZVPiQvZpRJnmhCUmsYNHlIBxKWw==",
+      "dependencies": {
+        "@algolia/autocomplete-shared": "1.17.0"
+      },
+      "peerDependencies": {
+        "search-insights": ">= 1 < 3"
+      }
+    },
+    "node_modules/@algolia/autocomplete-js/node_modules/@algolia/autocomplete-preset-algolia": {
+      "version": "1.17.0",
+      "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.17.0.tgz",
+      "integrity": "sha512-DhTkMs/9BzThhTU2nSTpQxVxHLzaRDZLid4Tf56D8s9IhEGfmzbNuLRmJNzgAOPv1smHtUErndmC+S9QNMDEJA==",
+      "dependencies": {
+        "@algolia/autocomplete-shared": "1.17.0"
+      },
+      "peerDependencies": {
+        "@algolia/client-search": ">= 4.9.1 < 6",
+        "algoliasearch": ">= 4.9.1 < 6"
+      }
+    },
+    "node_modules/@algolia/autocomplete-js/node_modules/@algolia/autocomplete-shared": {
+      "version": "1.17.0",
+      "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.17.0.tgz",
+      "integrity": "sha512-7su4KH/2q2Fhud2VujUNhCMbIh7yp6wqWR3UuVje5P3kDRhTotPRmg3iRQi48YRYkk9o+airsrLl+rxJ/9FWng==",
+      "peerDependencies": {
+        "@algolia/client-search": ">= 4.9.1 < 6",
+        "algoliasearch": ">= 4.9.1 < 6"
+      }
+    },
     "node_modules/@algolia/autocomplete-plugin-algolia-insights": {
       "version": "1.9.3",
       "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz",
         "algoliasearch": ">= 4.9.1 < 6"
       }
     },
+    "node_modules/@algolia/autocomplete-theme-classic": {
+      "version": "1.17.0",
+      "resolved": "https://registry.npmjs.org/@algolia/autocomplete-theme-classic/-/autocomplete-theme-classic-1.17.0.tgz",
+      "integrity": "sha512-FsW/J/mG1YIPv93/QQ7KxMVNXAiVi9accGgoK2y3zDz58WpVgUug97SUoQzP4I9EMZAZAHQo0QbWXxpqTWkcOA=="
+    },
     "node_modules/@algolia/cache-browser-local-storage": {
       "version": "4.23.2",
       "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.23.2.tgz",
       "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz",
       "integrity": "sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A=="
     },
+    "node_modules/@cmfcmf/docusaurus-search-local": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@cmfcmf/docusaurus-search-local/-/docusaurus-search-local-1.1.0.tgz",
+      "integrity": "sha512-0IVb/aA0IK8ZlktuxmgXmluXfcSpo6Vdd2nG21y1aOH9nVYnPP231Dn0H8Ng9Qf9ronQQCDWHnuWpYOr9rUrEQ==",
+      "dependencies": {
+        "@algolia/autocomplete-js": "^1.8.2",
+        "@algolia/autocomplete-theme-classic": "^1.8.2",
+        "@algolia/client-search": "^4.12.0",
+        "algoliasearch": "^4.12.0",
+        "cheerio": "^1.0.0-rc.9",
+        "clsx": "^1.1.1",
+        "lunr-languages": "^1.4.0",
+        "mark.js": "^8.11.1"
+      },
+      "peerDependencies": {
+        "@docusaurus/core": "^2.0.0",
+        "nodejieba": "^2.5.0"
+      },
+      "peerDependenciesMeta": {
+        "nodejieba": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@cmfcmf/docusaurus-search-local/node_modules/clsx": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",
+      "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==",
+      "engines": {
+        "node": ">=6"
+      }
+    },
     "node_modules/@colors/colors": {
       "version": "1.5.0",
       "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
         "safe-buffer": "~5.1.0"
       }
     },
+    "node_modules/htm": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/htm/-/htm-3.1.1.tgz",
+      "integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ=="
+    },
     "node_modules/html-entities": {
       "version": "2.5.2",
       "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz",
         "yallist": "^3.0.2"
       }
     },
+    "node_modules/lunr-languages": {
+      "version": "1.14.0",
+      "resolved": "https://registry.npmjs.org/lunr-languages/-/lunr-languages-1.14.0.tgz",
+      "integrity": "sha512-hWUAb2KqM3L7J5bcrngszzISY4BxrXn/Xhbb9TTCJYEGqlR1nG67/M14sp09+PTIRklobrn57IAxcdcO/ZFyNA=="
+    },
+    "node_modules/mark.js": {
+      "version": "8.11.1",
+      "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz",
+      "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ=="
+    },
     "node_modules/markdown-extensions": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz",
         "postcss": "^8.2.15"
       }
     },
+    "node_modules/preact": {
+      "version": "10.20.2",
+      "resolved": "https://registry.npmjs.org/preact/-/preact-10.20.2.tgz",
+      "integrity": "sha512-S1d1ernz3KQ+Y2awUxKakpfOg2CEmJmwOP+6igPx6dgr6pgDvenqYviyokWso2rhHvGtTlWWnJDa7RaPbQerTg==",
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/preact"
+      }
+    },
     "node_modules/pretty-error": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz",
index 28224555b0d9f8eb3c634cce58283dc59fdeee92..28fcaceee77e18bbc086a856246a0aa9dfd00b7b 100644 (file)
@@ -14,6 +14,7 @@
     "write-heading-ids": "docusaurus write-heading-ids"
   },
   "dependencies": {
+    "@cmfcmf/docusaurus-search-local": "^1.1.0",
     "@docusaurus/core": "3.2.1",
     "@docusaurus/preset-classic": "3.2.1",
     "@docusaurus/theme-mermaid": "^3.2.1",
     "react": "^18.0.0",
     "react-dom": "^18.0.0"
   },
+  "overrides": {
+    "@cmfcmf/docusaurus-search-local": {
+      "@docusaurus/core": "^3.2.1"
+    }
+  },
   "devDependencies": {
     "@docusaurus/module-type-aliases": "3.2.1",
     "@docusaurus/types": "3.2.1"
index 2bc6a4cfdef4e06006b9a2501525889aa5e597c9..7fcb4d5204daaa39f8d3e3858d9133b26f9f778b 100644 (file)
@@ -6,25 +6,33 @@
 
 /* You can override the default Infima variables here. */
 :root {
-  --ifm-color-primary: #2e8555;
-  --ifm-color-primary-dark: #29784c;
-  --ifm-color-primary-darker: #277148;
-  --ifm-color-primary-darkest: #205d3b;
-  --ifm-color-primary-light: #33925d;
-  --ifm-color-primary-lighter: #359962;
-  --ifm-color-primary-lightest: #3cad6e;
+  --ifm-color-primary: #96611a;
+  --ifm-color-primary-dark: #805216;
+  --ifm-color-primary-darker: #6b4512;
+  --ifm-color-primary-darkest: #52350f;
+  --ifm-color-primary-light: #996622;
+  --ifm-color-primary-lighter: #9e6c29;
+  --ifm-color-primary-lightest: #996d31;
+
   --ifm-code-font-size: 95%;
   --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
+
+  --aa-primary-color-rgb: 82, 53, 15 !important;
+  --aa-muted-color-rgb: 153, 109, 49 !important;
 }
 
 /* For readability concerns, you should choose a lighter palette in dark mode. */
 [data-theme='dark'] {
-  --ifm-color-primary: #25c2a0;
-  --ifm-color-primary-dark: #21af90;
-  --ifm-color-primary-darker: #1fa588;
-  --ifm-color-primary-darkest: #1a8870;
-  --ifm-color-primary-light: #29d5b0;
-  --ifm-color-primary-lighter: #32d8b4;
-  --ifm-color-primary-lightest: #4fddbf;
+  --ifm-color-primary: #cf8b30;
+  --ifm-color-primary-dark: #bf802c;
+  --ifm-color-primary-darker: #a87127;
+  --ifm-color-primary-darkest: #8f6021;
+  --ifm-color-primary-light: #cf8f3a;
+  --ifm-color-primary-lighter: #c98f40;
+  --ifm-color-primary-lightest: #cc954b;
+  
   --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
+
+  --aa-primary-color-rgb: 143, 96, 33 !important;
+  --aa-muted-color-rgb: 204, 149, 75 !important;
 }