koishi-plugin-bilibili-notify 1.3.0-rc.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -294,9 +294,29 @@ class GenerateImg extends koishi_1.Service {
294
294
  }
295
295
  // 图片
296
296
  let major = '';
297
+ const arrowImg = (0, url_1.pathToFileURL)((0, path_1.resolve)(__dirname, 'img/arrow.png'));
297
298
  if (module_dynamic.major && module_dynamic.major.draw) {
298
299
  if (module_dynamic.major.draw.items.length === 1) {
299
- major += `<img class="single-photo-item" src="${module_dynamic.major.draw.items[0].src}"/>`;
300
+ let height = module_dynamic.major.draw.items[0].height;
301
+ console.log(height);
302
+ if (height > 3000) {
303
+ major += `
304
+ <div class="single-photo-container">
305
+ <img class="single-photo-item" src="${module_dynamic.major.draw.items[0].src}"/>
306
+ <div class="single-photo-mask">
307
+ <span class="single-photo-mask-text">点击链接浏览全部</span>
308
+ </div>
309
+ <img class="single-photo-mask-arrow" src="${arrowImg}"/>
310
+ </div>
311
+ `;
312
+ }
313
+ else {
314
+ major += `
315
+ <div class="single-photo-container">
316
+ <img class="single-photo-item" src="${module_dynamic.major.draw.items[0].src}"/>
317
+ </div>
318
+ `;
319
+ }
300
320
  }
301
321
  else if (module_dynamic.major.draw.items.length === 4) {
302
322
  major += module_dynamic.major.draw.items.reduce((acc, cV) => {
@@ -678,6 +698,43 @@ class GenerateImg extends koishi_1.Service {
678
698
  object-fit: cover;
679
699
  }
680
700
 
701
+ .card .card-major .single-photo-mask {
702
+ position: absolute;
703
+ text-align: center;
704
+ width: 100%;
705
+ height: 100%;
706
+ top: 0;
707
+ left: 0;
708
+ background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 30%);
709
+ }
710
+
711
+ .card .card-major .single-photo-mask-text {
712
+ position: absolute;
713
+ color: #fff;
714
+ font-size: 24px;
715
+ right: 0;
716
+ bottom: 66px;
717
+ left: 0;
718
+ text-align: center;
719
+ }
720
+
721
+ .card .card-major .single-photo-mask-arrow {
722
+ position: absolute;
723
+ width: 70px;
724
+ height: 70px;
725
+ bottom: 7px;
726
+ left: 50%;
727
+ transform: translateX(-50%);
728
+ }
729
+
730
+ .card .card-major .single-photo-container {
731
+ position: relative;
732
+ max-width: 500px;
733
+ max-height: 1000px;
734
+ border-radius: 10px;
735
+ overflow: hidden;
736
+ }
737
+
681
738
  .card .card-major .single-photo-item {
682
739
  max-width: 500px;
683
740
  border-radius: 10px;
@@ -1007,6 +1064,43 @@ class GenerateImg extends koishi_1.Service {
1007
1064
  object-fit: cover;
1008
1065
  }
1009
1066
 
1067
+ .card .card-major .single-photo-mask {
1068
+ position: absolute;
1069
+ text-align: center;
1070
+ width: 100%;
1071
+ height: 100%;
1072
+ top: 0;
1073
+ left: 0;
1074
+ background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 30%);
1075
+ }
1076
+
1077
+ .card .card-major .single-photo-mask-text {
1078
+ position: absolute;
1079
+ color: #fff;
1080
+ font-size: 24px;
1081
+ right: 0;
1082
+ bottom: 66px;
1083
+ left: 0;
1084
+ text-align: center;
1085
+ }
1086
+
1087
+ .card .card-major .single-photo-mask-arrow {
1088
+ position: absolute;
1089
+ width: 70px;
1090
+ height: 70px;
1091
+ bottom: 7px;
1092
+ left: 50%;
1093
+ transform: translateX(-50%);
1094
+ }
1095
+
1096
+ .card .card-major .single-photo-container {
1097
+ position: relative;
1098
+ max-width: 500px;
1099
+ max-height: 1000px;
1100
+ border-radius: 10px;
1101
+ overflow: hidden;
1102
+ }
1103
+
1010
1104
  .card .card-major .single-photo-item {
1011
1105
  max-width: 500px;
1012
1106
  border-radius: 10px;
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bilibili-notify",
3
3
  "description": "Koishi bilibili notify plugin",
4
- "version": "1.3.0-rc.0",
4
+ "version": "1.3.1",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -163,6 +163,8 @@
163
163
  - ver 1.3.0-alpha.0 对直播推送逻辑进行小型重构,优化了性能。新增功能:定时推送直播卡片可选是否发送直播链接;在遇到getMasterInfo()错误时,可切换获取主播信息Api
164
164
  - ver 1.3.0-alpha.1 修复bug:发送直播开播通知时,如果在开播语中加入链接,同时开启了推送直播卡片发送直播链接,则会发送两条链接
165
165
  - ver 1.3.0-rc.0 修复bug:发送直播开播通知时,如果开启了开播发送链接,会在链接末尾添加一个false
166
+ - ver 1.3.0 修复bug:渲染动态时,过长的单图会导致渲染错误
167
+ - ver 1.3.1 优化过长单图的显示样式
166
168
 
167
169
  ## 交流群
168
170