feat: add default prompt changes.
This commit is contained in:
parent
e87ce59a88
commit
d8ab87b0e0
@ -67,7 +67,7 @@ Contributing 贡献
|
||||
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=contributing-->
|
||||
```
|
||||
|
||||
添加 `contributing` 类名,会在卡片下方添加 _`👆待完善需要您的参与`_
|
||||
添加 `contributing` 类名,会在卡片下方添加 _`👆待完善需要您的参与`_,添加 `data-info=👆看看还缺点儿什么?`,更换默认提示文本。
|
||||
|
||||
|
||||
```markdown
|
||||
|
@ -370,7 +370,7 @@ body.home .max-container a.home-button:visited:hover {
|
||||
}
|
||||
.home-card a.contributing::after {
|
||||
color: var(--color-fg-muted);
|
||||
content: '👆待完善需要您的参与';
|
||||
content: attr(data-info);
|
||||
display: block;
|
||||
position: absolute;
|
||||
font-size: 10px;
|
||||
|
@ -3,6 +3,12 @@ import path from 'path';
|
||||
import { getSVGNode, ICONS_PATH } from './getSVGNode.mjs';
|
||||
|
||||
export function homeCardIcons(node, parent, isHome) {
|
||||
if (isHome && node && node.type === 'element' && node.properties?.class?.includes('contributing')) {
|
||||
const info = node.properties['data-info'];
|
||||
if (!info) {
|
||||
node.properties['data-info'] = '👆待完善需要您的参与';
|
||||
}
|
||||
}
|
||||
if (isHome && node && node.type === 'element' && node.properties?.class?.includes('home-card')) {
|
||||
node.children = node.children.map((child) => {
|
||||
const href = child.properties?.href;
|
||||
|
Loading…
x
Reference in New Issue
Block a user