diff --git a/.gitignore b/.gitignore
index 8fa29f0..1b6267f 100755
--- a/.gitignore
+++ b/.gitignore
@@ -72,4 +72,5 @@ application-local.properties
/packages/*/node_modules/
node_modules
-/workplace/
\ No newline at end of file
+/workplace/
+/src/main/resources/static/
\ No newline at end of file
diff --git a/README.md b/README.md
index 2781f07..6538391 100644
--- a/README.md
+++ b/README.md
@@ -28,43 +28,252 @@ cd path/to/plugin-comment-widget
```bash
./gradlew pnpmInstall
-./gradlew build
+# 启动一个 Docker 容器作为开发环境并自动加载此插件
+./gradlew haloServer
```
-修改 Halo 配置文件:
-
-```yaml
-halo:
- plugin:
- runtime-mode: development
- classes-directories:
- - "build/classes"
- - "build/resources"
- lib-directories:
- - "libs"
- fixedPluginPath:
- - "/path/to/plugin-comment-widget"
-```
+Halo 插件的详细开发文档可查阅 [插件开发](https://docs.halo.run/category/%E6%8F%92%E4%BB%B6%E5%BC%80%E5%8F%91)。
## 主题适配
-此插件是一个通用的评论组件插件,主题需要针对此类型插件做适配。Halo 为模板引擎提供了专门的标签(点击查看 CSS 代码模板
+
+```css
+:root {
+ --halo-comment-widget-base-border-radius: ;
+ --halo-comment-widget-base-font-size: ;
+ --halo-comment-widget-base-line-height: ;
+ --halo-comment-widget-base-font-family: ;
+ --halo-comment-widget-component-avatar-rounded: ;
+ --halo-comment-widget-component-avatar-size: ;
+ --halo-comment-widget-component-form-input-bg-color: ;
+ --halo-comment-widget-component-form-input-color: ;
+ --halo-comment-widget-component-form-input-border-color: ;
+ --halo-comment-widget-component-form-input-border-color-focus: ;
+ --halo-comment-widget-component-form-input-box-shadow-focus: ;
+ --halo-comment-widget-component-form-button-login-bg-color: ;
+ --halo-comment-widget-component-form-button-login-bg-color-hover: ;
+ --halo-comment-widget-component-form-button-login-border-color: ;
+ --halo-comment-widget-component-form-button-submit-bg-color: ;
+ --halo-comment-widget-component-form-button-submit-color: ;
+ --halo-comment-widget-component-form-button-submit-border-color: ;
+ --halo-comment-widget-component-form-button-submit-border-color-hover: ;
+ --halo-comment-widget-component-form-button-emoji-color: ;
+ --halo-comment-widget-component-comment-item-action-bg-color-hover: ;
+ --halo-comment-widget-component-comment-item-action-color: ;
+ --halo-comment-widget-component-comment-item-action-color-hover: ;
+ --halo-comment-widget-component-pagination-button-bg-color-hover: ;
+ --halo-comment-widget-component-pagination-button-bg-color-active: ;
+ --halo-comment-widget-component-pagination-button-border-color-active: ;
+ --halo-comment-widget-component-emoji-picker-rgb-color: ;
+ --halo-comment-widget-component-emoji-picker-rgb-accent: ;
+ --halo-comment-widget-component-emoji-picker-rgb-background: ;
+ --halo-comment-widget-component-emoji-picker-rgb-input: ;
+ --halo-comment-widget-component-emoji-picker-color-border: ;
+ --halo-comment-widget-component-emoji-picker-color-border-over: ;
+}
+```
+
+
+${this.content}
{{ comment?.spec.content }}-
Comment widget attributes 'kind' is required but missing found.
"; @@ -62,21 +61,19 @@ private String commentHtml(IAttribute groupAttribute, IAttribute kindAttribute, properties.setProperty("group", group); properties.setProperty("kind", kindAttribute.getValue()); properties.setProperty("name", nameAttribute.getValue()); - properties.setProperty("colorScheme", getColorScheme(colorSchemeAttribute)); properties.setProperty("domId", domIdFrom(group, kindAttribute.getValue(), nameAttribute.getValue())); return PROPERTY_PLACEHOLDER_HELPER.replacePlaceholders(""" + @@ -95,9 +92,4 @@ private String getGroup(IAttribute groupAttribute) { return groupAttribute.getValue() == null ? "" : StringUtils.defaultString(groupAttribute.getValue()); } - - private String getColorScheme(IAttribute colorSchemeAttribute) { - return colorSchemeAttribute == null ? "'light'" - : StringUtils.defaultString(colorSchemeAttribute.getValue(), "'light'"); - } } diff --git a/src/main/resources/static/comment-widget.iife.js b/src/main/resources/static/comment-widget.iife.js deleted file mode 100644 index ced4b6d..0000000 --- a/src/main/resources/static/comment-widget.iife.js +++ /dev/null @@ -1,63 +0,0 @@ -var CommentWidget=function(Ji){"use strict";function Xi(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i