Skip to content

Commit cbaa5ae

Browse files
author
tiezhudotwang
committed
Fix:在有的页面上,高度错误
1 parent 76315ca commit cbaa5ae

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

README.en.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ You can add emoji reaction functionality to your page, with just two lines of co
1111

1212
### Via CDN (Recommended)
1313
```
14-
<script type="module" src="https://cdn.jsdelivr.net/gh/emaction/frontend.dist@1.0.8/bundle.js"></script>
14+
<script type="module" src="https://cdn.jsdelivr.net/gh/emaction/frontend.dist@1.0.9/bundle.js"></script>
1515
```
1616
then
1717
```
1818
<emoji-reaction></emoji-reaction>
1919
```
20+
That's it!
2021

2122
### NPM
2223
```
@@ -67,11 +68,5 @@ You can specify dark/light mode through the `theme` custom property, It supports
6768
### Custom backend
6869
You can also reference [emaction.backend](https://github.com/emaction/emaction.backend) to build your own backend to save data, then specify the API address through the `endpoint` property.
6970

70-
### Custom page id
71-
The page id is used to identify the current page. Data with the same page id will remain consistent. Generally you don't need to specify the page id yourself, because emaction will follow the canonical meta to find the canonical URL for the current content. If you do need to specify the page id, you can do so through the `reactionTargetId` attribute.
72-
73-
## TODO
74-
75-
- [ ] GitHub Actions to publish npm automatically.
76-
- [ ] GitHub Actions to publish dist repo automatically.
77-
- [ ] Cool Badges.
71+
### Custom target id
72+
The target id is used to identify what the reaction is referring to (usually the page it is on). Typically you do not need to specify a target id, because emaction will look for the canonical meta tag to determine the canonical URL for the current page content. If you do need to customize the target id (for example, to add reactions for each individual comment on a page), you can specify it using the reactionTargetId attribute.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ emaction 是一个标准 web component,可以用在任何 html 页面中。
1818

1919
### 通过 CDN 引入(推荐)
2020
```
21-
<script type="module" src="https://cdn.jsdelivr.net/gh/emaction/frontend.dist@1.0.8/bundle.js"></script>
21+
<script type="module" src="https://cdn.jsdelivr.net/gh/emaction/frontend.dist@1.0.9/bundle.js"></script>
2222
```
2323
然后
2424
```
2525
<emoji-reaction></emoji-reaction>
2626
```
27+
就 Ok 啦!
2728

2829
### 通过 NPM 使用
2930
```
@@ -81,5 +82,5 @@ npm install emaction
8182

8283
你可以参考 [这个](https://github.com/emaction/emaction.backend) 后端仓库,来构建自己的后端服务,以存储自己的数据,并通过 `endpoint` 属性来指定后端接口地址。
8384

84-
### 自定义页面 id
85-
页面 id 是用来标识当前页面的 id,同一个 id 的多个页面,共享一份 reaction 数据。一般情况下,你不需要指定页面 id,因为 emaction 会查找 canonical meta 来确定当前内容对应的规范链接。如果你确实需要自定义页面 id,可以通过属性 `reactionTargetId`来指定。
85+
### 自定义目标 id
86+
目标 id 用来标识 reaction 所针对的目标(一般是所在页面)。一般情况下,你不需要指定目标 id,因为 emaction 会查找 canonical meta 来确定当前页面内容对应的规范链接。如果你确实需要自定义目标 id(比如想为页面内每个评论都添加 reaction),可以通过属性 `reactionTargetId`来指定。

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export class EmojiReaction extends LitElement {
142142
}
143143
</style>
144144
<!-- container -->
145-
<div style="flex-wrap: nowrap; max-width: 100%; display: flex; gap: 0.375rem;" class="${this?.theme === 'dark' || (this?.theme === 'system' && system_theme === 'dark') ? 'container-dark' : 'container'}">
145+
<div style="flex-wrap: nowrap; max-width: 100%; display: flex; gap: 0.375rem; height: 1.5rem;" class="${this?.theme === 'dark' || (this?.theme === 'system' && system_theme === 'dark') ? 'container-dark' : 'container'}">
146146
<!-- 灰色笑脸 -->
147147
<div style="position: relative; user-select: none;">
148148
<div id="start-smile" @click="${this._showAvailable}"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "emaction",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"private": false,
55
"description": "GitHub styled emoji reaction for blogs.",
66
"keywords": [

0 commit comments

Comments
 (0)