xaoxuu / hexo-theme-stellar

内置文档系统的简约商务风Hexo主题,支持大量的标签组件和动态数据组件。
https://xaoxuu.com/wiki/stellar/
MIT License
1.19k stars 303 forks source link

建议增加聊天会话标签组件 #471

Open xaoxuu opened 1 month ago

xaoxuu commented 1 month ago

检查清单

问题描述

适用于展示聊天对话,但又无法直接提供截图的场景。

用户信息在 _data/users.yml 中配置:

user1:
  name:
  avatar: 
  label:
    text: 群主
    textColor: white
    bgColor: #2196f3
user2:
  name:
  avatar: 

用法:

{% chat style:wechat/qq [title:导航栏标题可选] %}
{% chattip 2024年5月22日 21:43 %}
{% chatcell user:user1 你好 %} // 文字消息,默认靠左布局
{% chatcell user:user2 align:right Are U OK %} // 文字消息,靠右布局(我发送的消息)
{% chatcell user:user3 image:src %} // 图片消息(默认支持fancybox)
{% chatcell user:user3 emoji:xxx %} // 表情包消息(这里用的是emoji组件的资源,标准emoji的话直接输入就行)
{% chatcell user:user1 voice:src %} // 语音消息(可播放)
{% chatcell user:user1 video:src %} // 视频消息(可播放)
{% chatcell user:user1 link:href %} // 链接卡片消息(可点击跳转)
{% chatcell user:user1 file:href %} // 文件消息(可下载)
{% endchat %}

如果有时间的话,把 frame 组件的设备模型图加上,就更像了。

github-actions[bot] commented 1 month ago

:wave: Hello, Your suggestion is great, we will add this feature in subsequent versions, thank you very much!

:wave: 您好, 您的建议很棒,我们将会在后续版本中加入这个功能,非常感谢!