Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

折叠块的三个 bug:行间距、颜色与同时展开折叠 #1026

Closed
3 tasks done
xyfJASON opened this issue Dec 7, 2023 · 7 comments
Closed
3 tasks done

折叠块的三个 bug:行间距、颜色与同时展开折叠 #1026

xyfJASON opened this issue Dec 7, 2023 · 7 comments
Labels
🐛 bug Unexpected problem or unintended behavior

Comments

@xyfJASON
Copy link

xyfJASON commented Dec 7, 2023

请确认

  • 是当前最新的 Release 版本
  • 本地 hexo clean && hexo s,并且清除浏览器缓存,仍可复现
  • 已经排除是其他 Hexo 插件影响

Bug 描述

  1. 折叠块内行间距比正文大;
  2. 使用 secondary 的时候没有颜色(其他颜色正常);
  3. 如果两个折叠块内容相同,它们会被同时展开或折叠。

浏览器:Chrome / Safari

复现步骤

新建一篇文章,输入以下内容并 hexo s

---
title: fold测试
date: 2023-12-07 20:48:21
tags:
categories:
banner_img:
index_img:
---

### Bug 1: 折叠块行间距过大

正文第一行

正文第二行

{% fold primary @折叠块测试 %}

折叠块第一行

折叠块第二行

{% endfold %}



### Bug 2: secondary 没有颜色

{% fold secondary @折叠块测试 %}

secondary 没有颜色(其他颜色正常)

{% endfold %}



### Bug 3: 相同内容的折叠块会被同时展开和折叠

{% fold success @折叠块测试 %}

aaa

{% endfold %}

{% fold danger @折叠块测试 %}

aaa

{% endfold %}

{% fold warning @折叠块测试 %}

bbb

{% endfold %}

{% fold info @折叠块测试 %}

bbb

{% endfold %}

{% fold light @折叠块测试 %}

bbb

{% endfold %}

截图

Xnip2023-12-07_21-19-14

版本信息

image
@xyfJASON xyfJASON added the 🐛 bug Unexpected problem or unintended behavior label Dec 7, 2023
zkqiang added a commit that referenced this issue Dec 12, 2023
@zkqiang
Copy link
Member

zkqiang commented Dec 12, 2023

1 和 2 已在 dev 分支修复

3 的原理是根据折叠内容作为折叠的编号,所以只要内容不同就没有这个情况,不然没有其他识别唯一性的好办法

@xyfJASON
Copy link
Author

好的,谢谢 😃

@mobeicanyue
Copy link
Contributor

@zkqiang 您好,看到您的博客的折叠块代码效果是这样的(折叠logo)
image

但是我照着您的源码写 logo效果却如下
image
请问是我有哪里没写到位?是目前最新的主题版本

@zkqiang
Copy link
Member

zkqiang commented Jan 18, 2024

@mobeicanyue 是你浏览器的问题吧,实际就是下一个

image

@mobeicanyue
Copy link
Contributor

@mobeicanyue 是你浏览器的问题吧,实际就是下一个

image

确实好奇怪,和浏览器也有关系
我用手机访问你的blog 就是你发的图片的效果,但是如果电脑使用 chrome
image
而同样是chrome 我打开我的网页就是
image

@zkqiang
Copy link
Member

zkqiang commented Jan 18, 2024

@mobeicanyue 应该是你系统字体的关系

@mobeicanyue
Copy link
Contributor

应该是我博客字体的关系

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants