diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 281a0d0..ca446e5 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -25,7 +25,7 @@ export default defineConfig({ text: 'Features', collapsed: false, items: [ - { text: 'loadScript', link: '/loadScript' }, + { text: 'loadScript, loadCSS', link: '/loadScript' }, { text: 'TranslationService', link: '/translation' }, { text: 'Analytics', link: '/analytics' }, { text: 'AdminService', link: '/adminService' }, diff --git a/docs/components/LoadScriptDemo.vue b/docs/components/LoadScriptDemo.vue index 3c09d7e..57c657d 100755 --- a/docs/components/LoadScriptDemo.vue +++ b/docs/components/LoadScriptDemo.vue @@ -1,18 +1,24 @@ @@ -31,6 +52,9 @@ async function load(src: string) {
+

+ +

loading...

diff --git a/docs/index.md b/docs/index.md index 0822689..92eb7a0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -27,7 +27,7 @@ yarn add @naturalcycles/frontend-lib ## Features -- [loadScript](loadScript.md) +- [loadScript, loadCSS](loadScript.md) - [TranslationService](translation.md) - [Analytics](analytics.md) - loadGTag diff --git a/docs/loadScript.md b/docs/loadScript.md index 1af04a9..335426f 100644 --- a/docs/loadScript.md +++ b/docs/loadScript.md @@ -1,4 +1,4 @@ -# loadScript +# loadScript, loadCSS ```typescript await loadScript('https://gtm.com/script.js') @@ -8,7 +8,7 @@ await loadScript('https://gtm.com/script.js') Works in old-school (and reliable) way by injecting a `