xaoxuu / hexo-theme-stellar

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

容器类标签 ablock 普通块容器配色bug #306

Closed hermitlsr closed 7 months ago

hermitlsr commented 1 year ago

在暗黑模式下,使用ablock标签,颜色为 warning,嵌套 grid 时,grid 部分背景颜色不会更改,并且字体颜色不适配暗黑模式 image

代码如下:

{% ablock 示例 color:warning child:grid %} 假设我们有以下表 employees:

id name departments
1 John Doe HR/Recruitment
2 Jane Smith IT/Development
3 Bob Johnson Finance/Accounting
4 Alice Williams HR/Training

{% grid bg:block %}

提取 departments 字段中的部门名称:

SELECT SUBSTRING_INDEX(departments, '/', 1) AS department_name
FROM employees;

结果:

department_name
HR
IT
Finance
HR

提取 name 字段中的姓氏(假设姓氏在名字后面,由空格分隔):

SELECT SUBSTRING_INDEX(name, ' ', -1) AS last_name
FROM employees;

结果:

last_name
Doe
Smith
Johnson
Williams

{% endgrid %}

在这个示例中,SUBSTRING_INDEX() 函数分别用于从 departments 字段提取部门名称(第一个示例)以及从 name 字段提取姓氏(第二个示例)。

{% endablock %}

xaoxuu commented 12 months ago

这个warning和error不建议放太复杂的东西,适配起来太麻烦了。