hexo-bb-channel 0.1.2 → 0.1.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.4 - 2026-07-20
4
+
5
+ ### Fixed
6
+
7
+ - Prevented touch browsers from showing two visually selected cards by limiting hover card styling to pointer devices and keeping mobile selection driven only by the active-card state.
8
+
9
+ ## 0.1.3 - 2026-07-20
10
+
11
+ ### Fixed
12
+
13
+ - Unified card hover and mobile auto-active styling so both states use the same transition timing, offset, border, background, and shadow behavior.
14
+ - Kept active-card placeholder outlines visible on mobile while image viewer open states still suppress the card offset.
15
+
16
+ ### Changed
17
+
18
+ - Exposed card interaction tokens as CSS variables so themes can tune the visual style without overriding plugin state selectors.
19
+
3
20
  ## 0.1.2 - 2026-07-20
4
21
 
5
22
  ### Fixed
@@ -13,4 +30,3 @@
13
30
 
14
31
  - Mobile card active styling now works without hover and keeps the original dashed placeholder visible.
15
32
  - Image carousel positioning uses non-smooth initial placement to avoid jumpy first-open behavior.
16
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-bb-channel",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Render Telegram channel microblog timelines in Hexo using a dynamic API backend.",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -29,11 +29,11 @@
29
29
  },
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "git+https://github.com/Kaaaaai/kaaaaai.tools.hexo-bb-channel.git"
32
+ "url": "git+https://github.com/kaaaaai/kaaaaai.tools.hexo-bb-channel.git"
33
33
  },
34
- "homepage": "https://github.com/Kaaaaai/kaaaaai.tools.hexo-bb-channel#readme",
34
+ "homepage": "https://github.com/kaaaaai/kaaaaai.tools.hexo-bb-channel#readme",
35
35
  "bugs": {
36
- "url": "https://github.com/Kaaaaai/kaaaaai.tools.hexo-bb-channel/issues"
36
+ "url": "https://github.com/kaaaaai/kaaaaai.tools.hexo-bb-channel/issues"
37
37
  },
38
38
  "author": "Kaaaaai",
39
39
  "license": "MIT",
@@ -389,7 +389,7 @@ function renderClientContent(config) {
389
389
  return normalizeHtml(`
390
390
  <style>
391
391
  .post-block:has(.bb-channel-portable) .post-title,.post-block:has(.bb-channel-portable) .post-meta-container,body:has(.bb-channel-portable) .post-toc-wrap{display:none}
392
- .bb-channel-portable{max-width:100%;margin:0 auto;color:#242424}
392
+ .bb-channel-portable{max-width:100%;margin:0 auto;color:#242424;--bb-card-transition:360ms cubic-bezier(.37,0,.63,1);--bb-card-offset-x:6px;--bb-card-offset-y:-6px;--bb-card-mobile-offset-x:4px;--bb-card-mobile-offset-y:-5px;--bb-card-placeholder-border:#d9d9d9;--bb-card-placeholder-bg:rgba(255,255,255,.2);--bb-card-surface-bg:rgba(255,255,255,.66);--bb-card-active-border:#e7b99d;--bb-card-active-bg:rgba(255,255,255,.86);--bb-card-active-shadow:0 14px 30px -28px rgba(15,23,42,.32)}
393
393
  .bb-channel-portable *{box-sizing:border-box}
394
394
  .bb-channel-portable .bb-channel-intro{position:relative;margin:0 0 1.55rem;padding:0;border-bottom:0}
395
395
  .bb-channel-portable .bb-channel-title{margin:0 0 .45rem;color:#202020;font-family:var(--bb-channel-title-font,inherit);font-size:1.72rem;font-weight:700;line-height:1.2;letter-spacing:0}
@@ -398,10 +398,11 @@ function renderClientContent(config) {
398
398
  .bb-channel-portable .bb-channel-feed{position:relative;display:flex;flex-direction:column;gap:1.05rem;padding-left:2.1rem}
399
399
  .bb-channel-portable .bb-channel-feed::before{content:"";position:absolute;left:.22rem;top:.25rem;bottom:.25rem;width:1px;background:linear-gradient(to bottom,rgba(226,226,226,0),#e2e2e2 1.2rem,#e2e2e2 calc(100% - 1.2rem),rgba(226,226,226,0))}
400
400
  .bb-channel-portable .bb-channel-card{position:relative;border-radius:14px}
401
- .bb-channel-portable .bb-channel-card-placeholder{pointer-events:none;position:absolute;inset:0;border:1px dashed #d9d9d9;border-radius:14px;background:rgba(255,255,255,.2);opacity:0;transition:opacity 320ms cubic-bezier(.22,1,.36,1)}
402
- .bb-channel-portable .bb-channel-card-surface{position:relative;z-index:1;border:1px dashed #d9d9d9;border-radius:14px;background:rgba(255,255,255,.66);padding:1.45rem 1.65rem;box-shadow:none;transition:border-color 320ms cubic-bezier(.22,1,.36,1),background-color 320ms cubic-bezier(.22,1,.36,1),box-shadow 320ms cubic-bezier(.22,1,.36,1),transform 320ms cubic-bezier(.22,1,.36,1)}
403
- .bb-channel-portable .bb-channel-card:hover .bb-channel-card-placeholder{opacity:1}
404
- .bb-channel-portable .bb-channel-card:hover .bb-channel-card-surface{transform:translate(6px,-6px);border-style:solid;border-color:#e7b99d;background:rgba(255,255,255,.86);box-shadow:0 14px 30px -28px rgba(15,23,42,.32)}
401
+ .bb-channel-portable .bb-channel-card-placeholder{pointer-events:none;position:absolute;inset:0;border:1px dashed var(--bb-card-placeholder-border);border-radius:14px;background:var(--bb-card-placeholder-bg);opacity:0;transition:opacity var(--bb-card-transition)}
402
+ .bb-channel-portable .bb-channel-card-surface{position:relative;z-index:1;border:1px dashed var(--bb-card-placeholder-border);border-radius:14px;background:var(--bb-card-surface-bg);padding:1.45rem 1.65rem;box-shadow:none;transition:border-color var(--bb-card-transition),background-color var(--bb-card-transition),box-shadow var(--bb-card-transition),transform var(--bb-card-transition)}
403
+ .bb-channel-portable .bb-channel-card[data-bb-card-active="true"] .bb-channel-card-placeholder{opacity:1}
404
+ .bb-channel-portable .bb-channel-card[data-bb-card-active="true"] .bb-channel-card-surface{transform:translate(var(--bb-card-offset-x),var(--bb-card-offset-y));border-style:solid;border-color:var(--bb-card-active-border);background:var(--bb-card-active-bg);box-shadow:var(--bb-card-active-shadow)}
405
+ @media(hover:hover) and (pointer:fine){.bb-channel-portable .bb-channel-card:hover .bb-channel-card-placeholder{opacity:1}.bb-channel-portable .bb-channel-card:hover .bb-channel-card-surface{transform:translate(var(--bb-card-offset-x),var(--bb-card-offset-y));border-style:solid;border-color:var(--bb-card-active-border);background:var(--bb-card-active-bg);box-shadow:var(--bb-card-active-shadow)}}
405
406
  .bb-channel-portable .bb-channel-dot{position:absolute;left:-2.16rem;top:1.7rem;z-index:2;width:.56rem;height:.56rem;border-radius:999px;background:#ff7900;box-shadow:0 0 0 .28rem rgba(255,121,0,.12)}
406
407
  .bb-channel-portable .bb-channel-meta{display:flex;align-items:center;gap:.7rem;margin:0 0 1.08rem;color:#737373;font-weight:500}
407
408
  .bb-channel-portable .bb-channel-time{color:inherit;text-decoration:none;border-bottom:0;font-size:.96rem;line-height:1.3}
@@ -419,6 +420,8 @@ function renderClientContent(config) {
419
420
  .bb-channel-portable .bb-channel-image-skeleton{position:absolute;inset:0;display:block;border-radius:inherit;background:linear-gradient(100deg,rgba(245,245,245,.78) 0%,rgba(233,233,233,.94) 45%,rgba(247,247,247,.8) 80%);background-size:220% 100%;animation:bb-channel-shimmer 1.15s ease-in-out infinite}
420
421
  .bb-channel-portable [data-bb-loaded="true"]>.bb-channel-image-skeleton{display:none}
421
422
  .bb-channel-portable [data-bb-loaded="error"]>.bb-channel-image-skeleton{background:#f4eeee}
423
+ .bb-channel-portable .bb-channel-card[data-bb-viewer-open="true"] .bb-channel-card-placeholder{opacity:0}
424
+ .bb-channel-portable .bb-channel-card[data-bb-viewer-open="true"] .bb-channel-card-surface{transform:none}
422
425
  .bb-channel-portable .bb-channel-card[data-bb-viewer-open="true"] .bb-channel-media-rail{max-height:0;opacity:0;transform:translateY(14px);filter:blur(2px);pointer-events:none}
423
426
  .bb-channel-portable .bb-channel-image-viewer{position:relative;margin-top:0;max-width:100%;max-height:0;overflow:hidden;opacity:0;transform:translateY(-14px);touch-action:pan-y;transition:max-height 420ms cubic-bezier(.22,1,.36,1),margin-top 420ms cubic-bezier(.22,1,.36,1),opacity 420ms cubic-bezier(.22,1,.36,1),transform 420ms cubic-bezier(.22,1,.36,1);will-change:max-height,opacity,transform}
424
427
  .bb-channel-portable .bb-channel-image-viewer[hidden]{display:none}
@@ -448,7 +451,7 @@ function renderClientContent(config) {
448
451
  .bb-channel-portable .bb-channel-pagination span{min-width:2.15rem;background:#333;color:#fff;border-color:#333}
449
452
  @media(max-width:720px){.bb-channel-portable .bb-channel-body-with-media{grid-template-columns:1fr}.bb-channel-portable .bb-channel-media-rail{justify-self:start;width:min(18rem,100%)}}
450
453
  @keyframes bb-channel-shimmer{0%{background-position:180% 0}100%{background-position:-80% 0}}
451
- @media(max-width:640px){.bb-channel-portable .bb-channel-intro{margin-bottom:1.2rem}.bb-channel-portable .bb-channel-title{font-size:1.45rem}.bb-channel-portable .bb-channel-intro-text{font-size:.94rem}.bb-channel-portable .bb-channel-feed{gap:.9rem;padding-left:1.15rem}.bb-channel-portable .bb-channel-feed::before{left:.06rem}.bb-channel-portable .bb-channel-dot{left:-1.32rem;top:1.42rem}.bb-channel-portable .bb-channel-card-surface{padding:1.05rem .95rem;border-radius:12px}.bb-channel-portable .bb-channel-card-placeholder{border-radius:12px}.bb-channel-portable .bb-channel-card:hover .bb-channel-card-surface{transform:none}.bb-channel-portable .bb-channel-card[data-bb-card-active="true"] .bb-channel-card-placeholder{opacity:1}.bb-channel-portable .bb-channel-card[data-bb-card-active="true"] .bb-channel-card-surface{transform:translate(4px,-5px);border-style:solid;border-color:#e7b99d;background:rgba(255,255,255,.86);box-shadow:0 12px 26px -24px rgba(15,23,42,.32)}.bb-channel-portable .bb-channel-card[data-bb-viewer-open="true"] .bb-channel-card-placeholder{opacity:0}.bb-channel-portable .bb-channel-card[data-bb-viewer-open="true"] .bb-channel-card-surface{transform:none}.bb-channel-portable .bb-channel-meta{margin-bottom:.85rem}.bb-channel-portable .bb-channel-content{font-size:.96rem;line-height:1.72}.bb-channel-portable .bb-channel-media-rail{width:100%;max-width:20rem;grid-template-columns:repeat(3,minmax(0,1fr));justify-self:center;margin-top:.15rem}.bb-channel-portable .bb-channel-media-thumb{min-height:4.1rem}.bb-channel-portable .bb-channel-image-viewer{margin-top:.95rem;max-width:100%}.bb-channel-portable .bb-channel-image-slide{min-height:10rem}.bb-channel-portable .bb-channel-image-large{max-width:100%!important;max-height:68vh!important}.bb-channel-portable .bb-channel-image-nav{width:2.55rem;height:2.55rem}.bb-channel-portable .bb-channel-image-prev{left:.45rem}.bb-channel-portable .bb-channel-image-next{right:.45rem}.bb-channel-portable .bb-channel-attachment{align-items:flex-start;padding:.78rem .82rem}.bb-channel-portable .bb-channel-attachment-title{white-space:normal;overflow-wrap:anywhere}.bb-channel-portable .bb-channel-tags{gap:.42rem}.bb-channel-portable .bb-channel-pagination{gap:1rem}}
454
+ @media(max-width:640px){.bb-channel-portable{--bb-card-offset-x:var(--bb-card-mobile-offset-x);--bb-card-offset-y:var(--bb-card-mobile-offset-y);--bb-card-active-shadow:0 12px 26px -24px rgba(15,23,42,.32)}.bb-channel-portable .bb-channel-intro{margin-bottom:1.2rem}.bb-channel-portable .bb-channel-title{font-size:1.45rem}.bb-channel-portable .bb-channel-intro-text{font-size:.94rem}.bb-channel-portable .bb-channel-feed{gap:.9rem;padding-left:1.15rem}.bb-channel-portable .bb-channel-feed::before{left:.06rem}.bb-channel-portable .bb-channel-dot{left:-1.32rem;top:1.42rem}.bb-channel-portable .bb-channel-card-surface{padding:1.05rem .95rem;border-radius:12px}.bb-channel-portable .bb-channel-card-placeholder{border-radius:12px}.bb-channel-portable .bb-channel-meta{margin-bottom:.85rem}.bb-channel-portable .bb-channel-content{font-size:.96rem;line-height:1.72}.bb-channel-portable .bb-channel-media-rail{width:100%;max-width:20rem;grid-template-columns:repeat(3,minmax(0,1fr));justify-self:center;margin-top:.15rem}.bb-channel-portable .bb-channel-media-thumb{min-height:4.1rem}.bb-channel-portable .bb-channel-image-viewer{margin-top:.95rem;max-width:100%}.bb-channel-portable .bb-channel-image-slide{min-height:10rem}.bb-channel-portable .bb-channel-image-large{max-width:100%!important;max-height:68vh!important}.bb-channel-portable .bb-channel-image-nav{width:2.55rem;height:2.55rem}.bb-channel-portable .bb-channel-image-prev{left:.45rem}.bb-channel-portable .bb-channel-image-next{right:.45rem}.bb-channel-portable .bb-channel-attachment{align-items:flex-start;padding:.78rem .82rem}.bb-channel-portable .bb-channel-attachment-title{white-space:normal;overflow-wrap:anywhere}.bb-channel-portable .bb-channel-tags{gap:.42rem}.bb-channel-portable .bb-channel-pagination{gap:1rem}}
452
455
  @media(prefers-reduced-motion:reduce){.bb-channel-portable .bb-channel-card-placeholder,.bb-channel-portable .bb-channel-card-surface,.bb-channel-portable .bb-channel-media-rail,.bb-channel-portable .bb-channel-image-viewer,.bb-channel-portable .bb-channel-image-large,.bb-channel-portable .bb-channel-attachment{transition:none}.bb-channel-portable .bb-channel-card:hover .bb-channel-card-surface,.bb-channel-portable .bb-channel-card[data-bb-card-active="true"] .bb-channel-card-surface{transform:none}}
453
456
  </style>
454
457
  <div class="bb-channel-portable" data-bb-channel-root data-api-base="${escapeHtml(config.apiBase)}" data-page-size="${escapeHtml(config.pageSize)}">