Skip to content

Commit d1cc37a

Browse files
Update README.md
1 parent 5ec8590 commit d1cc37a

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

README.en.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Add Live2D widget to web page. Compatible with PJAX.
2020
You can also check out example web pages:
2121

2222
- Check the effect in the lower left corner of [Mimi's Blog](https://zhangshuqiao.org)
23-
- [demo.html](https://stevenjoezhang.github.io/live2d-widget/demo/demo.html) to demonstrate basic functionality
24-
- [login.html](https://stevenjoezhang.github.io/live2d-widget/demo/login.html) to imitate the login interface of NPM
23+
- [demo/demo.html](https://live2d-widget.pages.dev/demo/demo) to demonstrate basic functionality
24+
- [demo/login.html](https://live2d-widget.pages.dev/demo/login) to imitate the login interface of NPM
2525

2626
## Usage
2727

@@ -37,7 +37,7 @@ If you are interested in customizing the widget, please refer to the detailed in
3737

3838
## Configuration
3939

40-
You can refer to the source code of `autoload.js` to see the available configuration options. `autoload.js` will automatically load three files: `waifu.css`, `live2d.min.js`, and `waifu-tips.js`. `waifu-tips.js` creates the `initWidget` function, which is the main function for loading the widget. The `initWidget` function accepts an object-type parameter as the configuration for the widget. The following are the available options:
40+
You can refer to the source code of `dist/autoload.js` to see the available configuration options. `autoload.js` will automatically load three files: `waifu.css`, `live2d.min.js`, and `waifu-tips.js`. `waifu-tips.js` creates the `initWidget` function, which is the main function for loading the widget. The `initWidget` function accepts an object-type parameter as the configuration for the widget. The following are the available options:
4141

4242
| Option | Type | Default Value | Description |
4343
| ------ | ---- | ------------- | ----------- |
@@ -52,10 +52,13 @@ Among them, the parameters `apiPath` and `cdnPath` only need to set one of them.
5252

5353
If the options provided in the "Configuration" section above are not enough to meet your needs, you can make modifications yourself. The directory structure of this repository is as follows:
5454

55-
- `src/waifu-tips.js` contains the logic for the button and dialog box.
56-
- `waifu-tips.js` is automatically generated by `src/waifu-tips.js` and it is not recommended to modify it directly.
57-
- `waifu-tips.json` defines the triggering conditions (`selector`, CSS selector) and the displayed text when triggered (`text`).
58-
- `waifu.css` is the style sheet for the virtual assistant.
55+
- `src/` directory contains the code for each component, e.g. the button and dialog box.
56+
- `build/` directory contains the files built by TypeScript.
57+
- `dist/` directory contains the files that can be directly used on web pages after packaging, including:
58+
- `autoload.js` is used to automatically load other resources such as style sheets.
59+
- `waifu-tips.js` is automatically generated by `build/waifu-tips.js` and it is not recommended to modify it directly.
60+
- `waifu-tips.json` defines the triggering conditions (`selector`, CSS selector) and the displayed text when triggered (`text`).
61+
- `waifu.css` is the style sheet for the virtual assistant.
5962

6063
By default, the CSS selector rules in `waifu-tips.json` are effective for the Hexo [NexT theme](http://github.com/next-theme/hexo-theme-next), but you may need to modify or add new content to make it suitable for your own website.
6164
**Warning: The content in `waifu-tips.json` may not be suitable for all age groups or appropriate to access during work. Please ensure their suitability when using them.**

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
你也可以查看示例网页:
2121

2222
-[米米的博客](https://zhangshuqiao.org) 的左下角可查看效果
23-
- [demo.html](https://stevenjoezhang.github.io/live2d-widget/demo/demo.html),展现基础功能
24-
- [login.html](https://stevenjoezhang.github.io/live2d-widget/demo/login.html),仿 NPM 的登陆界面
23+
- [demo/demo.html](https://live2d-widget.pages.dev/demo/demo),展现基础功能
24+
- [demo/login.html](https://live2d-widget.pages.dev/demo/login),仿 NPM 的登陆界面
2525

2626
## 使用
2727

@@ -37,7 +37,7 @@
3737

3838
## 配置
3939

40-
你可以对照 `autoload.js` 的源码查看可选的配置项目。`autoload.js` 会自动加载三个文件:`waifu.css``live2d.min.js``waifu-tips.js``waifu-tips.js` 会创建 `initWidget` 函数,这就是加载看板娘的主函数。`initWidget` 函数接收一个 Object 类型的参数,作为看板娘的配置。以下是配置选项:
40+
你可以对照 `dist/autoload.js` 的源码查看可选的配置项目。`autoload.js` 会自动加载三个文件:`waifu.css``live2d.min.js``waifu-tips.js``waifu-tips.js` 会创建 `initWidget` 函数,这就是加载看板娘的主函数。`initWidget` 函数接收一个 Object 类型的参数,作为看板娘的配置。以下是配置选项:
4141

4242
| 选项 | 类型 | 默认值 | 说明 |
4343
| - | - | - | - |
@@ -52,10 +52,13 @@
5252

5353
如果以上「配置」部分提供的选项还不足以满足你的需求,那么你可以自己进行修改。本仓库的目录结构如下:
5454

55-
- `src/waifu-tips.js` 包含了按钮和对话框的逻辑;
56-
- `waifu-tips.js` 是由 `src/waifu-tips.js` 自动打包生成的,不建议直接修改;
57-
- `waifu-tips.json` 中定义了触发条件(`selector`,CSS 选择器)和触发时显示的文字(`text`);
58-
- `waifu.css` 是看板娘的样式表。
55+
- `src/` 目录下包含了各个组件的代码,例如按钮和对话框等;
56+
- `build/` 目录下包含了 TypeScript 构建后的文件;
57+
- `dist/` 目录下包含了进一步打包后网页直接可用的文件,其中:
58+
- `autoload.js` 是用于自动加载其它资源,例如样式表等;
59+
- `waifu-tips.js` 是由 `build/waifu-tips.js` 自动打包生成的,不建议直接修改;
60+
- `waifu-tips.json` 中定义了触发条件(`selector`,CSS 选择器)和触发时显示的文字(`text`);
61+
- `waifu.css` 是看板娘的样式表。
5962

6063
`waifu-tips.json` 中默认的 CSS 选择器规则是对 Hexo 的 [NexT 主题](http://github.com/next-theme/hexo-theme-next) 有效的,为了适用于你自己的网页,可能需要自行修改,或增加新内容。
6164
**警告:`waifu-tips.json` 中的内容可能不适合所有年龄段,或不宜在工作期间访问。在使用时,请自行确保它们是合适的。**

0 commit comments

Comments
 (0)